Go to the first, previous, next, last section, table of contents.


3.5.1 diskheap_fsync -- Sync the diskheap with disk using fsync.

Function:
int diskheap_fsync(diskheap_t * diskheap_p);

Usage: ret = diskheap_fsync(diskheap_p);

This function calls fsync on the file descriptor associated with the Diskheap. It is designed to make sure that all buffered data gets moved to the disk. See the manual entry for fsync to determine what this does in reality. This It will return DISKHEAP_ERROR_NONE if it succeeds otherwise an error code.

Warning: even if the fsync succeeds, there is no guarantee that if the system would immediately crash that the diskheap file would not be corrupted.

Warning: on some operating systems, fsync may not be available in which case the DISKHEAP_ERROR_OS_CAPABLE error code will be returned.


Go to the first, previous, next, last section, table of contents.

Diskheap Home Page. Copyright 2002 by Gray Watson