[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/libgc configure.in,1.4,1.5 win32_thread
From: |
Thong Nguyen <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/libgc configure.in,1.4,1.5 win32_threads.c,1.5,1.6 |
Date: |
Sat, 05 Jul 2003 23:01:08 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/libgc
In directory subversions:/tmp/cvs-serv19923
Modified Files:
configure.in win32_threads.c
Log Message:
Fix so that GC_CreateThread gets redirected even if libgc is compiled
using cygwin.
Index: configure.in
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/configure.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** configure.in 17 Feb 2003 18:11:17 -0000 1.4
--- configure.in 6 Jul 2003 03:01:05 -0000 1.5
***************
*** 136,139 ****
--- 136,140 ----
*-*-cygwin*)
AC_DEFINE(GC_WIN32_THREADS)
+ AC_DEFINE(GC_DISABLE_CYGWIN_PTHREADS)
;;
*-*-osf*)
Index: win32_threads.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/libgc/win32_threads.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** win32_threads.c 5 Jul 2003 08:30:57 -0000 1.5
--- win32_threads.c 6 Jul 2003 03:01:05 -0000 1.6
***************
*** 3,7 ****
#include "private/gc_priv.h"
! #ifdef CYGWIN32
# include <errno.h>
--- 3,7 ----
#include "private/gc_priv.h"
! #if defined(CYGWIN32) && !defined(GC_DISABLE_CYGWIN_PTHREADS)
# include <errno.h>
***************
*** 38,42 ****
GC_bool suspended;
! # ifdef CYGWIN32
void *status; /* hold exit value until join in case it's a pointer */
pthread_t pthread_id;
--- 38,42 ----
GC_bool suspended;
! # if defined(CYGWIN32) && !defined(GC_DISABLE_CYGWIN_PTHREADS)
void *status; /* hold exit value until join in case it's a pointer */
pthread_t pthread_id;
***************
*** 54,58 ****
/* contains no pointers to the collectable heap. Thus we have */
/* no private structures we need to preserve. */
! # ifdef CYGWIN32
{ int i; /* pthreads may keep a pointer in the thread exit value */
for (i = 0; i < MAX_THREADS; i++)
--- 54,58 ----
/* contains no pointers to the collectable heap. Thus we have */
/* no private structures we need to preserve. */
! # if defined(CYGWIN32) && !defined(GC_DISABLE_CYGWIN_PTHREADS)
{ int i; /* pthreads may keep a pointer in the thread exit value */
for (i = 0; i < MAX_THREADS; i++)
***************
*** 67,71 ****
int i;
! #ifdef CYGWIN32
if (!GC_thr_initialized) ABORT("GC_stop_world() called before
GC_thr_init()");
#endif
--- 67,71 ----
int i;
! #if defined(CYGWIN32) && !defined(GC_DISABLE_CYGWIN_PTHREADS)
if (!GC_thr_initialized) ABORT("GC_stop_world() called before
GC_thr_init()");
#endif
***************
*** 89,93 ****
exitCode != STILL_ACTIVE) {
thread_table[i].stack = 0; /* prevent stack from being pushed */
! # ifndef CYGWIN32
/* this breaks pthread_join on Cygwin, which is guaranteed to only
see user pthreads */
thread_table[i].in_use = FALSE;
--- 89,93 ----
exitCode != STILL_ACTIVE) {
thread_table[i].stack = 0; /* prevent stack from being pushed */
! # if !(!defined(CYGWIN32) && !defined(GC_DISABLE_CYGWIN_PTHREADS))
/* this breaks pthread_join on Cygwin, which is guaranteed to only
see user pthreads */
thread_table[i].in_use = FALSE;
***************
*** 594,598 ****
}
thread_table[i].id = GetCurrentThreadId();
! # ifdef CYGWIN32
thread_table[i].pthread_id = pthread_self();
# endif
--- 594,598 ----
}
thread_table[i].id = GetCurrentThreadId();
! # if defined(CYGWIN32) && !defined(GC_DISABLE_CYGWIN_PTHREADS)
thread_table[i].pthread_id = pthread_self();
# endif
***************
*** 638,642 ****
}
! #ifdef CYGWIN32
/* Called by GC_init() - we hold the allocation lock. */
--- 638,642 ----
}
! #if defined(CYGWIN32) && !defined(GC_DISABLE_CYGWIN_PTHREADS)
/* Called by GC_init() - we hold the allocation lock. */
***************
*** 808,811 ****
--- 808,813 ----
#else
+ #ifdef _DLL
+
/*
* We avoid acquiring locks here, since this doesn't seem to be preemptable.
***************
*** 852,855 ****
--- 854,860 ----
return TRUE;
}
+
+ #endif /* _DLL */
+
#endif /* CYGWIN32 */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/libgc configure.in,1.4,1.5 win32_threads.c,1.5,1.6,
Thong Nguyen <address@hidden> <=