Branch: Tag:

1999-11-18

1999-11-18 04:14:55 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

resolved some conflicts for PHP

Rev: src/builtin_functions.h:1.10
Rev: src/errors.h:1.7
Rev: src/interpret.h:1.35
Rev: src/interpreter.h:1.18
Rev: src/lexer.h:1.11
Rev: src/preprocessor.h:1.15
Rev: src/program.c:1.174
Rev: src/program.h:1.66
Rev: src/security.h:1.8
Rev: src/svalue.h:1.38
Rev: src/threads.h:1.71

1:   /* -  * $Id: threads.h,v 1.70 1999/09/06 11:13:23 hubbe Exp $ +  * $Id: threads.h,v 1.71 1999/11/18 04:14:55 hubbe Exp $    */   #ifndef THREADS_H   #define THREADS_H
53:   extern size_t thread_stack_size;   extern struct object *thread_id;    - #define DEFINE_MUTEX(X) MUTEX_T X + #define DEFINE_MUTEX(X) PIKE_MUTEX_T X         #ifdef POSIX_THREADS
71:   #endif      #define THREAD_T pthread_t - #define MUTEX_T pthread_mutex_t + #define PIKE_MUTEX_T pthread_mutex_t   #define mt_init(X) pthread_mutex_init((X),0)   #define mt_lock(X) pthread_mutex_lock(X)   #define mt_trylock(X) pthread_mutex_trylock(X)
129:   #ifdef UNIX_THREADS   #define THREAD_T thread_t   #define PTHREAD_MUTEX_INITIALIZER DEFAULTMUTEX - #define MUTEX_T mutex_t + #define PIKE_MUTEX_T mutex_t   #define mt_init(X) mutex_init((X),USYNC_THREAD,0)   #define mt_lock(X) mutex_lock(X)   #define mt_trylock(X) mutex_trylock(X)
163:    */   #define THREAD_T int    - #define MUTEX_T ulock_t + #define PIKE_MUTEX_T ulock_t   #define mt_init(X) (usinitlock(((*X) = usnewlock(/*********/))))   #define mt_lock(X) ussetlock(*X)   #define mt_unlock(X) usunsetlock(*X)
206:   #define th_equal(X,Y) ((X)==(Y))   #define th_hash(X) (X)    - #define MUTEX_T HANDLE + #define PIKE_MUTEX_T HANDLE   #define mt_init(X) CheckValidHandle((*(X)=CreateMutex(NULL, 0, NULL)))   #define mt_lock(X) WaitForSingleObject(CheckValidHandle(*(X)), INFINITE)   #define mt_trylock(X) WaitForSingleObject(CheckValidHandle(*(X)), 0)
222:   #endif       - #if !defined(COND_T) && defined(EVENT_T) && defined(MUTEX_T) + #if !defined(COND_T) && defined(EVENT_T) && defined(PIKE_MUTEX_T)      #define SIMULATE_COND_WITH_EVENT   
234:      typedef struct cond_t_s   { -  MUTEX_T lock; +  PIKE_MUTEX_T lock;    struct cond_t_queue *head, *tail;   } COND_T;   
242:      #define co_init(X) do { mt_init(& (X)->lock), (X)->head=(X)->tail=0; }while(0)    - int co_wait(COND_T *c, MUTEX_T *m); + int co_wait(COND_T *c, PIKE_MUTEX_T *m);   int co_signal(COND_T *c);   int co_broadcast(COND_T *c);   int co_destroy(COND_T *c);
250:   #endif       - extern MUTEX_T interpreter_lock; + extern PIKE_MUTEX_T interpreter_lock;      extern COND_T live_threads_change; /* Used by _disable_threads */   extern COND_T threads_disabled_change; /* Used by _disable_threads */
258:   struct svalue;   struct pike_frame;    - extern MUTEX_T interleave_lock; + extern PIKE_MUTEX_T interleave_lock;      struct interleave_mutex   {    struct interleave_mutex *next;    struct interleave_mutex *prev; -  MUTEX_T lock; +  PIKE_MUTEX_T lock;   };      #define IMUTEX_T struct interleave_mutex
635:   extern int threads_disabled;   extern int thread_storage_offset;    + #ifndef NO_PIKE_SHORTHAND + #define MUTEX_T PIKE_MUTEX_T + #endif +    #endif /* THREADS_H */