TacOS
0.2
|
#include <fs/devfs.h>
#include <kfcntl.h>
#include <klibc/string.h>
#include <klog.h>
#include <kmalloc.h>
#include <kprocess.h>
#include <ksyscall.h>
#include <scheduler.h>
#include <tty.h>
#include <vfs.h>
Fonctions | |
void | init_stdfd (process_t *new_proc) |
Initialise les descripteurs de fichiers standards. Plus de détails... | |
void | close_all_fd () |
Ferme tous les file descriptors ouverts. | |
SYSCALL_HANDLER3 (sys_open, int *fd_id, char *path, uint32_t flags) | |
SYSCALL_HANDLER2 (sys_close, int fd_id, uint32_t *ret) | |
SYSCALL_HANDLER3 (sys_fcntl, int *fd_id, unsigned int request, void *data) | |
Copyright (C) 2010-2014 TacOS developers.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at http://www.gnu.org/copyleft/gpl.html
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses.
Description de ce que fait le fichier
void init_stdfd | ( | process_t * | new_proc | ) |
Initialise les descripteurs de fichiers standards.
new_proc | Processus à initialiser. |
SYSCALL_HANDLER2 | ( | sys_close | , |
int | fd_id, | ||
uint32_t * | ret | ||
) |
Syscall pour fermer un fichier.
fd_id | Identifiant du descripteur de fichier. |
ret | Pointeur pour enregistrer le résultat. |
SYSCALL_HANDLER3 | ( | sys_open | , |
int * | fd_id, | ||
char * | path, | ||
uint32_t | flags | ||
) |
Syscall pour ouvrir un fichier.
fd_id | Pointeur pour enregistrer le resultat. |
path | Chemin du fichier à ouvrir. |
flags | Mode d'ouverture. |
SYSCALL_HANDLER3 | ( | sys_fcntl | , |
int * | fd_id, | ||
unsigned int | request, | ||
void * | data | ||
) |
Syscall pour la manipulation d'un descripteur de fichier.
fd_id | descripteur du fichier et enregistrement du résultat. |
request | action à faire. |
data | les arguments nécessaires à l'action. |