next up previous contents
Next: 2.16 fluke_thread_reference: associates a Up: 2 Thread Previous: 2.14 fluke_thread_interrupt: interrupt another

2.15 fluke_thread_move: move a thread object from one location to another

SYNOPSIS

void fluke_thread_move(fluke_thread_t *old_addr, fluke_thread_t *new_addr);

DESCRIPTION

Moves the specified active thread object from one location in the caller's address space to another. The caller must ensure that the target thread is not currently running; otherwise the results are undefined. The memory addressed by new_addr must not already contain any active Fluke objects. On return, the thread object will reside at new_addr and the memory left behind at old_addr will have undefined contents.

PARAMETERS

old_addr
The address of the thread object to move.
new_addr
The location in memory to which the thread is to be moved.

ERRORS

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_OBJECT
old_addr does not point to an active object.
NOT_THREAD
The object pointed to by old_addr is not a thread object.
INVALID_OBJECT
The state of the thread object has become invalid.
CURRENT_THREAD
A thread attempted to move itself.
OBJECT_EXISTS
An object already exists at the location pointed to by new_addr.
NOT_ALIGNED
new_addr is not properly aligned for a thread object.



Utah Flux Research Group