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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [sys/] [h8300hms/] [misc.c] - Blame information for rev 308

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
/* Misc. operating system stubs.  */
2
 
3
#include <_ansi.h>
4
#include <sys/types.h>
5
#include <sys/stat.h>
6
 
7
/* _raise(), getpid(), and kill() are required by abort().
8
   getpid/kill are prefixed with '_' because of MISSING_SYSCALL_NAMES.  */
9
 
10
int _DEFUN(_raise,(sig),
11
           int sig)
12
{
13
  return 0;
14
}
15
 
16
int _DEFUN(_getpid,(),)
17
{
18
  return 0;
19
}
20
 
21
int _DEFUN(_kill,(pid, sig),
22
           int pid _AND
23
           int sig)
24
{
25
  if (pid == 0)
26
    {
27
      /* Narrow SIG down to a short, in case we're compiled with -mint32.  */
28
      short sig2 = sig;
29
      /* This causes the simulator to indicate abort() was called.
30
         The format of r0 is defined by devo/include/wait.h.  */
31
      asm ("mov.w %0,r0\n\tsleep" : : "r" (sig2) : "r0");
32
    }
33
  return 0;
34
}

powered by: WebSVN 2.1.0

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