8 #include "CFGrt_scfg.h"
11 #define PBANK_PAGE_SIZE sizeof(struct STRUprm)
12 #define QUEUE_ITEM_SIZE sizeof(struct STRUlog)
13 #define QUEUE_N_SLOT 4
20 static struct STRUprm bufprm[2];
21 static struct STRUlog buflog[QUEUE_N_SLOT];
35 const struct STRUlog *log_p;
65 struct STRUprm *prm_p;
81 }
while (0 == rready);
130 if (PTRN_SIZE_MAX < prm_p->size) {
134 for (i = 0; i < prm_p->size; ++i) {
135 if (1 < prm_p->pattern[i]) {
137 "1 < prm_p->pattern[i]");
enum HIPC_errno hipcUsocAcceptSimple(struct HIPC_usoc *const so_p, const struct HIPC_scfg *const cfg_p)
Accepts a HIPC session of cfg_p.
void * hipcPbankGetWritablePage(struct HIPC_pbank *const bank_p)
Gets a current writable page.
enum HIPC_errno hipcUsocRead(struct HIPC_usoc *so_p, void *buf, const size_t size)
Reads exactly size bytes from so_p.
enum HIPC_errno hipcGenmdSuccessToGet(hipc_msgd *const mds_p, hipc_msgd const *const mdr_p, void *const stru_p, const size_t stru_size)
Initializes mds_p as a response to mdr_p whose type must be GET.
enum HIPC_errno hipcPbankSwitchRequest(struct HIPC_pbank *const bank_p)
Requests to switch pages.
enum HIPC_errno hipcsvsRtRun(struct HIPC_usoc *const so_p, hipc_msgd *const mdq_p)
enum HIPC_errno hipcUsocWriteMsgd(struct HIPC_usoc *const so_p, hipc_msgd const *const md_p)
Writes md_p to so_p.
enum HIPC_errno hipcUsocWrite(struct HIPC_usoc *so_p, const void *buf, const size_t size)
Writes exactly size bytes to so_p.
void hipcQueueInit(struct HIPC_queue *const que_p, void *const buf_p, const size_t item_size, const size_t n_slot)
Initializes a queue.
unsigned char hipcMsgdStruno(hipc_msgd const *const md_p)
Returns structure number of a HIPC message data.
enum HIPC_errno hipcMsgdSetBdyForPut(hipc_msgd *const mdr_p, void *const stru_p, const size_t stru_size)
Sets a body to a HIPC message data that contains a header of a PUT message.
void hipcQueuePop(struct HIPC_queue *const que_p)
Pops an item and releases a slot.
unsigned char hipcMsgdBdySize(hipc_msgd const *const md_p)
Returns body size of a HIPC message data.
#define hipcGenmdQuit(md_p, hipc_errno, errdtlstr)
Initializes a HIPC message data as a QUIT message.
#define hipcGenmdSuccess(md_p)
Initializes a HIPC message data as a SUCCESS message.
struct HIPC_queue hipcsvsRt_queue
enum HIPC_pbank_stat hipcPbankGetStat(struct HIPC_pbank *const bank_p)
Gets current status of a bank.
int hipcUsocReadReady(struct HIPC_usoc *so_p)
void hipcPbankInit(struct HIPC_pbank *const bank_p, void *const buf_p, const size_t page_size)
Initializes a parameter bank.
static enum HIPC_errno send_cast(struct HIPC_usoc *const so_p)
#define hipcMsgdBdyPtr(md_p)
Returns a pointer to a body of a HIPC message data.
unsigned char hipcMsgdType(hipc_msgd const *const md_p)
Returns type of a HIPC message data.
void * hipcQueueEmpty(struct HIPC_queue *const que_p)
Returns an address of the head item if it exists.
#define hipcMsgdHdrPtr(md_p)
Returns a pointer to a header of a HIPC message data.
enum HIPC_errno hipcPbankSwitchComplete(struct HIPC_pbank *const bank_p)
Makes both pages have the same latest contents and completes the switching.
struct HIPC_pbank hipcsvsRt_pbank
void hipcMain(struct HIPC_usoc *const so_p)