Some boring fixes (mainly protection against spurious wakeups from cond_wait)
[cacao.git] / threads / threadio.h
index ac939e5b3a8848c600bb0fe5de71041968a0bd56..e95dd08e0aa8faaa24874355397b8cee75415981 100644 (file)
@@ -6,7 +6,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#include "../global.h"
+#include "global.h"
 
 #ifdef USE_THREADS
 int threadedFileDescriptor(int fd);
@@ -22,6 +22,11 @@ int threadedSendto(int fd, void *buf, size_t len, int flags, struct sockaddr *ad
 #define threadedFileDescriptor(fd)
 #define threadedRead(fd,buf,len)          read(fd,buf,len)
 #define threadedWrite(fd,buf,len)         write(fd,buf,len)
+#define threadedSocket(af,type,proto)     socket(af,type,proto)
+#define threadedAccept(fd,addr,len)       accept(fd,addr,len)
+#define threadedRecvfrom(fd,buf,len,flags,addr,addrlen) recvfrom(fd,buf,len,flags,addr,addrlen)
+#define threadedSendto(fd,buf,len,flags,addr,addrlen) sendto(fd,buf,len,flags,addr,addrlen)
+#define threadedConnect(fd,addr,len)      connect(fd,addr,len)
 #endif