pthread_locking is required for CYGWIN and Mac.

This commit is contained in:
Vitor Santos Costa 2010-01-22 22:30:43 +00:00
parent d2bf8c717d
commit ad3bf0b178

View File

@ -330,15 +330,16 @@ typedef CELL Term;
#if !defined(YAPOR) && !defined(THREADS) #if !defined(YAPOR) && !defined(THREADS)
#include <nolocks.h> #include <nolocks.h>
#elif USE_PTHREAD_LOCKING #elif USE_PTHREAD_LOCKING || defined(__APPLE__) || defined(__CYGWIN__)
#ifndef _XOPEN_SOURCE #ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600 #define _XOPEN_SOURCE 600
#endif #endif
#include <pthread_locks.h>
typedef pthread_mutex_t lockvar; typedef pthread_mutex_t lockvar;
typedef pthread_rwlock_t rwlock_t; typedef pthread_rwlock_t rwlock_t;
#include <pthread_locks.h>
#elif defined(i386) || defined(__x86_64__) #elif defined(i386) || defined(__x86_64__)
typedef volatile int lockvar; typedef volatile int lockvar;
#include <x86_locks.h> #include <x86_locks.h>