/[dotgnu-pnet]/pnet/libgc/win32_threads.c
ViewVC logotype

Diff of /pnet/libgc/win32_threads.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by ktreichel, Mon Aug 1 17:09:48 2005 UTC revision 1.15 by ktreichel, Sat Sep 17 16:54:39 2005 UTC
# Line 233  void GC_push_thread_structures GC_PROTO( Line 233  void GC_push_thread_structures GC_PROTO(
233  # endif  # endif
234  }  }
235    
236    /* Defined in misc.c */
237    extern CRITICAL_SECTION GC_write_cs;
238    
239  void GC_stop_world()  void GC_stop_world()
240  {  {
241    DWORD thread_id = GetCurrentThreadId();    DWORD thread_id = GetCurrentThreadId();
# Line 241  void GC_stop_world() Line 244  void GC_stop_world()
244    if (!GC_thr_initialized) ABORT("GC_stop_world() called before GC_thr_init()");    if (!GC_thr_initialized) ABORT("GC_stop_world() called before GC_thr_init()");
245    
246    GC_please_stop = TRUE;    GC_please_stop = TRUE;
247    # ifndef CYGWIN32
248        EnterCriticalSection(&GC_write_cs);
249    # endif /* !CYGWIN32 */
250    for (i = 0; i <= GC_get_max_thread_index(); i++)    for (i = 0; i <= GC_get_max_thread_index(); i++)
251      if (thread_table[i].stack_base != 0      if (thread_table[i].stack_base != 0
252          && thread_table[i].id != thread_id) {          && thread_table[i].id != thread_id) {
# Line 271  void GC_stop_world() Line 277  void GC_stop_world()
277  #     endif  #     endif
278        thread_table[i].suspended = TRUE;        thread_table[i].suspended = TRUE;
279      }      }
280    # ifndef CYGWIN32
281        LeaveCriticalSection(&GC_write_cs);
282    # endif /* !CYGWIN32 */
283  }  }
284    
285  void GC_start_world()  void GC_start_world()

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26