Changeset 35815 in vbox for trunk/src/VBox/HostDrivers
- Timestamp:
- Feb 1, 2011 2:45:41 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69796
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetAdp/VBoxNetAdp.c
r35809 r35815 1062 1062 { 1063 1063 uint32_t nUnit = RTStrToUInt32(pcszName + sizeof(VBOXNETADP_NAME) - 1); 1064 bool fOld; 1064 1065 1065 1066 if (nUnit >= VBOXNETADP_MAX_UNITS) 1066 1067 return -1; 1067 1068 1068 bool bOld = ASMAtomicBitTestAndSet(g_aUnits, nUnit);1069 return bOld ? -1 : (int)nUnit;1069 fOld = ASMAtomicBitTestAndSet(g_aUnits, nUnit); 1070 return fOld ? -1 : (int)nUnit; 1070 1071 } 1071 1072 1072 1073 DECLINLINE(int) vboxNetAdpGetNextAvailableUnit(void) 1073 1074 { 1074 bool bOld;1075 bool fOld; 1075 1076 int nUnit; 1076 1077 /* There is absolutely no chance that all units are taken */ … … 1079 1080 if (nUnit < 0) 1080 1081 break; 1081 bOld = ASMAtomicBitTestAndSet(g_aUnits, nUnit);1082 } while ( bOld);1082 fOld = ASMAtomicBitTestAndSet(g_aUnits, nUnit); 1083 } while (fOld); 1083 1084 1084 1085 return nUnit;
Note:
See TracChangeset
for help on using the changeset viewer.