gtpc2mjl | C/C++ Language Support User's Guide |
This type of function is specified as part of the file system device driver interface and is called by the fsync function to synchronize any data that may be buffered by the device driver or by the TPF system.
Format
typedef long TPF_FSDD_SYNC(const TPF_FSDD_FILEDATA *filedata);
Normal Return
Error Return
Programming Considerations
Examples
The following example is the synchronization device driver interface function for the null file (/dev/null).
#include <c$spif.h> /* Device driver interface */ /**********************************************************************/ /* The null_sync() function synchronizes a null file. It always */ /* succeeds. Note that this function does not need to be specified */ /* for the null file device driver because the default behavior when */ /* no TPF_FSDD_SYNC-type function is specified also is to always */ /* succeed. */ /**********************************************************************/ long null_sync(const TPF_FSDD_FILEDATA *filedata) { return 0; }
Related Information