diff options
| author | Bruce Evans <bde@FreeBSD.org> | 2007-06-13 06:17:48 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 2007-06-13 06:17:48 +0000 |
| commit | 7df7fc34a30c4dbde5d2e35e6bee7aff30bb88e3 (patch) | |
| tree | 80a49e4eb1222c7a847d72ab2542d790e4d93843 /sys/libkern | |
| parent | d076fbea58989aba0f018ad29ab041d0ffab7b42 (diff) | |
Notes
Diffstat (limited to 'sys/libkern')
| -rw-r--r-- | sys/libkern/mcount.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/libkern/mcount.c b/sys/libkern/mcount.c index d967fe8bb254..e26f6fab3428 100644 --- a/sys/libkern/mcount.c +++ b/sys/libkern/mcount.c @@ -268,18 +268,23 @@ mexitcount(selfpc) } } +#ifndef __GNUCLIKE_ASM +#error "This file uses null asms to prevent timing loops being optimized away." +#endif + void empty_loop() { int i; for (i = 0; i < CALIB_SCALE; i++) - ; + __asm __volatile(""); } void nullfunc() { + __asm __volatile(""); } void |
