/[libspopc]/mutex.h
ViewVC logotype

Diff of /mutex.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2 by ben, Thu Oct 8 15:37:49 2009 UTC revision 4 by ben, Thu Oct 15 23:10:35 2009 UTC
# Line 24  Line 24 
24  #ifndef MUTEX_H  #ifndef MUTEX_H
25  #define MUTEX_H  #define MUTEX_H
26    
27  #include <semaphore.h>  #ifdef USE_SEM /* no posix thread mutex */
28     #include <semaphore.h>
29  typedef sem_t mutex;   typedef sem_t mutex; /* use unix rt semaphores from librt */
30    #else
31     #ifdef USE_PMUTEX
32      #include <pthread.h>
33      typedef pthread_mutex_t mutex; /* use posix thread mutexes */
34     #else
35      typedef int mutex;
36     #endif
37    #endif
38    
39  /* initializes a thread-wide mutex */  /* initializes a thread-wide mutex */
40  int mutex_init(mutex* id);  int mutex_init(mutex* id);

Legend:
Removed from v.2  
changed lines
  Added in v.4

  ViewVC Help
Powered by ViewVC 1.1.26