Changeset 101959 in vbox for trunk/src/libs/xpcom18a4
- Timestamp:
- Nov 8, 2023 10:57:01 AM (15 months ago)
- Location:
- trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/lock/src
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/lock/src/ipcLockService.cpp
r1 r101959 44 44 #include "ipcLockProtocol.h" 45 45 #include "ipcLog.h" 46 #include "prthread.h" 46 47 #include <iprt/errcore.h> 47 48 48 49 static const nsID kLockTargetID = IPC_LOCK_TARGETID; … … 62 63 ipcLockService::Init() 63 64 { 64 if (PR_NewThreadPrivateIndex(&mTPIndex, nsnull) != PR_SUCCESS) 65 mTPIndex = RTTlsAlloc(); /** @todo r=aeichner This doesn't seem to get freed ever. */ 66 if (mTPIndex == NIL_RTTLS) 65 67 return NS_ERROR_OUT_OF_MEMORY; 66 68 … … 94 96 pendingLock.status = 0xDEADBEEF; // something bogus 95 97 pendingLock.complete = PR_FALSE; 96 if ( PR_SetThreadPrivate(mTPIndex, &pendingLock) != PR_SUCCESS)98 if (RTTlsSet(mTPIndex, &pendingLock) != VINF_SUCCESS) 97 99 return NS_ERROR_UNEXPECTED; 98 100 … … 152 154 LOG(("ipcLockService::OnMessageAvailable [lock=%s opcode=%u]\n", msg.key, msg.opcode)); 153 155 154 ipcPendingLock *pendingLock = (ipcPendingLock *) PR_GetThreadPrivate(mTPIndex);156 ipcPendingLock *pendingLock = (ipcPendingLock *) RTTlsGet(mTPIndex); 155 157 if (strcmp(pendingLock->name, msg.key) == 0) { 156 158 pendingLock->complete = PR_TRUE; -
trunk/src/libs/xpcom18a4/ipc/ipcd/extensions/lock/src/ipcLockService.h
r1 r101959 43 43 #include "ipcdclient.h" 44 44 45 #include <iprt/thread.h> 46 45 47 //----------------------------------------------------------------------------- 46 48 … … 56 58 57 59 private: 58 PRUintnmTPIndex;60 RTTLS mTPIndex; 59 61 }; 60 62
Note:
See TracChangeset
for help on using the changeset viewer.