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
Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[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
3b6a3ba
..
17d089f
100644
(file)
--- a/
Usermode/Applications/axwin3_src/libaxwin3.so_src/msg.c
+++ b/
Usermode/Applications/axwin3_src/libaxwin3.so_src/msg.c
@@
-11,6
+11,7
@@
#include <stdlib.h>
#include <ipcmessages.h> // AxWin3 common
#include "include/internal.h"
#include <stdlib.h>
#include <ipcmessages.h> // AxWin3 common
#include "include/internal.h"
+#include "include/ipc.h"
// === CONSTANTS ===
enum eConnectionType
// === CONSTANTS ===
enum eConnectionType
@@
-120,8
+121,7
@@
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();
+ _SysWaitEvent(THREAD_EVENT_IPCMSG);
while(SysGetMessage(NULL, NULL))
{
pid_t tid;
while(SysGetMessage(NULL, NULL))
{
pid_t tid;
@@
-164,3
+164,15
@@
tAxWin_IPCMessage *AxWin3_int_GetIPCMessage(void)
return ret;
}
return ret;
}
+tAxWin_IPCMessage *AxWin3_int_WaitIPCMessage(int WantedID)
+{
+ tAxWin_IPCMessage *msg;
+ for(;;)
+ {
+ msg = AxWin3_int_GetIPCMessage();
+ if(msg->ID == WantedID) return msg;
+ AxWin3_int_HandleMessage( msg );
+ free(msg);
+ }
+}
+
UCC
git Repository :: git.ucc.asn.au