blob: 2e72276872e93cbb89abe2336216e0b213292cc4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
#ifndef UI_IPC_H
#define UI_IPC_H 1
#include "status.h"
#include "config.h"
#define IPC_MQSIZ 128
enum UI_IPC_SEM {
SEM_UI = 0, /* TUI active? */
SEM_IN, /* FD input available? */
SEM_NUM
};
enum UI_IPC_MSQ {
MQ_PW = 0,
MQ_IF,
MSQ_NUM
};
int
ui_ipc_init(int is_master);
void
ui_ipc_free(int is_master);
int
ui_ipc_sempost(enum UI_IPC_SEM e_sp);
int
ui_ipc_semwait(enum UI_IPC_SEM e_sp);
int
ui_ipc_semtrywait(enum UI_IPC_SEM e_sp);
int
ui_ipc_getvalue(enum UI_IPC_SEM e_sp);
int
ui_ipc_semtimedwait(enum UI_IPC_SEM e_sp, time_t tmout);
int
ui_ipc_msgsend(enum UI_IPC_MSQ e_mq, const char *msg_ptr);
ssize_t
ui_ipc_msgrecv(enum UI_IPC_MSQ e_mq, char *msg_ptr, time_t tmout);
long
ui_ipc_msgcount(enum UI_IPC_MSQ e_mq);
void
ui_ipc_msgclear(enum UI_IPC_MSQ e_mq);
#endif
|