Commit f6ae59cd authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

test: Add trivial vDSO test

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
parent 3d55b9d1
......@@ -3,6 +3,7 @@ SRCS += test-rnd-from-file.c
SRCS += test-shmem-async.c
SRCS += test-shmem-three-async.c
SRCS += test-pipe-async.c
SRCS += test-vdso.c
SRCS-TH += test-pthreads.c
OBJS-TH += $(patsubst %.c,%.o,$(SRCS-TH))
......
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
int main(int argc, char *argv[])
{
int counter = 0;
struct timeval tv;
struct timezone tz;
printf("%s pid %d\n", argv[0], getpid());
while (1) {
gettimeofday(&tv, &tz);
printf("Pid: %10d time: %10li\n",
getpid(), tv.tv_sec);
sleep(3);
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment