Made DELAY() fall back to spin() for times below 1000 usecs; it's often used that way, and snooze()
just wouldn't work right then. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22813 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* Copyright 2007, Hugo Santos. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _FBSD_COMPAT_SYS_SYSTM_H_
|
||||
#define _FBSD_COMPAT_SYS_SYSTM_H_
|
||||
|
||||
@@ -10,6 +14,12 @@
|
||||
#include <net/if_var.h>
|
||||
#include <net/if_media.h>
|
||||
|
||||
#define DELAY(n) snooze(n)
|
||||
#define DELAY(n) \
|
||||
do { \
|
||||
if (n < 1000) \
|
||||
spin(n); \
|
||||
else \
|
||||
snooze(n); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
#endif /* _FBSD_COMPAT_SYS_SYSTM_H_ */
|
||||
|
||||
Reference in New Issue
Block a user