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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [libgloss/] [sparc/] [sysc-701.c] - Blame information for rev 179

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

Line No. Rev Author Line
1 148 jeremybenn
/* more sparclet syscall support (the rest is in crt0-701.S).  */
2
 
3
#include <sys/types.h>
4
#include <sys/stat.h>
5
#include <errno.h>
6
 
7
int
8
fstat(int _fd, struct stat* _sbuf)
9
{
10
  errno = ENOSYS;
11
  return -1;
12
}
13
 
14
int
15
isatty(int fd)
16
{
17
  if (fd < 0)
18
    {
19
      errno = EBADF;
20
      return -1;
21
    }
22
  return fd <= 2;
23
}
24
 
25
int
26
getpid()
27
{
28
  return 1;
29
}
30
 
31
int
32
kill(int pid)
33
{
34
  /* if we knew how to nuke the board, we would... */
35
  return 0;
36
}
37
 
38
int
39
lseek(int _fd, off_t offset, int whence)
40
{
41
  errno = ENOSYS;
42
  return -1;
43
}
44
 
45
extern char end;
46
char*
47
sbrk (int incr)
48
{
49
  static char* base;
50
  char *b;
51
  if(!base) base = &end;
52
  b = base;
53
  base += incr;
54
  return b;
55
}

powered by: WebSVN 2.1.0

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