TacOS  0.2
 Tout Structures de données Fichiers Fonctions Variables Définitions de type Énumérations Macros
Fonctions
Référence du fichier kunistd.c
#include <klog.h>
#include <kprocess.h>
#include <ksem.h>
#include <kunistd.h>
#include <scheduler.h>
#include <vfs.h>
Graphe des dépendances par inclusion de kunistd.c:

Fonctions

 SYSCALL_HANDLER3 (sys_write, uint32_t fd, const void *buf, size_t *c)
 
 SYSCALL_HANDLER3 (sys_read, uint32_t fd, const void *buf, size_t *c)
 
 SYSCALL_HANDLER3 (sys_seek, uint32_t fd, long *offset, int whence)
 
 SYSCALL_HANDLER3 (sys_ioctl, uint32_t *fd, unsigned int request, void *data)
 
 SYSCALL_HANDLER3 (sys_select, uint32_t *fds, size_t n, int *ret)
 
 SYSCALL_HANDLER3 (sys_readlink, const char *path, char *buf, ssize_t *ret)
 
 SYSCALL_HANDLER3 (sys_stat, const char *path, struct stat *buf, int *ret)
 
 SYSCALL_HANDLER2 (sys_unlink, const char *path, int *ret)
 
 SYSCALL_HANDLER3 (sys_chmod, const char *path, mode_t mode, int *ret)
 
 SYSCALL_HANDLER3 (sys_utimes, const char *path, const struct timeval times[2], int *ret)
 
 SYSCALL_HANDLER3 (sys_chown, const char *path, uid_t owner, gid_t *group)
 
 SYSCALL_HANDLER3 (sys_rename, const char *oldpath, const char *newpath, int *ret)
 
 SYSCALL_HANDLER2 (sys_dup, int oldfd, int *ret)
 
 SYSCALL_HANDLER2 (sys_dup2, int oldfd, int *newfd)
 
 SYSCALL_HANDLER3 (sys_mknod, const char *path, mode_t mode, dev_t *dev)
 

Description détaillée

Auteur
TacOS developers

LICENSE

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

Description de ce que fait le fichier

Documentation des fonctions

SYSCALL_HANDLER2 ( sys_unlink  ,
const char *  path,
int *  ret 
)

Syscall pour supprimer un fichier.

Paramètres
pathLe chemin du fichier à supprimer.
retLe code retour de la fonction.

Voici le graphe d'appel pour cette fonction :

SYSCALL_HANDLER2 ( sys_dup  ,
int  oldfd,
int *  ret 
)

Syscall pour dupliquer un open file descriptor.

Paramètres
oldfdL'identifiant de descripteur de fichier ouvert à dupliquer.
retLe nouvel identifiant.

Voici le graphe d'appel pour cette fonction :

SYSCALL_HANDLER3 ( sys_write  ,
uint32_t  fd,
const void *  buf,
size_t c 
)

Syscall pour écrire dans un fichier.

Paramètres
fdId du descripteur de fichier.
bufDonnées à écrire.
cNombre d'octets à écrire.

Voici le graphe d'appel pour cette fonction :

SYSCALL_HANDLER3 ( sys_read  ,
uint32_t  fd,
const void *  buf,
size_t c 
)

Syscall pour lire dans un fichier.

Paramètres
fdId du descripteur de fichier.
bufBuffer pour stocker les données lues.
cNombre d'octets à lire.

Voici le graphe d'appel pour cette fonction :

SYSCALL_HANDLER3 ( sys_seek  ,
uint32_t  fd,
long *  offset,
int  whence 
)

Syscall pour se déplacer dans un fichier.

Paramètres
fdId du descripteur de fichier.

Voici le graphe d'appel pour cette fonction :

SYSCALL_HANDLER3 ( sys_ioctl  ,
uint32_t fd,
unsigned int  request,
void *  data 
)

Syscall pour controler un fichier.

Paramètres
fdPointeur sur l'id du descripteur de fichier. Utilisé comme code de retour.

Voici le graphe d'appel pour cette fonction :

SYSCALL_HANDLER3 ( sys_select  ,
uint32_t fd,
size_t  n,
int *  ret 
)

Syscall pour surveiller des descripteurs de fichier.

Paramètres
fdTableau de numéros de descripteurs de fichier à surveiller.
nNombre de descripteurs de fichier.
retRetour de la fonction : premier descripteur de fichier prêt en lecture.

Voici le graphe d'appel pour cette fonction :

SYSCALL_HANDLER3 ( sys_stat  ,
const char *  path,
struct stat buf,
int *  ret 
)

Syscall pour obtenir des informations sur un fichier.

Paramètres
pathLe chemin du fichier dont on veut obtenir les informations.
bufUne structure stat pour y enregistrer les informations.
retLe code retour de la fonction.

Voici le graphe d'appel pour cette fonction :

SYSCALL_HANDLER3 ( sys_mknod  ,
const char *  path,
mode_t  mode,
dev_t dev 
)

Syscall pour créer un nouveau noeud.

Voici le graphe d'appel pour cette fonction :