7.1.10

Aus BC-Wiki
Zur Navigation springen Zur Suche springen

7x

  • MGR: Fix compilation issue on VS 2010 reported by Chanda Sarkar
  • API: fix bug involving suspend and critical sections
    • Old: if the timer thread gets a <suspend> message while we're in a critical section, it sets a "suspend_request" flag. The timer then periodically (10X/sec) checks whether suspend_request is set and we're no longer in a critical section; if so it suspends the worker thread. Problem (pointed out by Oliver): this doesn't work if the worker thread is almost always in a critical section (as is the case for GPU apps, which treat GPU kernels as critical sections). The app never gets suspended.
    • New:
      • 1) boinc_end_critical_section() checks suspend_request; if set, it calls suspend_activities()
      • 2) On Unix, if suspend_activities() is called from the worker thread, it calls sleep() in a loop until the suspension is over.(Note: pthreads has no suspend/resume).
      • 3) Add a mutex to protect the data structures shared between the timer and worker threads. Oliver pointed out that