Add fsync() interface.

This commit is contained in:
Ben Gras 2005-09-05 21:22:45 +00:00
parent b2bb27eda1
commit aad54cb32c
2 changed files with 16 additions and 0 deletions

View File

@ -34,6 +34,7 @@ OBJECTS = \
$(LIBRARY)(_fpathconf.o) \
$(LIBRARY)(_fstat.o) \
$(LIBRARY)(_fstatfs.o) \
$(LIBRARY)(_fsync.o) \
$(LIBRARY)(_getcwd.o) \
$(LIBRARY)(_getegid.o) \
$(LIBRARY)(_geteuid.o) \
@ -185,6 +186,9 @@ $(LIBRARY)(_fpathconf.o): _fpathconf.c
$(LIBRARY)(_fstat.o): _fstat.c
$(CC1) _fstat.c
$(LIBRARY)(_fsync.o): _fsync.c
$(CC1) _fsync.c
$(LIBRARY)(_fstatfs.o): _fstatfs.c
$(CC1) _fstatfs.c

12
lib/posix/_fsync.c Executable file
View File

@ -0,0 +1,12 @@
#include <lib.h>
#define sync _sync
#include <unistd.h>
PUBLIC int fsync(int fd)
{
message m;
m.m1_i1 = fd;
return(_syscall(FS, FSYNC, &m));
}