[Amizilla-cvs] amizilla/nsprpub/pr/src/md/amiga atime.c,1.9,1.10
Brought to you by:
maxlarsson
From: Jeff S. <jsh...@us...> - 2004-12-29 00:13:02
|
Update of /cvsroot/amizilla/amizilla/nsprpub/pr/src/md/amiga In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8560 Modified Files: atime.c Log Message: _PR_Sleep -> _PR_MD_Sleep to be consistent. Updated PR_MD_Wait calls. Always WaitIO(). Fixed PR_Now(). Index: atime.c =================================================================== RCS file: /cvsroot/amizilla/amizilla/nsprpub/pr/src/md/amiga/atime.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** atime.c 14 Oct 2004 22:50:15 -0000 1.9 --- atime.c 29 Dec 2004 00:12:51 -0000 1.10 *************** *** 39,43 **** #define DAYS_SINCE_1970 (8*365+2) ! static _PR_MD_Timeout _PR_Sleep(PRIntervalTime timeout) { PRThread *thread = PR_GetCurrentThread(); --- 39,43 ---- #define DAYS_SINCE_1970 (8*365+2) ! _PR_MD_Timeout _PR_MD_Sleep(PRIntervalTime timeout) { PRThread *thread = PR_GetCurrentThread(); *************** *** 67,71 **** thread->sleepRequestUsed = PR_TRUE; SendIO((struct IORequest *)timerIO); ! _PR_MD_Wait(thread, PR_TRUE); if (_PR_PENDING_INTERRUPT(thread)) { --- 67,74 ---- thread->sleepRequestUsed = PR_TRUE; SendIO((struct IORequest *)timerIO); ! /* Don't clear the signal on Waiting since I could get notified before ! * I clear it (and become livelocked) ! */ ! _PR_MD_Wait(thread, PR_TRUE, PR_FALSE); if (_PR_PENDING_INTERRUPT(thread)) { *************** *** 84,89 **** if (!(CheckIO((struct IORequest *)timerIO))) { AbortIO((struct IORequest *)timerIO); - WaitIO((struct IORequest *)timerIO); } thread->io_pending = PR_FALSE; done: --- 87,93 ---- if (!(CheckIO((struct IORequest *)timerIO))) { AbortIO((struct IORequest *)timerIO); } + WaitIO((struct IORequest *)timerIO); + thread->io_pending = PR_FALSE; done: *************** *** 92,96 **** PR_IMPLEMENT(PRStatus) PR_Sleep(PRIntervalTime timeout) { ! _PR_MD_Timeout retval = _PR_Sleep(timeout); return (retval == SUCCESS || retval == TIMEDOUT) ? PR_SUCCESS : PR_FAILURE; } --- 96,100 ---- PR_IMPLEMENT(PRStatus) PR_Sleep(PRIntervalTime timeout) { ! _PR_MD_Timeout retval = _PR_MD_Sleep(timeout); return (retval == SUCCESS || retval == TIMEDOUT) ? PR_SUCCESS : PR_FAILURE; } *************** *** 131,141 **** */ LL_I2L(secs, tv.tv_sec); ! LL_I2L(mil, 1000000); LL_MUL(secs, secs, mil); LL_I2L(mil, tv.tv_usec); LL_ADD(retval, secs, mil); LL_I2L(offset, DAYS_SINCE_1970); ! LL_MUL(offset, offset, 86400); ! LL_MUL(offset, offset, 1000000); LL_ADD(retval, retval, offset); CloseDevice((struct IORequest *)tr); --- 135,147 ---- */ LL_I2L(secs, tv.tv_sec); ! LL_I2L(mil, PR_USEC_PER_SEC); LL_MUL(secs, secs, mil); LL_I2L(mil, tv.tv_usec); LL_ADD(retval, secs, mil); LL_I2L(offset, DAYS_SINCE_1970); ! LL_I2L(mil, 86400); ! LL_MUL(offset, offset, mil); ! LL_I2L(mil, PR_USEC_PER_SEC); ! LL_MUL(offset, offset, mil); LL_ADD(retval, retval, offset); CloseDevice((struct IORequest *)tr); |