Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
 4.1.99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
call.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  ironside_call_buf
 Message buffer. More...
 

Macros

#define NRF_IRONSIDE_CALL_NUM_ARGS   7
 Maximum number of arguments to an IRONside call.
 
Message buffer status codes.
#define IRONSIDE_CALL_STATUS_IDLE   0
 Buffer is idle and available for allocation.
 
#define IRONSIDE_CALL_STATUS_RSP_SUCCESS   1
 Request was processed successfully by the server.
 
#define IRONSIDE_CALL_STATUS_RSP_ERR_UNKNOWN_STATUS   2
 Request status code is unknown.
 
#define IRONSIDE_CALL_STATUS_RSP_ERR_EXPIRED_STATUS   3
 Request status code is no longer supported.
 
#define IRONSIDE_CALL_STATUS_RSP_ERR_UNKNOWN_ID   4
 Operation identifier is unknown.
 
#define IRONSIDE_CALL_STATUS_RSP_ERR_EXPIRED_ID   5
 Operation identifier is no longer supported.
 
#define IRONSIDE_CALL_STATUS_REQ   6
 Buffer contains a request from the client.
 

Functions

struct ironside_call_bufironside_call_alloc (void)
 Allocate memory for an IRONside call.
 
void ironside_call_dispatch (struct ironside_call_buf *buf)
 Dispatch an IRONside call.
 
void ironside_call_release (struct ironside_call_buf *buf)
 Release an IRONside call buffer.
 

Macro Definition Documentation

◆ IRONSIDE_CALL_STATUS_IDLE

#define IRONSIDE_CALL_STATUS_IDLE   0

Buffer is idle and available for allocation.

◆ IRONSIDE_CALL_STATUS_REQ

#define IRONSIDE_CALL_STATUS_REQ   6

Buffer contains a request from the client.

◆ IRONSIDE_CALL_STATUS_RSP_ERR_EXPIRED_ID

#define IRONSIDE_CALL_STATUS_RSP_ERR_EXPIRED_ID   5

Operation identifier is no longer supported.

◆ IRONSIDE_CALL_STATUS_RSP_ERR_EXPIRED_STATUS

#define IRONSIDE_CALL_STATUS_RSP_ERR_EXPIRED_STATUS   3

Request status code is no longer supported.

◆ IRONSIDE_CALL_STATUS_RSP_ERR_UNKNOWN_ID

#define IRONSIDE_CALL_STATUS_RSP_ERR_UNKNOWN_ID   4

Operation identifier is unknown.

◆ IRONSIDE_CALL_STATUS_RSP_ERR_UNKNOWN_STATUS

#define IRONSIDE_CALL_STATUS_RSP_ERR_UNKNOWN_STATUS   2

Request status code is unknown.

◆ IRONSIDE_CALL_STATUS_RSP_SUCCESS

#define IRONSIDE_CALL_STATUS_RSP_SUCCESS   1

Request was processed successfully by the server.

◆ NRF_IRONSIDE_CALL_NUM_ARGS

#define NRF_IRONSIDE_CALL_NUM_ARGS   7

Maximum number of arguments to an IRONside call.

This is chosen so that the containing message buffer size is minimal but cache line aligned.

Function Documentation

◆ ironside_call_alloc()

struct ironside_call_buf * ironside_call_alloc ( void )

Allocate memory for an IRONside call.

This function will block when no buffers are available, until one is released by another thread on the client side.

Returns
Pointer to the allocated buffer.

◆ ironside_call_dispatch()

void ironside_call_dispatch ( struct ironside_call_buf * buf)

Dispatch an IRONside call.

This function will block until a response is received from the server.

Parameters
bufBuffer returned by ironside_call_alloc(). It should be populated with request data before calling this function. Upon returning, this data will have been replaced by response data.

◆ ironside_call_release()

void ironside_call_release ( struct ironside_call_buf * buf)

Release an IRONside call buffer.

This function must be called after processing the response.

Parameters
bufBuffer used to perform the call.