Changeset 16292 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Jan 28, 2009 3:31:55 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp_state.h
r16291 r16292 281 281 #define QSOCKET_LOCK(queue) \ 282 282 do { \ 283 int rc = RTSemMutexRequest(_X(queue) ## _mutex, RT_INDEFINITE_WAIT); \283 int rc = RTSemMutexRequest(_X(queue) ## _mutex, RT_INDEFINITE_WAIT); \ 284 284 AssertReleaseRC(rc); \ 285 285 } while (0) … … 300 300 } while (0) 301 301 302 # define QSOCKET_FOREACH(so, sonext, label) \303 QSOCKET_LOCK(__X(queue_## label ## _label)); \302 # define QSOCKET_FOREACH(so, sonext, label) \ 303 QSOCKET_LOCK(__X(queue_## label ## _label)); \ 304 304 (so) = (_X(queue_ ## label ## _label)).so_next; \ 305 SOCKET_LOCK((so)); \306 for(;;) \307 { \308 if ((so) == &(_X(queue_## label ## _label))) 309 { \310 QSOCKET_UNLOCK(__X(queue_## label ##_label)); 311 break; \312 } \313 if ((so)->so_next != &(_X(queue_## label ## _label))) 314 { \315 SOCKET_LOCK((so)->so_next); \316 } \317 (sonext) = (so)->so_next; \305 SOCKET_LOCK((so)); \ 306 for(;;) \ 307 { \ 308 if ((so) == &(_X(queue_## label ## _label))) \ 309 { \ 310 QSOCKET_UNLOCK(__X(queue_## label ##_label)); \ 311 break; \ 312 } \ 313 if ((so)->so_next != &(_X(queue_## label ## _label))) \ 314 { \ 315 SOCKET_LOCK((so)->so_next); \ 316 } \ 317 (sonext) = (so)->so_next; \ 318 318 QSOCKET_UNLOCK(__X(queue_## label ##_label)); 319 319 #else … … 322 322 #define QSOCKET_LOCK_CREATE(queue) do {} while (0) 323 323 #define QSOCKET_LOCK_DESTROY(queue) do {} while (0) 324 # define QSOCKET_FOREACH(so, sonext, label) \325 for ((so) = __X(queue_ ## label ## _label).so_next; so != &(__X(queue_ ## label ## _label)); (so) = (sonext)) \326 { \324 # define QSOCKET_FOREACH(so, sonext, label) \ 325 for ((so) = __X(queue_ ## label ## _label).so_next; so != &(__X(queue_ ## label ## _label)); (so) = (sonext)) \ 326 { \ 327 327 (sonext) = (so)->so_next; 328 328 #endif
Note:
See TracChangeset
for help on using the changeset viewer.