Update release-README after completing the 2.43 release.
[binutils-gdb.git] / sim / testsuite / cris / c / rtsigprocmask1.c
bloba47b377e3000c2089535a2b3f8a7ea60f8803da6
1 /* Compiler options:
2 #progos: linux
3 #cc: additional_flags=-pthread
4 #xerror:
5 #output: Unimplemented rt_sigprocmask syscall (0x3, 0x0, 0x3dff*\n
6 #output: program stopped with signal 4 (*).\n
8 Testing a signal handler corner case. */
10 #include <stddef.h>
11 #include <stdlib.h>
12 #include <stdio.h>
13 #include <unistd.h>
14 #include <signal.h>
15 #include <pthread.h>
16 #include <errno.h>
18 static void *
19 process (void *arg)
21 while (1)
22 sched_yield ();
23 return NULL;
26 int
27 main (void)
29 int retcode;
30 pthread_t th_a;
31 void *retval;
32 sigset_t sigs;
34 if (sigemptyset (&sigs) != 0)
35 abort ();
37 retcode = pthread_create (&th_a, NULL, process, NULL);
38 if (retcode != 0)
39 abort ();
41 /* An invalid parameter 1 should cause this to halt the simulator. */
42 retcode
43 = pthread_sigmask (SIG_BLOCK + SIG_UNBLOCK + SIG_SETMASK, NULL, &sigs);
44 /* Direct return of the error number; i.e. not using -1 and errno,
45 is the actual documented behavior. */
46 if (retcode == ENOSYS)
47 printf ("ENOSYS\n");
49 printf ("xyzzy\n");
50 return 0;