diff options
Diffstat (limited to 'pr/include/md/_os2.h')
-rw-r--r-- | pr/include/md/_os2.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/pr/include/md/_os2.h b/pr/include/md/_os2.h index 70e8d112..c08202e9 100644 --- a/pr/include/md/_os2.h +++ b/pr/include/md/_os2.h @@ -251,7 +251,14 @@ extern PRInt32 _MD_CloseSocket(PRInt32 osfd); #define _MD_GETPEERNAME (_PR_MD_GETPEERNAME) #define _MD_GETSOCKOPT (_PR_MD_GETSOCKOPT) #define _MD_SETSOCKOPT (_PR_MD_SETSOCKOPT) + +#ifdef XP_OS2_EMX +extern PRInt32 _MD_SELECT(int nfds, fd_set *readfds, fd_set *writefds, + fd_set *exceptfds, struct timeval *timeout); +#else #define _MD_SELECT select +#endif + #define _MD_FSYNC _PR_MD_FSYNC #define _MD_SET_FD_INHERITABLE (_PR_MD_SET_FD_INHERITABLE) @@ -325,10 +332,10 @@ extern PRInt32 _MD_Accept(PRFileDesc *fd, PRNetAddr *raddr, PRUint32 *rlen, #define _PR_LOCK _MD_LOCK #define _PR_UNLOCK _MD_UNLOCK -#define _MD_NEW_LOCK(lock) (DosCreateMutexSem(0, &((lock)->mutex), 0, 0),(lock)->notified.length=0,(lock)->notified.link=NULL,PR_SUCCESS) -#define _MD_FREE_LOCK(lock) DosCloseMutexSem(((lock)->mutex)) -#define _MD_LOCK(lock) DosRequestMutexSem(((lock)->mutex), SEM_INDEFINITE_WAIT) -#define _MD_TEST_AND_LOCK(lock) (DosRequestMutexSem(((lock)->mutex), SEM_INDEFINITE_WAIT),PR_SUCCESS) +#define _MD_NEW_LOCK (_PR_MD_NEW_LOCK) +#define _MD_FREE_LOCK (_PR_MD_FREE_LOCK) +#define _MD_LOCK (_PR_MD_LOCK) +#define _MD_TEST_AND_LOCK (_PR_MD_TEST_AND_LOCK) #define _MD_UNLOCK (_PR_MD_UNLOCK) /* --- lock and cv waiting --- */ |