#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "errno.h"
#include <pthread.h>
#include <limits.h>
#include <math.h>
#include <signal.h>
#include <time.h>
#include <stdarg.h>
#include <malloc.h>
#include <semaphore.h>
#include <assert.h>
#include "wmp_config.h"
#include "../../../core/include/wmp_utils.h"
Go to the source code of this file.
Defines | |
#define | ASSERT(p) assert(p); |
#define | ATOF(src, dst) *dst = atof(src) |
#define | DEBUG(p) |
#define | DO_DIV64(n, b) ((n)/(b)) |
#define | EXIT(val) exit(val) |
#define | EXPORT_SYMBOLS() |
#define | FLOAT_OPS_END() |
#define | FLOAT_OPS_START() |
#define | FREE(p) free(p) |
#define | GETNSTIMEOFDAY(p) clock_gettime(CLOCK_REALTIME, p) |
#define | MALLOC(p) malloc(p) |
#define | MUTEX pthread_mutex_t |
#define | MUTEX_INIT(m) pthread_mutex_init(m,0); |
#define | MUTEX_SIGNAL(m) pthread_mutex_unlock(&m) |
#define | MUTEX_WAIT(m) pthread_mutex_lock(&m) |
#define | MUTEX_WAIT_SPIN(m) pthread_mutex_lock(&m) |
#define | SEM_GET_COUNT(nMutex) ({int val; sem_getvalue(&nMutex, &val); val;}) |
#define | SEM_INIT(p, q, r) sem_init(p,q,r) |
#define | SEM_T sem_t |
#define | SIGNAL(nMutex) sem_post(&nMutex) |
#define | THREAD_CREATE(th_var, th_fun, name) pthread_create(&th_var, NULL, th_fun, NULL) |
#define | THREAD_SEM_INIT_LOCKED(p) pthread_mutex_init(p,0); pthread_mutex_lock(p); |
#define | THREAD_SEM_SIGNAL(p) pthread_mutex_unlock(p) |
#define | THREAD_SEM_T pthread_mutex_t |
#define | THREAD_SEM_WAIT(p) pthread_mutex_lock(p) |
#define | THREAD_SEM_WAIT_TIMED(nMutex, time) |
#define | THREAD_STOP(th_var) |
#define | THREAD_T(name) pthread_t name = 0 |
#define | WAIT(nMutex) sem_wait(&nMutex ) |
#define | WAIT_TIMED(nMutex, time) |
#define | WMP_DBG(output,...) |
#define | WMP_DEBUG(output,...) |
#define | WMP_DEBUG1(output,...) |
#define | WMP_ERROR(output,...) fprintf(output, __VA_ARGS__); |
#define | WMP_MSG(output,...) fprintf(output, __VA_ARGS__) |
Definition at line 99 of file linux_us/config/compiler.h.
Definition at line 110 of file linux_us/config/compiler.h.
Definition at line 120 of file linux_us/config/compiler.h.
Definition at line 106 of file linux_us/config/compiler.h.
Definition at line 108 of file linux_us/config/compiler.h.
#define EXPORT_SYMBOLS | ( | ) |
Definition at line 112 of file linux_us/config/compiler.h.
#define FLOAT_OPS_END | ( | ) |
Definition at line 104 of file linux_us/config/compiler.h.
#define FLOAT_OPS_START | ( | ) |
Definition at line 103 of file linux_us/config/compiler.h.
Definition at line 61 of file linux_us/config/compiler.h.
#define GETNSTIMEOFDAY | ( | p | ) | clock_gettime(CLOCK_REALTIME, p) |
Definition at line 101 of file linux_us/config/compiler.h.
Definition at line 60 of file linux_us/config/compiler.h.
#define MUTEX pthread_mutex_t |
Definition at line 76 of file linux_us/config/compiler.h.
#define MUTEX_INIT | ( | m | ) | pthread_mutex_init(m,0); |
Definition at line 77 of file linux_us/config/compiler.h.
#define MUTEX_SIGNAL | ( | m | ) | pthread_mutex_unlock(&m) |
Definition at line 80 of file linux_us/config/compiler.h.
#define MUTEX_WAIT | ( | m | ) | pthread_mutex_lock(&m) |
Definition at line 78 of file linux_us/config/compiler.h.
#define MUTEX_WAIT_SPIN | ( | m | ) | pthread_mutex_lock(&m) |
Definition at line 79 of file linux_us/config/compiler.h.
#define SEM_GET_COUNT | ( | nMutex | ) | ({int val; sem_getvalue(&nMutex, &val); val;}) |
Definition at line 74 of file linux_us/config/compiler.h.
Definition at line 64 of file linux_us/config/compiler.h.
#define SEM_T sem_t |
Definition at line 63 of file linux_us/config/compiler.h.
#define SIGNAL | ( | nMutex | ) | sem_post(&nMutex) |
Definition at line 73 of file linux_us/config/compiler.h.
#define THREAD_CREATE | ( | th_var, | |
th_fun, | |||
name | |||
) | pthread_create(&th_var, NULL, th_fun, NULL) |
Definition at line 84 of file linux_us/config/compiler.h.
#define THREAD_SEM_INIT_LOCKED | ( | p | ) | pthread_mutex_init(p,0); pthread_mutex_lock(p); |
Definition at line 88 of file linux_us/config/compiler.h.
#define THREAD_SEM_SIGNAL | ( | p | ) | pthread_mutex_unlock(p) |
Definition at line 97 of file linux_us/config/compiler.h.
#define THREAD_SEM_T pthread_mutex_t |
Definition at line 87 of file linux_us/config/compiler.h.
#define THREAD_SEM_WAIT | ( | p | ) | pthread_mutex_lock(p) |
Definition at line 89 of file linux_us/config/compiler.h.
#define THREAD_SEM_WAIT_TIMED | ( | nMutex, | |
time | |||
) |
({ \ struct timespec ts; \ clock_gettime(CLOCK_REALTIME,&ts); \ wmp_add_ms(&ts,time); \ pthread_mutex_timedlock(&nMutex, &ts); \ })
Definition at line 90 of file linux_us/config/compiler.h.
#define THREAD_STOP | ( | th_var | ) |
Definition at line 85 of file linux_us/config/compiler.h.
#define THREAD_T | ( | name | ) | pthread_t name = 0 |
Definition at line 83 of file linux_us/config/compiler.h.
#define WAIT | ( | nMutex | ) | sem_wait(&nMutex ) |
Definition at line 65 of file linux_us/config/compiler.h.
#define WAIT_TIMED | ( | nMutex, | |
time | |||
) |
({ \ struct timespec ts; \ clock_gettime(CLOCK_REALTIME,&ts); \ wmp_add_ms(&ts,time); \ sem_timedwait(&nMutex, &ts); \ })
Definition at line 66 of file linux_us/config/compiler.h.
#define WMP_DBG | ( | output, | |
... | |||
) |
Definition at line 123 of file linux_us/config/compiler.h.
#define WMP_DEBUG | ( | output, | |
... | |||
) |
Definition at line 121 of file linux_us/config/compiler.h.
#define WMP_DEBUG1 | ( | output, | |
... | |||
) |
Definition at line 122 of file linux_us/config/compiler.h.
#define WMP_ERROR | ( | output, | |
... | |||
) | fprintf(output, __VA_ARGS__); |
Definition at line 128 of file linux_us/config/compiler.h.
#define WMP_MSG | ( | output, | |
... | |||
) | fprintf(output, __VA_ARGS__) |
Definition at line 126 of file linux_us/config/compiler.h.