LibC: add syncsync() to unistd.h
This is my own WELL NAMED (:D) function that takes a paramemeter to make the sync operation synchronous.
This commit is contained in:
parent
05e57801e7
commit
6cb8bda6e1
|
@ -196,6 +196,7 @@ void swab(const void* __restrict src, void* __restrict dest, ssize_t nbytes);
|
||||||
int symlink(const char* path1, const char* path2);
|
int symlink(const char* path1, const char* path2);
|
||||||
int symlinkat(const char* path1, int fd, const char* path2);
|
int symlinkat(const char* path1, int fd, const char* path2);
|
||||||
void sync(void);
|
void sync(void);
|
||||||
|
void syncsync(int should_block);
|
||||||
long sysconf(int name);
|
long sysconf(int name);
|
||||||
pid_t tcgetpgrp(int fildes);
|
pid_t tcgetpgrp(int fildes);
|
||||||
int tcsetpgrp(int fildes, pid_t pgid_id);
|
int tcsetpgrp(int fildes, pid_t pgid_id);
|
||||||
|
|
|
@ -202,7 +202,12 @@ int chdir(const char* path)
|
||||||
|
|
||||||
void sync(void)
|
void sync(void)
|
||||||
{
|
{
|
||||||
syscall(SYS_SYNC);
|
syscall(SYS_SYNC, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void syncsync(int should_block)
|
||||||
|
{
|
||||||
|
syscall(SYS_SYNC, should_block);
|
||||||
}
|
}
|
||||||
|
|
||||||
pid_t getpid(void)
|
pid_t getpid(void)
|
||||||
|
|
Loading…
Reference in New Issue