void fluke_thread_set_client(fluke_thread_t *cur_thread, fluke_ref_t *client_ref, unsigned flags);
Note: this is a preliminary interface subject to change at the whim of anyone who cares.Changes the current thread's client reliable-IPC link and associated flags. Client_ref is a reference for the thread (if any) with which the calling thread will be engaged in a reliable-IPC as the server; i.e. it is a reference to the client-side of the connection.
Flags should either be FLUKE_THREAD_SERVER_SENDER if the calling thread is to be the current sender on the connection, or zero if the referenced client is to be the sender.
Together with fluke_thread_get_client, this call can be used to save and restore the state of the client connection state allowing a thread to be engaged in multiple client IPC calls.
- cur_thread
- A pointer to the thread object representing the current thread, e.g. as returned by fluke_thread_self.
- client_ref
- The address of a thread reference object to be copied into the thread's client reference slot.
- flags
- Flags related to the client connection to store into the threads IPC flag state.
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.
- NOT_CURRENT_THREAD
- Thread specified was not the current thread.
- NO_OBJECT
- client_ref does not point to an active object.
- NOT_REF
- The object at client_ref is not a reference object.
- NOT_THREAD_REF
- The object at client_ref is a reference object, but not a reference to a thread.
fluke_thread_get_client