next up previous contents
Next: 2.5 fluke_thread_create_hash: create a Up: 2 Thread Previous: 2.3 References

2.4 fluke_thread_create: create a new thread

SYNOPSIS

fluke_error_t fluke_thread_create( fluke_thread_t *new_thread);

DESCRIPTION

The fluke_thread_create operation creates a new thread. All of the new thread's references, such as its task and scheduler references, will initially be null. Thus, the new thread will not be able to run until its state is initialized using fluke_thread_set_state. The initial values of all other thread state, such as the thread's processor registers, are undefined.

The thread's hash value will be set to an implementation-specific value. To set a specific hash value use fluke_thread_create_hash.

PARAMETERS

new_thread
A pointer to the address in the current task's address space at which to create the new thread object.

ERRORS

If any of the following errors is detected, the appropriate error code is returned: All of these have an implicit FLUKE_ prefix.
NO_MEMORY
Insufficient resources were available.

If any of the following errors is detected by the Fluke implementation, it causes the current thread to take a synchronous exception with one of the following codes. All of these have an implicit FLUKE_INSANITY_ prefix.
OBJECT_EXISTS
An object already exists at the location pointed to by new_thread.
NOT_ALIGNED
new_thread is not properly aligned for a thread object.

RELATED INFORMATION

fluke_thread_set_state, fluke_thread_create_hash



Utah Flux Research Group