fluke_error_t fluke_ipc_call(fluke_ref_t *destination, fluke_ipc_params_t *ipc_params);
This operation makes a synchronous IPC invocation to the port referred to by the destination port reference. A message is sent to the server, and the client thread waits until a reply is received or an error is detected. The request may be delivered to the server multiple times due to message retransmission and other temporary conditions. If the request is serviced multiple times, and the server replies to each request, which reply the client actually receives is undefined. There are no guarantees about message ordering. In some Fluke implementations it is possible for messages to arrive at the server in a different order from which they were sent. There may be architecture-specific restrictions on buffer alignment, and padding may be added to request and reply messages in transit.If the client attempts to send more data or references than the server has allocated buffers for, the request will be silently truncated. Likewise, if the server reply exceeds the buffers allocated by the client in ipc_params, the reply will be truncated.
- destination
- A pointer to a port reference indicating the port to invoke.
- ipc_params
- A pointer to a structure describing data and references to send, and the buffers and references to receive the reply into. Only the receive parameter fields are modified by the call.
Returns one of the following codes: All of these have an implicit FLUKE_ prefix.
- SUCCESS
- A connection was established with a server thread, all data indicated by the send parameters in ipc_params was sent (or as much as the receiver had buffers allocated for), and a reply was received.
- IPC_CONNECT_INVALID_DEST
- The IPC target referenced by destination is invalid, e.g. because the port it refers to was destroyed or the server task was terminated.
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
- No active object was found at destination. A pointer in either the ipc_params send or receive reference array does not refer to an active object.
- NOT_REF
- The object at destination is not a reference object. An object in either the ipc_params send or receive reference array is not a reference object.
- NOT_PORT_REF
- The object at destination is a reference object, but not a reference to a port.
- INVALID_OBJECT
- The state of the object at destination is invalid or the state of an object in either the ipc_params send or receive reference array is invalid.
- BUFFER_TOO_SMALL
- The initial send data was smaller than FLUKE_MIN_MSG_SIZE.
- BUFFER_UNALIGNED
- A message buffer was not aligned properly according to the architecture-specific requirements.
fluke_ipc_wait, fluke_ipc_reply