Changeset 102390 in vbox for trunk/src/libs/xpcom18a4/ipc/ipcd
- Timestamp:
- Nov 30, 2023 8:12:27 AM (17 months ago)
- svn:sync-xref-src-repo-rev:
- 160526
- Location:
- trunk/src/libs/xpcom18a4/ipc/ipcd
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/ipc/ipcd/client/public/ipcdclient.h
r102214 r102390 54 54 #include "ipcIClientObserver.h" 55 55 56 #include "prinrval.h"56 #include <iprt/types.h> 57 57 58 58 /* This API is only provided for the extensions compiled into the IPCDC … … 240 240 ipcIMessageObserver *aObserver = nsnull, 241 241 ipcIMessageObserver *aConsumer = nsnull, 242 PRIntervalTime aTimeout = PR_INTERVAL_NO_TIMEOUT242 RTMSINTERVAL aTimeout = RT_INDEFINITE_WAIT 243 243 ); 244 244 -
trunk/src/libs/xpcom18a4/ipc/ipcd/client/src/ipcService.cpp
r1 r102390 105 105 { 106 106 return IPC_WaitMessage(aSenderID, aTarget, aObserver, nsnull, 107 PR_MillisecondsToInterval(aTimeout));107 aTimeout); 108 108 } 109 109 -
trunk/src/libs/xpcom18a4/ipc/ipcd/client/src/ipcdclient.cpp
r102249 r102390 66 66 /* ------------------------------------------------------------------------- */ 67 67 68 #define IPC_REQUEST_TIMEOUT PR_SecondsToInterval(30)68 #define IPC_REQUEST_TIMEOUT (30 * RT_MS_1SEC) 69 69 70 70 /* ------------------------------------------------------------------------- */ … … 307 307 static nsresult 308 308 WaitTarget(const nsID &aTarget, 309 PRIntervalTimeaTimeout,309 RTMSINTERVAL aTimeout, 310 310 ipcMessage **aMsg, 311 311 ipcMessageSelector aSelector = nsnull, … … 323 323 PRBool isIPCMTarget = aTarget.Equals(IPCM_TARGET); 324 324 325 PRIntervalTime timeStart = PR_IntervalNow();326 PRIntervalTimetimeEnd;327 if (aTimeout == PR_INTERVAL_NO_TIMEOUT)325 uint64_t timeStart = RTTimeMilliTS(); 326 uint64_t timeEnd; 327 if (aTimeout == RT_INDEFINITE_WAIT) 328 328 timeEnd = aTimeout; 329 else if (aTimeout == PR_INTERVAL_NO_WAIT)329 else if (aTimeout == 0) 330 330 timeEnd = timeStart; 331 331 else … … 335 335 // if overflowed, then set to max value 336 336 if (timeEnd < timeStart) 337 timeEnd = PR_INTERVAL_NO_TIMEOUT;337 timeEnd = RT_INDEFINITE_WAIT; 338 338 } 339 339 … … 440 440 #endif /* VBOX */ 441 441 442 PRIntervalTime t = PR_IntervalNow();442 uint64_t t = RTTimeMilliTS(); 443 443 if (t > timeEnd) // check if timeout has expired 444 444 { … … 1081 1081 ipcIMessageObserver *aObserver, 1082 1082 ipcIMessageObserver *aConsumer, 1083 PRIntervalTimeaTimeout)1083 RTMSINTERVAL aTimeout) 1084 1084 { 1085 1085 NS_ENSURE_TRUE(gClientState, NS_ERROR_NOT_INITIALIZED); -
trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
r102249 r102390 96 96 //----------------------------------------------------------------------------- 97 97 98 #define DCON_WAIT_TIMEOUT PR_INTERVAL_NO_TIMEOUT98 #define DCON_WAIT_TIMEOUT RT_INDEFINITE_WAIT 99 99 100 100 //----------------------------------------------------------------------------- … … 1281 1281 { 1282 1282 uClient = aClient; 1283 uTimestamp = PR_IntervalNow();1283 uTimestamp = RTTimeMilliTS(); 1284 1284 } 1285 1285 1286 1286 PRUint32 uClient; 1287 PRIntervalTimeuTimestamp;1287 uint64_t uTimestamp; 1288 1288 } ClientDownInfo; 1289 1289 typedef std::map<PRUint32, ClientDownInfo *> ClientDownMap; … … 1326 1326 // Insert new client down information. Start by expiring outdated 1327 1327 // entries and free one element if there's still no space (if needed). 1328 PRIntervalTime now = PR_IntervalNow();1328 uint64_t now = RTTimeMilliTS(); 1329 1329 while (!g_ClientDownList.empty()) 1330 1330 { … … 1332 1332 PRInt64 diff = (PRInt64)now - cInfo->uTimestamp; 1333 1333 if (diff < 0) 1334 diff += (PRInt64)(( PRIntervalTime)-1) + 1;1335 if (diff > PR_SecondsToInterval(15 * 60))1334 diff += (PRInt64)((uint64_t)-1) + 1; 1335 if (diff > 15 * 60 * RT_MS_1SEC) 1336 1336 { 1337 1337 g_ClientDownMap.erase(cInfo->uClient); … … 3557 3557 mon.Exit(); 3558 3558 { 3559 PRUint32 ticks = PR_MillisecondsToInterval(PR_MIN(mWorkers.Count() / 20 + 1, 10));3560 3559 nsAutoMonitor workersMon(mWaitingWorkersMon); 3561 workersMon.Wait( ticks);3560 workersMon.Wait(PR_MIN(mWorkers.Count() / 20 + 1, 10)); 3562 3561 } 3563 3562 mon.Enter(); -
trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/lock/src/ipcLockService.cpp
r102249 r102390 109 109 do { 110 110 // block the calling thread until we get a response from the daemon 111 rv = IPC_WaitMessage(0, kLockTargetID, this, nsnull, PR_INTERVAL_NO_TIMEOUT);111 rv = IPC_WaitMessage(0, kLockTargetID, this, nsnull, RT_INDEFINITE_WAIT); 112 112 } 113 113 while (NS_SUCCEEDED(rv) && !pendingLock.complete); -
trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/transmngr/src/tmTransactionService.cpp
r102323 r102390 328 328 aTrans->GetRawMessageLength()); 329 329 if (aSync) 330 IPC_WaitMessage(0, kTransModuleID, nsnull, nsnull, PR_INTERVAL_NO_TIMEOUT);330 IPC_WaitMessage(0, kTransModuleID, nsnull, nsnull, RT_INDEFINITE_WAIT); 331 331 } 332 332
Note:
See TracChangeset
for help on using the changeset viewer.