1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-10 05:13:38 +00:00

1. Added sem_timedwait to macos

2. Added Workaround for pthread_timedjoin_np() for macos
This commit is contained in:
Bryan Roe
2020-04-21 16:22:39 -07:00
parent b8358a32f2
commit 6cfd62ed42
2 changed files with 70 additions and 4 deletions

View File

@@ -143,10 +143,12 @@ struct sockaddr_in6;
#define sem_wait(x) ILibDispatchSemaphore_wait(x)
#define sem_trywait(x) ILibDispatchSemaphore_trywait(s)
#define sem_post(x) ILibDispatchSemaphore_post(x)
#define sem_timedwait(x, timeout) ILibDispatchSemaphore_timedwait(x, timeout)
void ILibDispatchSemaphore_Init(sem_t* s, int pShared, int value);
void ILibDispatchSemaphore_Destroy(sem_t* s);
void ILibDispatchSemaphore_wait(sem_t* s);
void ILibDispatchSemaphore_trywait(sem_t* s);
int ILibDispatchSemaphore_timedwait(sem_t *x, struct timespec *timeout);
void ILibDispatchSemaphore_post(sem_t* s);
#endif