URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 24 |
Rev 33 |
/* Check that TRT happens when getting a non-standard (realtime) signal, more than one thread.
|
/* Check that TRT happens when getting a non-standard (realtime) signal, more than one thread.
|
#notarget: cris*-*-elf
|
#notarget: cris*-*-elf
|
#cc: additional_flags=-pthread
|
#cc: additional_flags=-pthread
|
#xerror:
|
#xerror:
|
#output: Unimplemented signal: 77\n
|
#output: Unimplemented signal: 77\n
|
#output: program stopped with signal 4.\n
|
#output: program stopped with signal 4.\n
|
*/
|
*/
|
|
|
#include <stdlib.h>
|
#include <stdlib.h>
|
#include <stddef.h>
|
#include <stddef.h>
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <unistd.h>
|
#include <unistd.h>
|
#include <pthread.h>
|
#include <pthread.h>
|
#include <sys/types.h>
|
#include <sys/types.h>
|
#include <signal.h>
|
#include <signal.h>
|
|
|
static void *
|
static void *
|
process (void *arg)
|
process (void *arg)
|
{
|
{
|
while (1)
|
while (1)
|
sched_yield ();
|
sched_yield ();
|
return NULL;
|
return NULL;
|
}
|
}
|
|
|
int main (void)
|
int main (void)
|
{
|
{
|
pthread_t th_a;
|
pthread_t th_a;
|
if (pthread_create (&th_a, NULL, process, (void *) "a") == 0)
|
if (pthread_create (&th_a, NULL, process, (void *) "a") == 0)
|
kill (getpid (), 77);
|
kill (getpid (), 77);
|
printf ("xyzzy\n");
|
printf ("xyzzy\n");
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.