Mercurial > cpython-lru_cache-weakref
diff Python/thread_cthread.h @ 21606:67da11293406 legacy-trunk
Patch #497098: build support for GNU/Hurd.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Tue, 01 Jan 2002 18:41:33 +0000 |
| parents | ebfd87e87884 |
| children | 8b116a8449bd |
line wrap: on
line diff
--- a/Python/thread_cthread.h Mon Dec 31 15:08:04 2001 +0000 +++ b/Python/thread_cthread.h Tue Jan 01 18:41:33 2002 +0000 @@ -1,6 +1,11 @@ +#ifdef MACH_C_THREADS #include <mach/cthreads.h> +#endif +#ifdef HURD_C_THREADS +#include <cthreads.h> +#endif /* * Initialization. @@ -8,7 +13,14 @@ static void PyThread__init_thread(void) { - cthread_init(); +#ifndef HURD_C_THREADS + /* Roland McGrath said this should not be used since this is + done while linking to threads */ + cthread_init(); +#else +/* do nothing */ + ; +#endif } /* @@ -127,10 +139,10 @@ dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag)); if (waitflag) { /* blocking */ - mutex_lock(lock); + mutex_lock((mutex_t)lock); success = TRUE; } else { /* non blocking */ - success = mutex_try_lock(lock); + success = mutex_try_lock((mutex_t)lock); } dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, success)); return success;
