void Messages_PollIPC()
{
int len;
- int tid = 0;
+ pid_t tid = 0;
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 )
{
switch(Msg->ID)
{
+ #if 0
case MSG_SREQ_PING:
- Msg->ID = MSG_SRSP_PONG;
- Respond(ID, sizeof(Msg->ID), Msg);
+ 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;
+ #endif
default:
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);