fluke_error_t fluke_task_create_hash( fluke_thread_t *new_task, integer_t *hash);
Creates a new empty task, with the specified hash value. The task is 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.On a call, hash is a pointer to the hash value to set. If the pointer or the value is zero, the implementation will choose a default value. On a successful return, a non-zero pointer will contain the hash value set.
- 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.
- hash
- On entry, a pointer to the desired hash value to set. On return, the hash value used.
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