URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 157 |
Rev 223 |
/* Check that unimplemented clone syscalls get the right treatment.
|
/* Check that unimplemented clone syscalls get the right treatment.
|
#notarget: cris*-*-elf
|
#notarget: cris*-*-elf
|
#xerror:
|
#xerror:
|
#output: Unimplemented clone syscall *
|
#output: Unimplemented clone syscall *
|
#output: program stopped with signal 4.\n
|
#output: program stopped with signal 4.\n
|
*/
|
*/
|
|
|
#include <stddef.h>
|
#include <stddef.h>
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <unistd.h>
|
#include <unistd.h>
|
#include <signal.h>
|
#include <signal.h>
|
#include <sys/types.h>
|
#include <sys/types.h>
|
#include <sys/wait.h>
|
#include <sys/wait.h>
|
#include <errno.h>
|
#include <errno.h>
|
|
|
int pip[2];
|
int pip[2];
|
|
|
int
|
int
|
process (void *arg)
|
process (void *arg)
|
{
|
{
|
return 0;
|
return 0;
|
}
|
}
|
|
|
int
|
int
|
main (void)
|
main (void)
|
{
|
{
|
int retcode;
|
int retcode;
|
long stack[16384];
|
long stack[16384];
|
|
|
retcode = clone (process, (char *) stack + sizeof (stack) - 64, 0, "cba");
|
retcode = clone (process, (char *) stack + sizeof (stack) - 64, 0, "cba");
|
if (retcode == -1 && errno == ENOSYS)
|
if (retcode == -1 && errno == ENOSYS)
|
printf ("ENOSYS\n");
|
printf ("ENOSYS\n");
|
printf ("xyzzy\n");
|
printf ("xyzzy\n");
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.