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

4.104.114.84.95
Last change on this file since 0836603 was 0836603, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 18, 1996 at 9:13:10 PM

new files submitted by Craig Lebakken (lebakken@…) and Derrick Ostertag
(ostertag@…)

  • Property mode set to 100644
File size: 1.3 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 __read(fd, buf, nbytes);
23}
24
25int
26write(int fd,
27      char *buf,
28      int nbytes)
29{
30    return __write(fd, buf, nbytes);
31}
32
33int
34open(char *buf,
35     int flags,
36     int mode)
37{
38    return __open(buf, flags, mode);
39}
40
41int
42close(int fd)
43{
44    return __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 __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 __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 __fstat(fd, buf);
78}
79
80int
81getpid()
82{
83  return __getpid();
84}
85
86/*
87 * kill -- go out via exit...
88 */
89int
90kill(int pid,
91     int sig)
92{
93    return __kill(pid, sig);
94}
95
96
Note: See TracBrowser for help on using the repository browser.