Changeset 27500 in vbox for trunk/src/VBox/Runtime/r3
- Timestamp:
- Mar 18, 2010 8:04:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/tcp.cpp
r27499 r27500 1004 1004 /** 1005 1005 * Atomicly updates a socket variable. 1006 * @returns The old value. 1007 * @param pSock The socket variable to update. 1008 * @param Sock The new value. 1009 */ 1010 DECLINLINE(RTSOCKET) rtTcpAtomicXchgSock(RTSOCKET volatile *pSock, const RTSOCKET Sock) 1011 { 1012 switch (sizeof(RTSOCKET)) 1013 { 1014 case 4: return (RTSOCKET)ASMAtomicXchgS32((int32_t volatile *)pSock, (int32_t)(uintptr_t)Sock); 1015 case 8: return (RTSOCKET)ASMAtomicXchgS64((int64_t volatile *)pSock, (int64_t)(uintptr_t)Sock); 1016 default: 1017 AssertReleaseFailed(); 1018 return NIL_RTSOCKET; 1019 } 1006 * @returns The old handle value. 1007 * @param phSock The socket handle variable to update. 1008 * @param hSock The new socket handle value. 1009 */ 1010 DECLINLINE(RTSOCKET) rtTcpAtomicXchgSock(RTSOCKET volatile *phSock, const RTSOCKET hNew) 1011 { 1012 RTSOCKET hRet; 1013 ASMAtomicXchgHandle(phSock, hNew, &hRet); 1014 return hRet; 1020 1015 } 1021 1016
Note:
See TracChangeset
for help on using the changeset viewer.