version 1.1, 2012/02/21 23:32:47
|
version 1.1.1.3, 2021/03/17 00:39:23
|
Line 28
|
Line 28
|
}; |
}; |
typedef struct mpmsg *Msg; |
typedef struct mpmsg *Msg; |
|
|
#define MSG_QUEUE_LEN 8192 | static struct mpmsg msgqueue[MSG_QUEUE_LEN]; |
#define MSG_QUEUE_MASK 0x1FFF | static int msgqueueh = 0; |
| static int msgqueuet = 0; |
struct mpmsg msgqueue[MSG_QUEUE_LEN]; | |
int msgqueueh = 0; | |
int msgqueuet = 0; | |
#define QUEUELEN() ((msgqueueh >= msgqueuet)? \ |
#define QUEUELEN() ((msgqueueh >= msgqueuet)? \ |
(msgqueueh - msgqueuet):(msgqueueh + MSG_QUEUE_LEN - msgqueuet)) |
(msgqueueh - msgqueuet):(msgqueueh + MSG_QUEUE_LEN - msgqueuet)) |
|
|
int msgpipe[2]; | static int msgpipe[2]; |
int msgpipesent = 0; | static int msgpipesent = 0; |
EventRef msgevent; | static EventRef msgevent; |
|
|
/* |
/* |
|
* GLOBAL VARIABLES |
|
*/ |
|
|
|
int gQThresMin = 64; |
|
int gQThresMax = 256; |
|
int gQThresDiff = 256 - 64; |
|
|
|
/* |
* INTERNAL FUNCTIONS |
* INTERNAL FUNCTIONS |
*/ |
*/ |
|
|
Line 98 static void
|
Line 103 static void
|
MsgEvent(int type, void *cookie) |
MsgEvent(int type, void *cookie) |
{ |
{ |
char buf[16]; |
char buf[16]; |
|
|
|
(void)type; |
|
(void)cookie; |
/* flush signaling pipe */ |
/* flush signaling pipe */ |
msgpipesent = 0; |
msgpipesent = 0; |
while (read(msgpipe[PIPE_READ], buf, sizeof(buf)) == sizeof(buf)); |
while (read(msgpipe[PIPE_READ], buf, sizeof(buf)) == sizeof(buf)); |