git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mental note, adding resources is a good idea
[tpg/acess2.git]
/
Usermode
/
Applications
/
axwin2_src
/
WM
/
messages.c
diff --git
a/Usermode/Applications/axwin2_src/WM/messages.c
b/Usermode/Applications/axwin2_src/WM/messages.c
index
f10e6bb
..
92137f0
100644
(file)
--- a/
Usermode/Applications/axwin2_src/WM/messages.c
+++ b/
Usermode/Applications/axwin2_src/WM/messages.c
@@
-22,13
+22,13
@@
void Messages_Handle(tAxWin_Message *Msg, tMessages_Handle_Callback *Respond, in
void Messages_PollIPC()
{
int len;
void Messages_PollIPC()
{
int len;
-
int
tid = 0;
+
pid_t
tid = 0;
char staticBuf[STATICBUF_SIZE];
tAxWin_Message *msg;
// Wait for a message
char staticBuf[STATICBUF_SIZE];
tAxWin_Message *msg;
// Wait for a message
- while( (len = SysGetMessage(&tid, NULL)) )
-
yield
();
+ while( (len = SysGetMessage(&tid, NULL))
== 0
)
+
sleep
();
// Allocate the space for it
if( len <= STATICBUF_SIZE )
// Allocate the space for it
if( len <= STATICBUF_SIZE )
@@
-60,13
+60,19
@@
void Messages_Handle(tAxWin_Message *Msg, tMessages_Handle_Callback *Respond, in
{
switch(Msg->ID)
{
{
switch(Msg->ID)
{
- case MSG_REQ_PING:
- Msg->ID = MSG_RSP_PONG;
- Respond(ID, sizeof(Msg->ID), Msg);
+ #if 0
+ case MSG_SREQ_PING:
+ Msg->ID = MSG_SRSP_VERSION;
+ Msg->Size = 2;
+ Msg->Data[0] = 0;
+ Msg->Data[1] = 1;
+ *(uint16_t*)&Msg->Data[2] = -1;
+ Messages_RespondIPC(ID, sizeof(Msg->ID), Msg);
break;
break;
+ #endif
default:
default:
- fprintf(stderr, "WARNING: Unknown message %i from %i (%p)\n",
-
Msg->ID, ID, Respond);
+ fprintf(stderr, "WARNING: Unknown message %i from %i (%p)\n",
Msg->ID, ID, Respond);
+
_SysDebug("WARNING: Unknown message %i from %i (%p)\n",
Msg->ID, ID, Respond);
break;
}
}
break;
}
}
UCC
git Repository :: git.ucc.asn.au