~ubuntu-branches/ubuntu/intrepid/ecl/intrepid

« back to all changes in this revision

Viewing changes to src/gc/win32_threads.c

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde
  • Date: 2006-06-21 09:21:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060621092121-txz1f21lj0wh0f67
Tags: 0.9h-20060617-1
* New upstream version
* Updated standards version without real changes. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
233
233
# endif
234
234
}
235
235
 
 
236
/* Defined in misc.c */
 
237
extern CRITICAL_SECTION GC_write_cs;
 
238
 
236
239
void GC_stop_world()
237
240
{
238
241
  DWORD thread_id = GetCurrentThreadId();
241
244
  if (!GC_thr_initialized) ABORT("GC_stop_world() called before GC_thr_init()");
242
245
 
243
246
  GC_please_stop = TRUE;
 
247
# ifndef CYGWIN32
 
248
    EnterCriticalSection(&GC_write_cs);
 
249
# endif /* !CYGWIN32 */
244
250
  for (i = 0; i <= GC_get_max_thread_index(); i++)
245
251
    if (thread_table[i].stack_base != 0
246
252
        && thread_table[i].id != thread_id) {
271
277
#     endif
272
278
      thread_table[i].suspended = TRUE;
273
279
    }
 
280
# ifndef CYGWIN32
 
281
    LeaveCriticalSection(&GC_write_cs);
 
282
# endif /* !CYGWIN32 */
274
283
}
275
284
 
276
285
void GC_start_world()