1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 17:28:50 -05:00
sdrangel/apple/apple_compat.h
ZigaS 27aab58d92 MacOS(sierra) development environment.
Updated qmake project configs.
Deploy & Run script.
For now only hardware supported is HackRF.
2017-05-15 12:32:16 +02:00

44 lines
776 B
C

/*
* APPLE Compatibility
*/
#ifdef __APPLE__
/**
* Missing POSIX Thread Barriers implementation
*/
#ifndef PTHREAD_BARRIER_H_
#define PTHREAD_BARRIER_H_
#include <pthread.h>
#include <errno.h>
typedef int pthread_barrierattr_t;
typedef struct
{
pthread_mutex_t mutex;
pthread_cond_t cond;
int count;
int tripCount;
} pthread_barrier_t;
int pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count);
int pthread_barrier_destroy(pthread_barrier_t *barrier);
int pthread_barrier_wait(pthread_barrier_t *barrier);
#endif // PTHREAD_BARRIER_H_
// <time.h>
#ifndef CLOCK_REALTIME
# define CLOCK_REALTIME 0
#endif
#ifndef CLOCK_MONOTONIC
# define CLOCK_MONOTONIC 0
#endif
#endif // APPLE Compatibility