#include <pthread.h>
#include <stdlib.h>
#include "types.h"
Go to the source code of this file.
|
#define | THREAD_T pthread_t |
|
#define | THREAD_ATTR_T pthread_attr_t |
|
#define | THREAD_ATTR_INIT(attr) pthread_attr_init(&attr) |
|
#define | THREAD_JOIN(tid) pthread_join(tid, (void**)NULL) |
|
#define | THREAD_CREATE(tid, attr, fn, arg) |
|
#define | THREAD_LOCAL_T pthread_key_t |
|
#define | THREAD_LOCAL_INIT(key) pthread_key_create(&key, NULL) |
|
#define | THREAD_LOCAL_SET(key, val) pthread_setspecific(key, (void*)(val)) |
|
#define | THREAD_LOCAL_GET(key) pthread_getspecific(key) |
|
#define | THREAD_MUTEX_T pthread_mutex_t |
|
#define | THREAD_MUTEX_INIT(lock) pthread_mutex_init(&(lock), NULL) |
|
#define | THREAD_MUTEX_LOCK(lock) pthread_mutex_lock(&(lock)) |
|
#define | THREAD_MUTEX_UNLOCK(lock) pthread_mutex_unlock(&(lock)) |
|
#define | THREAD_COND_T pthread_cond_t |
|
#define | THREAD_COND_INIT(cond) pthread_cond_init(&(cond), NULL) |
|
#define | THREAD_COND_SIGNAL(cond) pthread_cond_signal(&(cond)) |
|
#define | THREAD_COND_BROADCAST(cond) pthread_cond_broadcast(&(cond)) |
|
#define | THREAD_COND_WAIT(cond, lock) pthread_cond_wait(&(cond), &(lock)) |
|
#define | THREAD_BARRIER_T barrier_t |
|
#define | THREAD_BARRIER_ALLOC(N) barrier_alloc() |
|
#define | THREAD_BARRIER_INIT(bar, N) barrier_init(bar, N) |
|
#define | THREAD_BARRIER(bar, tid) barrier_cross(bar) |
|
#define | THREAD_BARRIER_FREE(bar) barrier_free(bar) |
|
#define THREAD_ATTR_INIT |
( |
|
attr | ) |
pthread_attr_init(&attr) |
#define THREAD_ATTR_T pthread_attr_t |
#define THREAD_COND_BROADCAST |
( |
|
cond | ) |
pthread_cond_broadcast(&(cond)) |
#define THREAD_COND_INIT |
( |
|
cond | ) |
pthread_cond_init(&(cond), NULL) |
#define THREAD_COND_SIGNAL |
( |
|
cond | ) |
pthread_cond_signal(&(cond)) |
#define THREAD_COND_T pthread_cond_t |
#define THREAD_COND_WAIT |
( |
|
cond, |
|
|
|
lock |
|
) |
| pthread_cond_wait(&(cond), &(lock)) |
#define THREAD_CREATE |
( |
|
tid, |
|
|
|
attr, |
|
|
|
fn, |
|
|
|
arg |
|
) |
| |
Value:pthread_create(&(tid), \
&(attr), \
(void* (*)(void*))(fn), \
Definition: intruder.c:122
#define THREAD_JOIN |
( |
|
tid | ) |
pthread_join(tid, (void**)NULL) |
#define THREAD_LOCAL_GET |
( |
|
key | ) |
pthread_getspecific(key) |
#define THREAD_LOCAL_INIT |
( |
|
key | ) |
pthread_key_create(&key, NULL) |
#define THREAD_LOCAL_SET |
( |
|
key, |
|
|
|
val |
|
) |
| pthread_setspecific(key, (void*)(val)) |
#define THREAD_LOCAL_T pthread_key_t |
#define THREAD_MUTEX_INIT |
( |
|
lock | ) |
pthread_mutex_init(&(lock), NULL) |
#define THREAD_MUTEX_LOCK |
( |
|
lock | ) |
pthread_mutex_lock(&(lock)) |
#define THREAD_MUTEX_T pthread_mutex_t |
#define THREAD_MUTEX_UNLOCK |
( |
|
lock | ) |
pthread_mutex_unlock(&(lock)) |
#define THREAD_T pthread_t |
void thread_barrier_wait |
( |
| ) |
|
long thread_getNumThread |
( |
| ) |
|
void thread_start |
( |
void(*)(void *) |
funcPtr, |
|
|
void * |
argPtr |
|
) |
| |
void thread_startup |
( |
long |
numThread | ) |
|