2 ** Copyright 2004, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
8 #include <sys/syscalls.h>
10 int syscall_bench(int arg
)
12 bigtime_t start_time
= _kern_system_time();
14 const int count
= 250000;
16 for(i
=0; i
< count
; i
++) {
20 start_time
= _kern_system_time() - start_time
;
22 printf("took %Ld usecs to call _kern_null() %d times (%Ld usecs/call)\n",
23 start_time
, count
, start_time
/count
);
24 printf("%Ld cycles/syscall on 500 Mhz cpu\n", start_time
* 500 / count
);