NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | ATTRIBUTES | SEE ALSO | BUGS
#include <unistd.h>void sync(void);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
MSDOSFS, NFS_CLIENT, UFS
The sync function forces a write of dirty (modified) buffers in the block buffer cache to disk. The microkernel keeps this information in core to reduce the number of disk I/O transfers required by the system.
A daemon can be created for the sync function, as shown in the following example:
while (1) { sync(); threadDelay(&time); }
The fsync(2) function may be used to synchronize individual file descriptor attributes.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
The sync call may return before the buffers are completely flushed.
NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | ATTRIBUTES | SEE ALSO | BUGS