OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gdb-6.8/] [pre-binutils-2.20.1-sync/] [sim/] [testsuite/] [sim/] [cris/] [c/] [mprotect1.c] - Rev 223

Compare with Previous | Blame | View Log

/* Check unimplemented-output for mprotect call.
#notarget: cris*-*-elf
#xerror:
#output: Unimplemented mprotect call (0x0, 0x2001, 0x4)\n
#output: program stopped with signal 4.\n
 */
#include <stdlib.h>
#include <stdio.h>
#include <sys/mman.h>
#include <errno.h>
 
int main (int argc, char *argv[])
{
  int err = mprotect (0, 8193, PROT_EXEC);
  if (err == -1 && errno == ENOSYS)
    printf ("ENOSYS\n");
  printf ("xyzzy\n");
  exit (0);
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.