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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [libgloss/] [i960/] [mon960.c] - Blame information for rev 862

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

Line No. Rev Author Line
1 148 jeremybenn
#include <sys/types.h>
2
#include <sys/stat.h>
3
 
4
static char *heap_end = 0;
5
 
6
int
7
brk (void *ptr)
8
{
9
  heap_end = ptr;
10
  return 0;
11
}
12
 
13
caddr_t
14
sbrk (int amt)
15
{
16
  extern char end;
17
  char *prev_heap_end;
18
 
19
  if (heap_end == 0)
20
    heap_end = &end;
21
  prev_heap_end = heap_end;
22
  heap_end += amt;
23
  return ((caddr_t) prev_heap_end);
24
}
25
 
26
int
27
isatty (int file)
28
{
29
  return file<3;
30
}
31
 
32
int
33
fstat (int file, struct stat *st)
34
{
35
  st->st_mode = S_IFCHR;
36
  return 0;
37
}
38
 
39
int
40
stat (const char *filename, struct stat *st)
41
{
42
  st->st_mode = S_IFCHR;
43
  return 0;
44
}
45
 
46
int
47
lseek (int fd, off_t offset, int type)
48
{
49
  return _sys_lseek (fd, offset, type);
50
}
51
 
52
int
53
open (char *file, int mode, int perms)
54
{
55
  return _sys_open (file, mode, perms);
56
}
57
 
58
int
59
close (int fd)
60
{
61
  return _sys_close (fd);
62
}
63
 
64
int
65
getpid ()
66
{
67
  return -1;
68
}
69
 
70
int
71
kill (int pid, int signal)
72
{
73
  exit (signal);
74
}
75
 
76
#if 0
77
/* This conflicts with the abort defined in newlib.  */
78
void
79
abort ()
80
{
81
  exit (6);
82
}
83
#endif

powered by: WebSVN 2.1.0

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