fdesc.h

Go to the documentation of this file.
00001 /*
00002 ** fdesc.h for lseos in lseos-lib/libc/posix
00003 ** 
00004 ** Copyright (c)2004 Vianney Rancurel
00005 ** Login   <vianney@epita.fr>
00006 ** 
00007 ** Started on  Tue May  4 17:13:58 2004 Vianney Rancurel
00008 ** Last update Mon Nov 29 18:59:31 2004 Vianney Rancurel
00009 */
00010 #ifndef __POSIX_FDESC_H__
00011 #define __POSIX_FDESC_H__       1
00012 #include <libc.h>
00013 
00014 struct iovec 
00015 {
00016   void                          *iov_base;     /* Base address. */
00017   size_t                        iov_len;       /* Length. */
00018 };
00019 
00020 typedef struct                  s_fshare
00021 {
00022   int                           gate;           
00023   int                           gate_id;        
00024 }                               t_fshare;
00025 
00026 #define FDESCOPT_NOCACHE        (1<<0u)
00027 
00028 typedef enum
00029   {
00030     FDESC_NOT_IN_LTABLE = 100,
00031     FDESC_NOT_AVAIL,
00032     FDESC_BAD_REFCNT,
00033     FDESC_PROP_FETCH,
00034     FDESC_PROP_STORE,
00035     FDESC_PROP_DELETE,
00036     FDESC_PROP_ATTACH,
00037     FDESC_PROP_DETACH,
00038   } t_fdesc_suberrno_codes;
00039 
00040 /* PROTO fdesc.c */
00041 /* fdesc.c */
00042 void fdesc_init(void);
00043 void fdesc_cache_invalidate(void);
00044 void fdesc_cache_add(int fd, t_fshare *fshare, int refcnt);
00045 int fdesc_cache_get(int fd, t_fshare *fshare, int *refcnt);
00046 void fdesc_cache_dump(void);
00047 t_fdesc *fdesc_get_i(int fd);
00048 int fshare_get(resid_t resid, t_fshare *fshare, int *refcnt);
00049 int fdesc_get(int d, u_int32_t fdescopts, t_fdesc **fdesc, t_fshare *fshare, int *refcnt, char *s);
00050 int fdesc_nextd(int from);
00051 int fshare_add(resid_t *resid, int gate, int gate_id, mode_t perm);
00052 int fshare_rm(resid_t resid);
00053 int fdesc_add(int d, resid_t resid, int statusfl, int fl);
00054 int fdesc_rm(t_fdesc *fdesc, t_fshare *fshare, int refcnt);
00055 void fdesc_dump(void);
00056 #endif

Generated on Wed May 24 23:04:17 2006 for LSE/OS by  doxygen 1.4.6