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
Usermode - Misc header changes
[tpg/acess2.git]
/
Usermode
/
Applications
/
axwin3_src
/
libaxwin3.so_src
/
msg.c
diff --git
a/Usermode/Applications/axwin3_src/libaxwin3.so_src/msg.c
b/Usermode/Applications/axwin3_src/libaxwin3.so_src/msg.c
index
c1d562f
..
2b50167
100644
(file)
--- a/
Usermode/Applications/axwin3_src/libaxwin3.so_src/msg.c
+++ b/
Usermode/Applications/axwin3_src/libaxwin3.so_src/msg.c
@@
-16,6
+16,7
@@
// === CONSTANTS ===
enum eConnectionType
{
// === CONSTANTS ===
enum eConnectionType
{
+ CONNTYPE_NONE,
CONNTYPE_SENDMESSAGE,
CONNTYPE_UDP,
CONNTYPE_TCP
CONNTYPE_SENDMESSAGE,
CONNTYPE_UDP,
CONNTYPE_TCP
@@
-121,12
+122,16
@@
tAxWin_IPCMessage *AxWin3_int_GetIPCMessage(void)
switch(giConnectionType)
{
case CONNTYPE_SENDMESSAGE:
switch(giConnectionType)
{
case CONNTYPE_SENDMESSAGE:
- // TODO: Less hack, I need a version of select for GetMessage etc
- if(SysGetMessage(NULL, NULL) == 0) sleep();
- while(SysGetMessage(NULL, NULL))
+ for( ;; )
{
pid_t tid;
{
pid_t tid;
- len = SysGetMessage(&tid, NULL);
+
+ // Wait for a message to arrive
+ while( !(len = SysGetMessage(&tid, NULL)) )
+ {
+ _SysWaitEvent(THREAD_EVENT_IPCMSG);
+ }
+
// Check if the message came from the server
if(tid != giConnectionNum)
{
// Check if the message came from the server
if(tid != giConnectionNum)
{
UCC
git Repository :: git.ucc.asn.au