My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
syscalls.h
Go to the documentation of this file.
1 /*
2  * OpenVirtualization:
3  * For additional details and support contact developer@sierraware.com.
4  * Additional documentation can be found at www.openvirtualization.org
5  *
6  * Copyright (C) 2010-2014 SierraWare
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  *
22  */
23 #ifndef SYSCALLS_H
24 #define SYSCALLS_H
25 
26 /*
27  * This Header file for NEWLIB_SUPPORT functions that needed by apps
28  */
29 
39 int _close(int file);
40 
50 int _fstat(int file, struct stat *st);
51 
62 int _isatty(int file);
63 
78 off_t _lseek(int file, off_t offset, int flags);
79 
91 int _open(const char *name, int flags, ...);
92 
106 int _read(int file, char *ptr, int len);
107 
117 caddr_t _sbrk(int incr);
118 
132 int _write(int file, char *ptr, int len);
133 
142 void _exit(int val) __attribute__ ((noreturn));
143 
156 int _execve(char *name, char **argv, char **env);
157 
163 int _getpid();
164 
173 int _fork(void);
174 
186 int _kill(int pid, int sig);
187 
198 int _wait(int *status);
199 
209 int _link(char *old, char *new);
210 
220 int _stat(const char* file, struct stat *st);
221 
230 int _unlink(char *name);
231 
242 clock_t _times(struct tms *buf);
243 
256 int _gettimeofday(struct timeval *buf, void *buf2);
257 
269 int clock_gettime(clockid_t clk_id, struct timespec *tp);
270 
271 #endif
typedef __attribute__
Structure of the 32 byte directory entry.
Definition: fat32.h:150
int _open(const char *name, int flags,...)
function opens the file whose name is the string pointed to by path and associates a stream with it ...
Definition: syscalls.c:228
caddr_t _sbrk(int incr)
change data segment size
Definition: syscalls.c:363
int _isatty(int file)
function tests whether fd is an open file descriptor referring to a terminal
Definition: syscalls.c:140
int _close(int file)
function will flushes the stream pointed to by fd
Definition: syscalls.c:71
int _fstat(int file, struct stat *st)
These functions return information about a file.
Definition: syscalls.c:108
int _stat(const char *file, struct stat *st)
These functions return information about a file.
Definition: syscalls.c:536
int _execve(char *name, char **argv, char **env)
executes the program pointed to by filename
Definition: syscalls.c:444
int clock_gettime(clockid_t clk_id, struct timespec *tp)
finds the resolution (precision) of the specified clock clk_id
Definition: syscalls.c:617
int _kill(int pid, int sig)
terminate a process.Sends the specified signal to the specified process or process group ...
Definition: syscalls.c:488
int _unlink(char *name)
call the unlink function to remove the specified file
Definition: syscalls.c:550
clock_t _times(struct tms *buf)
giving timing statistics about this program run
Definition: syscalls.c:582
int _fork(void)
creates a new process by duplicating the calling process
Definition: syscalls.c:471
void _exit(int val) __attribute__((noreturn))
the command does nothing beyond expanding arguments and performing any specified redirections ...
Definition: syscalls.c:426
int _link(char *old, char *new)
call the link function to create a link to a file
Definition: syscalls.c:521
int _read(int file, char *ptr, int len)
reads nmemb elements of data, each size bytes long, from the stream pointed to by stream...
Definition: syscalls.c:287
int _getpid()
returns the process ID of the calling process
Definition: syscalls.c:457
off_t _lseek(int file, off_t offset, int flags)
function repositions the offset of the open file associated with the file descriptor fd ...
Definition: syscalls.c:168
int _gettimeofday(struct timeval *buf, void *buf2)
get time of the day
Definition: syscalls.c:600
int _wait(int *status)
The parent process may then issue a wait system call, which suspends the execution of the parent proc...
Definition: syscalls.c:506
int _write(int file, char *ptr, int len)
writes nmemb elements of data, each size bytes long, to the stream pointed to by stream, obtaining them from the location given by ptr
Definition: syscalls.c:381