fluke_error_t fluke_task_create( fluke_task_t *new_task);
Creates a new empty task, initially devoid of memory mappings or threads. Some memory must be mapped into the task, and at least one thread must be created in the task before the task becomes useful.The task's hash value will be set to an implementation-specific value. To set a specific hash value use fluke_task_create_hash.
- new_task
- A pointer to the address in the current task's address space at which to create the new task object. There must be no existing Fluke objects at this location; otherwise the results are undefined.
If any of the following errors is detected, the appropriate error code is returned: All of these have an implicit FLUKE_ prefix.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.
- NO_MEMORY
- Insufficient resources were available.
- OBJECT_EXISTS
- An object already exists at the location pointed to by new_task.
- NOT_ALIGNED
- new_task is not properly aligned for a task object.
fluke_thread_create, fluke_mapping_create, fluke_task_create_hash