16 #include <core/lseek.h> 17 #include <core/stat.h> 19 #include <sys/resource.h> 27 #define TEMP_FAILURE_RETRY(expression) ({ \ 28 typeof (expression) _result; \ 30 _result = (expression); \ 31 } while (_result == ((typeof (expression)) -1) && errno == EINTR); \ 40 extern void _exit(
int status) __attribute__ ((noreturn));
42 #ifndef __HIDE_INTERNAL_FUNCTIONS__ 47 extern void _exit_thread(
unsigned long status) __attribute__ ((noreturn));
63 extern int profil(
unsigned short *buf,
size_t bufsiz,
size_t offset,
unsigned int scale);
97 extern int rename(
const char *pathname,
const char *new_pathname);
105 extern int unlink(
const char *pathname);
123 extern int rmdir(
char *dir_name);
135 extern int close(
int fd);
148 extern ssize_t read(
int fd,
void *buf,
size_t count);
161 extern ssize_t write(
int fd,
const void *buf,
size_t count);
170 extern int fstat(
int fd,
struct stat *buf);
179 extern int stat(
const char *pathname,
struct stat *buf);
187 extern int fsync(
int fd);
204 extern int lseek(
int fd,
int offset,
int whence);
234 extern ssize_t __readlink_stub(
const char *pathname,
char *buf,
size_t bufsiz);
235 extern int __fcntl_stub(
int fd,
int cmd, ...);
int getcluster(void)
Return the cluster id on which current thread is performed.
Wrapper for kernel types.h header.
ssize_t read(int fd, void *buf, size_t count)
Attempt to read count bytes from the file associated with the open file descriptor, fd, into the buffer pointed to by buf.
int pid_t
Definition: types.h:21
int getcpu(void)
Return the number of CPU on which current thread is performed.
int fsync(int fd)
Synchronize a file's in-core state with storage device.
ssize_t write(int fd, const void *buf, size_t count)
Attempt to write count bytes from buffer pointed to by buf to the file associated with the open file ...
int rmdir(char *dir_name)
Remove a directory at file system.
pid_t gettid(void)
Return the thread ID of the calling thread.
int profil(unsigned short *buf, size_t bufsiz, size_t offset, unsigned int scale)
Provide a means to find out in what areas your program spends most of its time. The argument buf poin...
int fstat(int fd, struct stat *buf)
Get status of a file with a descriptor fd.
int stat(const char *pathname, struct stat *buf)
Get status of a file pathname.
long sysconf(int name)
Get configuration information at run time.
int close(int fd)
Deallocate the file descriptor indicated by fd. To deallocate means to make the file descriptor avail...
void _exit(int status)
Terminate the calling process "immediately". Any open file descriptors belonging to the process are c...
int rename(const char *pathname, const char *new_pathname)
Rename file.
pid_t getpid(void)
Return the process ID of the calling process.
int lseek(int fd, int offset, int whence)
Reposition read/write file offset.
intptr_t ssize_t
Definition: types.h:17
int unlink(const char *pathname)
Remove a link to a file.
int ftruncate(int fd, int size)
Cause file referenced by fd to be truncated to a size of precisely length bytes.