source: svn/trunk/newcon3bcm2_21bu/dta/src/ucos_dev.h @ 2

Last change on this file since 2 was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1#ifndef __UCOS_DEV_H__
2#define __UCOS_DEV_H__
3
4#include <sys/types.h>
5#include <reent.h>
6
7typedef struct sys_table_t
8{
9        int (*fork_r)(struct _reent *r);
10        int (*kill_r)(struct _reent *r, int pid, int sig);
11        int (*execve_r)(struct _reent *r, const char *, char *const *, char *const *);
12        int (*wait_r)(struct _reent *r, int *);
13        void (*exit)(int ret);
14        int (*gettimeofday_r)(struct _reent *r, struct timeval *tp, void *tzp);
15        _CLOCK_T_ (*times_r)(struct _reent *, struct tms *);
16        int (*getpid_r)(struct _reent *r);
17        int (*creat_r)(struct _reent *r, const char *path, int mode);
18        void* (*sbrk_r)(struct _reent *r, ptrdiff_t ptrdiff);
19        int (*isatty_r)(struct _reent *r, int fd);
20} sys_table_t;
21
22extern sys_table_t *g_p_sys_table;
23
24
25typedef struct io_device_table_t
26{
27
28        const char *name;
29        void *p_internals;
30
31        int  (*open_r  )( struct _reent *r, const char *path, int flags, int mode );
32
33        int  (*close_r )( struct _reent *r, int fd );
34
35        long (*write_r )( struct _reent *r, int fd, const char *ptr, int len );
36
37        long (*read_r  )( struct _reent *r, int fd, char *ptr, int len );
38
39        off_t (*lseek_r) (struct _reent *r, int fd,  off_t offset, int whence);
40
41        int (*fstat_r) (struct _reent *r, int fd, struct stat *buf);
42
43} io_device_table_t;
44
45extern io_device_table_t *g_device_tables[];
46
47#endif /* __UCOS_DEV_H__ */
Note: See TracBrowser for help on using the repository browser.