I added it.
Uncomment the #define MSGS_FROM_FILE,
then put msgs like "<quit/>" in msgs.txt.
When the API sees this, it will handle it and delete the file.

-- David

On 4/7/2017 5:28 PM, David E Kim wrote:
I’ll can test this.  That’s the only way I’d know if it’s ok.

It will be easier for me to test if you include the text file messaging if you 
don’t mind/ or I’d just re-implement the signals.

Thanks David!

David K




On Apr 7, 2017, at 5:13 PM, David Anderson <da...@ssl.berkeley.edu> wrote:

I made some revisions to David Kim's code and put it in a branch:
https://github.com/BOINC/boinc/tree/android_api_dpa

The main changes:

- I added and fixed comments about the thread/signal structure

- In exit_from_timer_thread():
  removed the "boinc_status.suspended = false" and the first "sleep(2.0)".
  I don't see why either of these is needed.

- in timer_handler():
  If detect heartbeat failure, don't bother sending signal to work thread;
  exit_from_timer_thread() already does this.

- in worker_signal_handler, don't bother checking that we're the timer thread.
  Now that we use pthread_kill() instead of setitimer(),this will always be the 
case.

- I didn't include the stuff about debugging using external signals.
  That's a good idea, but there's a simpler way to do it:
  have the API look for control messages in a file instead of shared memory.
  e.g. you could tell the app to quit by writing <quit/> to the file.
  This would work on Win too.
  (I didn't add this, but will on request; it's a two-line change)

- didn't include the "in_critical_section > 0" changes; not needed.

David K, can you take a look at this and see if it's OK?

Thanks -- David

_______________________________________________
boinc_dev mailing list
boinc_dev@ssl.berkeley.edu
https://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to