Generic Lightweight Thread (GLT) Library
2.5
A common API for Lightweight Thread solutions
|
Functions | |
GLT_ult * | glt_ult_malloc (int number_of_ult) |
ULT allocation. More... | |
GLT_tasklet * | glt_tasklet_malloc (int number_of_tasklets) |
ULT allocation. More... | |
void | glt_ult_create (void(*thread_func)(void *), void *arg, GLT_ult *new_ult) |
ULT creation. More... | |
void | glt_ult_create_to (void(*thread_func)(void *), void *arg, GLT_ult *new_ult, int dest) |
ULT creation in a given destination. More... | |
void | glt_tasklet_create (void(*thread_func)(void *), void *arg, GLT_tasklet *new_ult) |
Tasklet creation. More... | |
void | glt_tasklet_create_to (void(*thread_func)(void *), void *arg, GLT_tasklet *new_ult, int dest) |
Tasklet creation. More... | |
void | glt_yield () |
ULT yields to another ready ULT. More... | |
void | glt_yield_to (GLT_ult ult) |
ULT yields to an specific ULT. More... | |
void | glt_ult_join (GLT_ult *ult) |
Joins an specific ULT. More... | |
void | glt_tasklet_join (GLT_tasklet *tasklet) |
Joins an specific Tasklet. More... | |
void | glt_ult_get_id (GLT_ult_id *id, GLT_ult ult) |
Return the unique id of a ULT. More... | |
void | glt_workunit_get_thread_id (GLT_thread_id *id) |
Return the unique id of a thread. More... | |
void | glt_ult_migrate_self_to (GLT_thread_id id) |
Migrates the current ULT to another thread ready queue. More... | |
void | glt_ult_self (GLT_ult *ult) |
Obtains the current ULT handle. More... | |
void | glt_tasklet_self (GLT_tasklet *tasklet) |
Obtains the current Tasklet handle. More... | |
void | glt_ult_cancel (GLT_ult ult) |
Cancels an specific ULT. More... | |
void | glt_tasklet_cancel (GLT_tasklet tasklet) |
Cancels an specific Tasklet. More... | |
void | glt_ult_exit () |
Exits the current ULT. More... | |
These functions create, map, schedule, join, and execute work-units.
void glt_tasklet_cancel | ( | GLT_tasklet | tasklet | ) |
Cancels an specific Tasklet.
glt_tasklet_cancel()
cancels a given GLT_tasklet
.
[in] | tasklet | Handle to the target GLT_tasklet . |
void glt_tasklet_create | ( | void(*)(void *) | thread_func, |
void * | arg, | ||
GLT_tasklet * | new_ult | ||
) |
Tasklet creation.
glt_tasklet_create()
creates a GLT_tasklet
.
[in] | thread_func | Is the function pointer to be executed by the GLT_tasklet . |
[in] | arg | Are the arguments for thread_func. |
[out] | new_ult | Handle to a newly created GLT_tasklet . |
void glt_tasklet_create_to | ( | void(*)(void *) | thread_func, |
void * | arg, | ||
GLT_tasklet * | new_ult, | ||
int | dest | ||
) |
Tasklet creation.
glt_tasklet_create()
creates a GLT_tasklet
.
[in] | thread_func | Is the function pointer to be executed by the GLT_tasklet . |
[in] | arg | Are the arguments for thread_func. |
[out] | new_ult | Handle to a newly created GLT_tasklet . |
[in] | dest | Number of the GLT_thread that should execute the newly created GLT_tasklet . |
void glt_tasklet_join | ( | GLT_tasklet * | tasklet | ) |
Joins an specific Tasklet.
glt_tasklet_join()
joins a given GLT_tasklet
.
[in] | tasklet | Handle to the target GLT_tasklet . |
GLT_tasklet* glt_tasklet_malloc | ( | int | number_of_tasklets | ) |
ULT allocation.
glt_tasklet_malloc()
allocates memory for a given number of GLT_tasklet
.
[in] | number_of_tasklets | Indicates the total number of GLT_tasklets that needs to be allocated. |
void glt_tasklet_self | ( | GLT_tasklet * | tasklet | ) |
Obtains the current Tasklet handle.
glt_tasklet_self()
returns the current GLT_tasklet
handler.
[out] | tasklet | Handler of the the current GLT_tasklet . |
void glt_ult_cancel | ( | GLT_ult | ult | ) |
Cancels an specific ULT.
glt_ult_cancel()
cancels a given GLT_ult
.
[in] | ult | Handle to the target GLT_ult . |
void glt_ult_create | ( | void(*)(void *) | thread_func, |
void * | arg, | ||
GLT_ult * | new_ult | ||
) |
ULT creation.
glt_ult_create()
creates a GLT_ult
.
[in] | thread_func | Is the function pointer to be executed by the GLT_ult . |
[in] | arg | Are the arguments for thread_func. |
[out] | new_ult | Handle to a newly created GLT_ult . |
void glt_ult_create_to | ( | void(*)(void *) | thread_func, |
void * | arg, | ||
GLT_ult * | new_ult, | ||
int | dest | ||
) |
ULT creation in a given destination.
glt_ult_create_to()
creates a GLT_ult
in a particular destination.
[in] | thread_func | Is the function pointer to be executed by the GLT_ult . |
[in] | arg | Are the arguments for thread_func. |
[out] | new_ult | Handle to a newly created GLT_ult . |
[in] | dest | Number of the GLT_thread that should execute the newly created GLT_ult . |
void glt_ult_exit | ( | ) |
Exits the current ULT.
glt_ult_exit()
cancels the current GLT_ult
.
void glt_ult_get_id | ( | GLT_ult_id * | id, |
GLT_ult | ult | ||
) |
Return the unique id of a ULT.
glt_ult_get_id()
returns the id of a given GLT_ult
.
[in] | ult | Handle to the target GLT_ult . |
[out] | id | Identifier if the the target GLT_ult . |
void glt_ult_join | ( | GLT_ult * | ult | ) |
Joins an specific ULT.
glt_ult_join()
joins a given GLT_ult
.
[in] | ult | Handle to the target GLT_ult . |
GLT_ult* glt_ult_malloc | ( | int | number_of_ult | ) |
ULT allocation.
glt_ult_malloc()
allocates memory for a given number of GLT_ult
.
[in] | number_of_ult | Indicates the total number of GLT_ult that needs to be allocated. |
void glt_ult_migrate_self_to | ( | GLT_thread_id | id | ) |
Migrates the current ULT to another thread ready queue.
glt_ult_migrate_self_to()
moves the current GLT_ult
to another GLT_thread
ready queue.
[in] | The | identifier of the the GLT_thread destination. |
void glt_ult_self | ( | GLT_ult * | ult | ) |
Obtains the current ULT handle.
glt_ult_self()
returns the current GLT_ult
handler.
[out] | ult | Handler of the the current GLT_ult . |
void glt_workunit_get_thread_id | ( | GLT_thread_id * | id | ) |
Return the unique id of a thread.
glt_workunit_get_thread_id()
returns the id of the current GLT_thread
.
[out] | id | Identifier of the the current GLT_thread . |
void glt_yield | ( | ) |
ULT yields to another ready ULT.
glt_yield()
puts the current GLT_ult
in the ready queue and allows another ready GLT_ult
to be executed.
void glt_yield_to | ( | GLT_ult | ult | ) |
ULT yields to an specific ULT.
glt_yield_to()
puts the current GLT_ult
in the ready queue and allows an specific ready GLT_ult
to be executed.
[in] | ult | Handle to the target GLT_ult . |