TacOS  0.2
 Tout Structures de données Fichiers Fonctions Variables Définitions de type Énumérations Macros
kfcntl.h
Aller à la documentation de ce fichier.
1 
29 #ifndef _KFCNTL_H
30 #define _KFCNTL_H
31 
32 #include <types.h>
33 #include <fd_types.h>
34 #include <kprocess.h>
35 #include <ksyscall.h>
36 
37 // Defines pour open.
38 
39 #define O_ACCMODE 00000003
40 #define O_RDONLY 00000000
41 #define O_WRONLY 00000001
42 #define O_RDWR 00000002
43 #ifndef O_CREAT
44 #define O_CREAT 00000100
45 #endif
46 #ifndef O_EXCL
47 #define O_EXCL 00000200 /* not fcntl */
48 #endif
49 #ifndef O_NOCTTY
50 #define O_NOCTTY 00000400 /* not fcntl */
51 #endif
52 #ifndef O_TRUNC
53 #define O_TRUNC 00001000
54 #endif
55 #ifndef O_APPEND
56 #define O_APPEND 00002000
57 #endif
58 #ifndef O_NONBLOCK
59 #define O_NONBLOCK 00004000
60 #endif
61 #ifndef O_SYNC
62 #define O_SYNC 00010000
63 #endif
64 #ifndef FASYNC
65 #define FASYNC 00020000 /* fcntl, for BSD compatibility */
66 #endif
67 #ifndef O_DIRECT
68 #define O_DIRECT 00040000
69 #endif
70 #ifndef O_DIRECTORY
71 #define O_DIRECTORY 00200000
72 #endif
73 #ifndef O_NOFOLLOW
74 #define O_NOFOLLOW 00400000
75 #endif
76 #ifndef O_NOATIME
77 #define O_NOATIME 01000000
78 #endif
79 #ifndef O_CLOEXEC
80 #define O_CLOEXEC 02000000
81 #endif
82 
83 #define F_SETFL 4
84 #define F_GETFL 5
85 
93 void init_stdfd(process_t *new_proc);
94 
98 void close_all_fd();
99 
107 SYSCALL_HANDLER3(sys_open, int *fd_id, char *path , uint32_t flags);
108 
115 SYSCALL_HANDLER2(sys_close, int fd_id, uint32_t* ret);
116 
124 SYSCALL_HANDLER3(sys_fcntl, int *fd_id, unsigned int request, void * data);
125 
126 #endif
Structure représentant un processus.
Definition: kprocess.h:92
SYSCALL_HANDLER2(sys_close, int fd_id, uint32_t *ret)
Definition: kfcntl.c:110
void close_all_fd()
Ferme tous les file descriptors ouverts.
Definition: kfcntl.c:73
Création de nouveaux processus.
void init_stdfd(process_t *new_proc)
Initialise les descripteurs de fichiers standards.
Definition: kfcntl.c:41
Structures liées aux fichiers ouverts.
unsigned long int uint32_t
Definition: types.h:36
SYSCALL_HANDLER3(sys_open, int *fd_id, char *path, uint32_t flags)
Definition: kfcntl.c:92