Veritable Lasagna
An Allocator & Data Structure Library for C.
Loading...
Searching...
No Matches
vl_thread.h
Go to the documentation of this file.
1#ifndef VL_THREAD_H
2#define VL_THREAD_H
3
4#include "vl_numtypes.h"
5
6#ifndef VL_THREAD_LOCAL
7#define VL_THREAD_LOCAL _Thread_local
8#endif
9
10#ifndef VL_THREAD_NULL
11#define VL_THREAD_NULL 0
12#endif
13
15typedef void (*vl_thread_proc)(void* usr);
16
25
34void vlThreadDelete(vl_thread thread);
35
44
53
59
65
70void vlThreadSleep(vl_ularge_t milliseconds);
71
76void vlThreadExit();
77
78#endif //VL_THREAD_H
VL_UPTR_T vl_uintptr_t
Unsigned integer type suitable for expressing memory addresses.
Definition vl_numtypes.h:101
VL_UINT_T vl_uint_t
Standard unsigned integer type.
Definition vl_numtypes.h:96
VL_BOOL_T vl_bool_t
Definition vl_numtypes.h:128
VL_ULARGE_T vl_ularge_t
Largest available unsigned integer type.
Definition vl_numtypes.h:74
vl_thread vlThreadCurrent()
Gets the current thread.
Definition vl_thread_pthread.c:148
vl_bool_t vlThreadJoinTimeout(vl_thread thread, vl_uint_t milliseconds)
Attempts to join the specified thread until a maximum amount of time has passed.
Definition vl_thread_pthread.c:109
void(* vl_thread_proc)(void *usr)
Definition vl_thread.h:15
vl_bool_t vlThreadJoin(vl_thread thread)
Joins the specified thread, halting the calling thread until the specified thread exits.
Definition vl_thread_pthread.c:98
void vlThreadSleep(vl_ularge_t milliseconds)
Sleeps the current thread a specified total number of milliseconds.
Definition vl_thread_pthread.c:163
void vlThreadDelete(vl_thread thread)
Deletes the specified thread.
Definition vl_thread_pthread.c:87
vl_thread vlThreadNew(vl_thread_proc, void *userArg)
Creates and begins executing a new thread.
Definition vl_thread_pthread.c:56
void vlThreadExit()
Exits the calling thread.
Definition vl_thread_pthread.c:167
vl_bool_t vlThreadYield()
Yields the execution of the current thread, allowing another thread to take the remainder of its time...
Definition vl_thread_pthread.c:159
vl_uintptr_t vl_thread
Definition vl_thread.h:14