6 * tests shared lock using varsym_get()
10 #include <sys/varsym.h>
13 main(int ac
, char **av
)
24 printf("timing standard varsym_get() syscall, VARSYM_SYS\n");
27 while (stop_timing(0, NULL
) == 0) {
28 varsym_get(VARSYM_SYS_MASK
, "fubar", buf
, sizeof(buf
));
34 n
= strtol(av
[1], NULL
, 0);
39 for (i
= 0; i
< n
; ++i
) {
41 for (count
= 0; count
< max
; ++count
) {
42 varsym_get(VARSYM_SYS_MASK
, "fubar",
48 while (wait3(&status
, 0, NULL
) >= 0 || errno
== EINTR
)
50 stop_timing(max
* n
, "varsym1");