23 struct STRUprm const *prm_p;
24 struct STRUlog *log_p;
26 unsigned int tick = 0;
32 fprintf(stderr,
"---\n");
36 fprintf(stderr,
"pbank changed\n");
43 output = prm_p->pattern[prm_p->size - cnt];
44 fprintf(stderr,
"tick/cnt/output %02d/%d/%d\n",
50 log_p->output = output;
71 if (0 != pthread_attr_init(&attr)) {
72 perror(
"pthread_attr_init faild");
75 if (0 != pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)) {
76 perror(
"pthread_attr_setdetachstate faild");
79 if (0 != pthread_create(&thread, &attr,
runMockServer, NULL)) {
80 perror(
"pthread_create faild");
83 if (0 != pthread_attr_destroy(&attr)) {
84 perror(
"pthread_attr_destroy faild");
91 perror(
"Error message from perror()");
92 fprintf(stderr,
"errno: %d\n", errno);
94 fprintf(stderr,
"end\n");
static void * runMockServer(void *arg)
void hipcPosixUsocInit(struct HIPC_usoc *so_p, const int fdr, const int fdw)
Initializes a universal socket.
int hipcPosixReadReady(int fd)
Check a file descriptor is ready to read by using select(2) and returns the result of select(2)...
int hipcUsocReadReady(struct HIPC_usoc *so_p)
const void * hipcPbankGetReadOnlyPage(struct HIPC_pbank *const bank_p)
Gets a current read only page.
struct HIPC_queue hipcsvsRt_queue
void hipcQueuePush(struct HIPC_queue *const que_p)
Pushes an item and occupies a slot.
void hipcMain(struct HIPC_usoc *const so_p)
void * hipcQueueFull(struct HIPC_queue const *const que_p)
Returns an address of an empty slot if it exists.
struct HIPC_pbank hipcsvsRt_pbank
int hipcPbankSwitchAccept(struct HIPC_pbank *const bank_p)
Accepts a switching request and switches pages if switching is requested.