tmp105: Split out I2C message constants from header
[qemu/opensuse.git] / tests / tcg / cris / check_sigalrm.c
blob39fa8d9bacd42480f69bb753bdd04e63d109d82e
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <signal.h>
4 #include <unistd.h>
6 #define MAGIC (0xdeadbeef)
8 int s = 0;
9 void sighandler(int sig)
11 s = MAGIC;
14 int main(int argc, char **argv)
16 int p;
18 p = getpid();
19 signal(SIGALRM, sighandler);
20 kill(p, SIGALRM);
21 if (s != MAGIC)
22 return EXIT_FAILURE;
24 printf ("passed\n");
25 return EXIT_SUCCESS;