source: rtems/c/src/lib/libbsp/a29k/portsw/startup/iface.c @ 634e746

4.104.114.84.95
Last change on this file since 634e746 was 634e746, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 29, 1997 at 12:28:47 AM

All RTEMS system call implementation renamed to be rtems_*.

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 * glue.c -- all the code to make GCC and the libraries run on
3 *           a target board running RTEMS. These should work with
4 *           any target which conforms to the RTEMS BSP.
5 *
6 *  $Id$
7 */
8
9#ifndef lint
10static char _sccsid[] = "@(#)iface.c 04/12/96     1.1\n";
11#endif
12
13#include <sys/types.h>
14#include <sys/stat.h>
15#include <errno.h>
16
17int
18read(int fd,
19     char *buf,
20     int nbytes)
21{
22    return __rtems_read(fd, buf, nbytes);
23}
24
25int
26write(int fd,
27      char *buf,
28      int nbytes)
29{
30    return __rtems_write(fd, buf, nbytes);
31}
32
33int
34open(char *buf,
35     int flags,
36     int mode)
37{
38    return __rtems_open(buf, flags, mode);
39}
40
41int
42close(int fd)
43{
44    return __rtems_close(fd);
45}
46
47/*
48 * isatty -- returns 1 if connected to a terminal device,
49 *           returns 0 if not.
50 */
51int
52isatty(int fd)
53{
54    return __rtems_isatty(fd);
55}
56
57/*
58 * lseek -- move read/write pointer. Since a serial port
59 *          is non-seekable, we return an error.
60 */
61off_t
62lseek(int fd,
63      off_t offset,
64      int whence)
65{
66    return __rtems_lseek(fd, offset, whence);
67}
68
69/*
70 * fstat -- get status of a file. Since we have no file
71 *          system, we just return an error.
72 */
73int
74fstat(int fd,
75      struct stat *buf)
76{
77    return __rtems_fstat(fd, buf);
78}
79
80int
81getpid()
82{
83  return __rtems_getpid();
84}
85
86/*
87 * kill -- go out via exit...
88 */
89int
90kill(int pid,
91     int sig)
92{
93    return __rtems_kill(pid, sig);
94}
95
96
Note: See TracBrowser for help on using the repository browser.