Haka
|
Macros | |
#define | THREAD_CANCELED PTHREAD_CANCELED |
Typedefs | |
typedef pthread_t | thread_t |
Enumerations |
Functions | |
int | thread_get_packet_capture_cpu_count () |
void | thread_set_packet_capture_cpu_count (int count) |
int | thread_get_cpu_count () |
bool | thread_create (thread_t *thread, void *(*main)(void *), void *param) |
thread_t | thread_current () |
bool | thread_join (thread_t thread, void **ret) |
bool | thread_cancel (thread_t thread) |
int | thread_getid () |
void | thread_setid (int id) |
bool | thread_sigmask (int how, sigset_t *set, sigset_t *oldset) |
bool | thread_signal (thread_t thread, int sig) |
bool | thread_setcancelstate (bool enable) |
bool | thread_setcanceltype (enum thread_cancel_t type) |
void | thread_testcancel () |
void | thread_protect (void(*run)(void *), void *runarg, void(*finish)(void *), void *finisharg) |
thread_t | thread_main () |
thread_t | thread_self () |
bool | thread_equal (thread_t a, thread_t b) |
bool | thread_kill (thread_t thread, int sig) |
Thread functions
#define THREAD_CANCELED PTHREAD_CANCELED |
Thread return value when canceled.
typedef pthread_t thread_t |
Opaque thread type.
enum thread_cancel_t |
thread_t thread_current | ( | ) |
Get the current thread.
int thread_get_cpu_count | ( | ) |
Get the number of CPUs.
int thread_get_packet_capture_cpu_count | ( | ) |
Get the number of thread to be used by the application for packet capture.
int thread_getid | ( | ) |
Get current thread id.
thread_t thread_main | ( | ) |
Get the main thread handle.
void thread_protect | ( | void(*)(void *) | run, |
void * | runarg, | ||
void(*)(void *) | finish, | ||
void * | finisharg | ||
) |
Run a function in protected mode. If a cancel is raised, then a cleanup function is called before leaving the thread.
thread_t thread_self | ( | ) |
Get the current thread.
void thread_set_packet_capture_cpu_count | ( | int | count | ) |
Set the number of thread to be used by the application for packet capture.
count | Number of thread to use for capture. |
bool thread_setcanceltype | ( | enum thread_cancel_t | type | ) |
Change thread cancel mode.
void thread_setid | ( | int | id | ) |
Set current thread id.
id | New thread identifier. |
bool thread_sigmask | ( | int | how, |
sigset_t * | set, | ||
sigset_t * | oldset | ||
) |
Set signal mask on a thread.
void thread_testcancel | ( | ) |
Check for cancel.