regtest: broaden none/tests/linux/bug498317 suppression for PPC
[valgrind.git] / none / tests / freebsd / 452275.c
blob6207729f52c2fd27c31b7805642c79da7550fbfe
1 #include <fcntl.h>
2 #include <signal.h>
3 #include <stdio.h>
4 #include <sys/time.h>
5 #include <unistd.h>
7 volatile int ticks = 0;
8 struct itimerval timert;
9 struct sigaction timer_action;
12 void handle_vtalrm(int sig) {
13 ticks++;
16 void setup_timer() {
17 timer_action.sa_handler = handle_vtalrm;
18 sigemptyset(&timer_action.sa_mask);
19 timer_action.sa_flags = SA_RESTART;
21 sigaction(SIGVTALRM, &timer_action, NULL);
23 timert.it_interval.tv_sec = timert.it_value.tv_sec = 0;
24 timert.it_interval.tv_usec = timert.it_value.tv_usec = 100;
25 setitimer(ITIMER_VIRTUAL, &timert, NULL);
28 int main(int argc, char *argv[]) {
29 setup_timer();
30 while (ticks < 100) {
31 write(2, " ", 1);