What can *my app* do to stop the watchdog kicking in?
I am talking about the app that I am developing. Some operations can take a vvvveeeeerrrrrryyy long time (up to a few minutes) and the damn watchdog just reboots the damn phone. I know about the R&D mode (BTW, it seems all the links to the R&D mode wiki page are dead) but I cannot ask the users of my app to enable the R&D mode just to be able to use it, can I?
I assume there is a system call somewhere that I can call periodically to reset the watchdog. What is it? Sorry if this is a silly question with an obvious answer. I must be particularly slow this morning. I just spent two hours searching and found nothing of relevance. |
Re: What can *my app* do to stop the watchdog kicking in?
@pichlo
Huh, what kind of app is 'that'? Taking all resources away? Did you try with 'nice -n 19 app'? Or maybe if it is IO consuming, then 'nice -n 19 ionice -c 3 -n 7 app'? Hope this is sufficient to let the watchdog bite/kick in. About wtachdog calls from within app IDK ... |
Re: What can *my app* do to stop the watchdog kicking in?
It is a GUI app that, depending on settings, may want to fill up a large (200MB+) buffer with data generated at runtime. In pseudocode...
Code:
for (int i; i < 200MB; ++i) |
Re: What can *my app* do to stop the watchdog kicking in?
Quote:
add #include <sched.h> and do something along the lines of: Code:
for (int i; i < 200MB; ++i) { |
Re: What can *my app* do to stop the watchdog kicking in?
Quote:
|
Re: What can *my app* do to stop the watchdog kicking in?
Yes, that will let the WD bite, for sure! :)
Did you try above suggestion? May slow down a bit more, but for sure should leave enough resources to let the WD kick... @was/am on slow line: that would have been my next suggestion: a sleep inside the loop every 100th call or so. But reinob gave already the (better) idea! |
Re: What can *my app* do to stop the watchdog kicking in?
Quote:
Quote:
EDIT: Quote:
|
All times are GMT. The time now is 13:33. |
vBulletin® Version 3.8.8