-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Lines 188 to 199 in 9b47975
// Simple busywait. | |
// usleep() is not granular enough | |
static void | |
upause(int n) | |
{ | |
int i; | |
volatile uint64_t j = sys_cpu_timestamp(); | |
for (i = 0; i < n; ++i) { | |
j += i; | |
rte_pause(); | |
} | |
} |
Maybe simply asm("nop")
is better:
for (i = 0; i < n; ++i) {
asm("nop");
rte_pause();
}
Metadata
Metadata
Assignees
Labels
No labels