made it so that zemaphore is used on mac, semaphore on linux, and other clean up
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "common_threads.h"
|
||||
|
||||
#ifdef linux
|
||||
#include <semaphore.h>
|
||||
#elif __APPLE__
|
||||
#include "zemaphore.h"
|
||||
#endif
|
||||
|
||||
typedef struct _rwlock_t {
|
||||
sem_t writelock;
|
||||
sem_t lock;
|
||||
|
||||
Reference in New Issue
Block a user