#include "config.h"
#include <stdint.h>
#include <pthread.h>
#include <sys/time.h>
Go to the source code of this file.
Defines | |
#define | THR_RETURN void * |
#define | THR_API |
#define | INLINE inline |
#define | thr_self() pthread_self() |
#define | thr_sigsetmask pthread_sigmask |
#define | THR_BOUND 1 |
#define | THR_DETACHED 2 |
#define | THR_DAEMON 4 |
#define | mutex_init(mp, type, arg) pthread_mutex_init(mp, NULL) |
#define | mutex_lock(mp) pthread_mutex_lock(mp) |
#define | mutex_unlock(mp) pthread_mutex_unlock(mp) |
#define | mutex_destroy(mp) pthread_mutex_destroy(mp) |
#define | mutex_trylock(mp) pthread_mutex_trylock(mp) |
#define | DEFAULTMUTEX PTHREAD_MUTEX_INITIALIZER |
#define | DEFAULTCV PTHREAD_COND_INITIALIZER |
#define | MUTEX_HELD(mp) 1 |
#define | cond_init(c, type, arg) pthread_cond_init(c, NULL) |
#define | cond_wait(c, m) pthread_cond_wait(c, m) |
#define | _cond_wait(c, m) pthread_cond_wait(c, m) |
#define | cond_signal(c) pthread_cond_signal(c) |
#define | cond_broadcast(c) pthread_cond_broadcast(c) |
#define | cond_destroy(c) pthread_cond_destroy(c) |
#define | cond_timedwait pthread_cond_timedwait |
#define | _cond_timedwait pthread_cond_timedwait |
#define | RTLD_FIRST 0 |
#define | ec_atomic_inc64(a) (*a)++ |
#define | P2PHASE(x, align) ((x) & ((align) - 1)) |
#define | P2ALIGN(x, align) ((x) & -(align)) |
#define | P2NPHASE(x, align) (-(x) & ((align) - 1)) |
#define | P2ROUNDUP(x, align) (-(-(x) & -(align))) |
#define | P2END(x, align) (-(~(x) & -(align))) |
#define | P2PHASEUP(x, align, phase) ((phase) - (((phase) - (x)) & -(align))) |
#define | P2CROSS(x, y, align) (((x) ^ (y)) > (align) - 1) |
#define | P2SAMEHIGHBIT(x, y) (((x) ^ (y)) < ((x) & (y))) |
#define | IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) |
#define | ISP2(x) (((x) & ((x) - 1)) == 0) |
#define | atomic_add_64(lvalptr, delta) ec_atomic_inc64(lvalptr) |
#define | atomic_add_32_nv(a, b) ec_atomic_inc(a) |
#define | NANOSEC 1000000000 |
#define | issetugid() (geteuid() == 0) |
#define | _sysconf(a) sysconf(a) |
#define | __NORETURN __attribute__ ((noreturn)) |
#define | EC_UMEM_DUMMY_PCSTACK 1 |
#define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
#define | MAX(a, b) ((a) > (b) ? (a) : (b)) |
Typedefs | |
typedef pthread_t | thread_t |
typedef pthread_mutex_t | mutex_t |
typedef pthread_cond_t | cond_t |
typedef u_int64_t | hrtime_t |
typedef uint32_t | uint_t |
typedef unsigned long | ulong_t |
typedef struct timespec | timestruc_t |
typedef long long | longlong_t |
typedef struct timespec | timespec_t |
#define __NORETURN __attribute__ ((noreturn)) |
#define _cond_timedwait pthread_cond_timedwait |
#define _cond_wait | ( | c, | |||
m | ) | pthread_cond_wait(c, m) |
#define _sysconf | ( | a | ) | sysconf(a) |
#define atomic_add_32_nv | ( | a, | |||
b | ) | ec_atomic_inc(a) |
#define atomic_add_64 | ( | lvalptr, | |||
delta | ) | ec_atomic_inc64(lvalptr) |
#define cond_broadcast | ( | c | ) | pthread_cond_broadcast(c) |
#define cond_destroy | ( | c | ) | pthread_cond_destroy(c) |
#define cond_init | ( | c, | |||
type, | |||||
arg | ) | pthread_cond_init(c, NULL) |
#define cond_signal | ( | c | ) | pthread_cond_signal(c) |
#define cond_timedwait pthread_cond_timedwait |
#define cond_wait | ( | c, | |||
m | ) | pthread_cond_wait(c, m) |
#define DEFAULTCV PTHREAD_COND_INITIALIZER |
#define DEFAULTMUTEX PTHREAD_MUTEX_INITIALIZER |
#define ec_atomic_inc64 | ( | a | ) | (*a)++ |
#define EC_UMEM_DUMMY_PCSTACK 1 |
#define INLINE inline |
#define IS_P2ALIGNED | ( | v, | |||
a | ) | ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) |
#define ISP2 | ( | x | ) | (((x) & ((x) - 1)) == 0) |
#define issetugid | ( | ) | (geteuid() == 0) |
#define MAX | ( | a, | |||
b | ) | ((a) > (b) ? (a) : (b)) |
#define MIN | ( | a, | |||
b | ) | ((a) < (b) ? (a) : (b)) |
#define mutex_destroy | ( | mp | ) | pthread_mutex_destroy(mp) |
#define MUTEX_HELD | ( | mp | ) | 1 |
#define mutex_init | ( | mp, | |||
type, | |||||
arg | ) | pthread_mutex_init(mp, NULL) |
#define mutex_lock | ( | mp | ) | pthread_mutex_lock(mp) |
#define mutex_trylock | ( | mp | ) | pthread_mutex_trylock(mp) |
#define mutex_unlock | ( | mp | ) | pthread_mutex_unlock(mp) |
#define NANOSEC 1000000000 |
#define P2ALIGN | ( | x, | |||
align | ) | ((x) & -(align)) |
#define P2CROSS | ( | x, | |||
y, | |||||
align | ) | (((x) ^ (y)) > (align) - 1) |
#define P2END | ( | x, | |||
align | ) | (-(~(x) & -(align))) |
#define P2NPHASE | ( | x, | |||
align | ) | (-(x) & ((align) - 1)) |
#define P2PHASE | ( | x, | |||
align | ) | ((x) & ((align) - 1)) |
#define P2PHASEUP | ( | x, | |||
align, | |||||
phase | ) | ((phase) - (((phase) - (x)) & -(align))) |
#define P2ROUNDUP | ( | x, | |||
align | ) | (-(-(x) & -(align))) |
#define P2SAMEHIGHBIT | ( | x, | |||
y | ) | (((x) ^ (y)) < ((x) & (y))) |
#define RTLD_FIRST 0 |
#define THR_API |
#define THR_BOUND 1 |
#define THR_DAEMON 4 |
#define THR_DETACHED 2 |
#define THR_RETURN void * |
#define thr_self | ( | ) | pthread_self() |
#define thr_sigsetmask pthread_sigmask |
typedef pthread_cond_t cond_t |
typedef u_int64_t hrtime_t |
typedef long long longlong_t |
typedef pthread_mutex_t mutex_t |
typedef pthread_t thread_t |
typedef struct timespec timespec_t |
typedef struct timespec timestruc_t |
typedef uint32_t uint_t |
typedef unsigned long ulong_t |