RTEMS Logo

RTEMS 4.10.2 On-Line Library


fdatasync

PREV UP NEXT Bookshelf RTEMS Filesystem Design Guide

4.11: fdatasync

File:

fdatasync.c

Processing:

This routine is a template in the in memory filesystem that will route us to the appropriate handler function to carry out the fdatasync() processing. In the in memory filesystem this function is not necessary. Its function in a disk based file system that employs a memory cache is to flush all memory based data buffers to disk. It is layered on the following functions and macros:

Development Comments:

The routine will test to see if the file descriptor index is associated with a network connection. If it is, an error is returned from this routine.

The file descriptor index is used to obtain the associated file control block.

The file descriptor value is range checked.

The file control block is examined to determine if it has write permissions to the file.

A test is made to determine if the handler table that is referenced in the file control block contains an entry for the fdatasync() handler function. If it does not an error is returned to the calling routine.

If the fdatasync() handler function exists, it is called with the file control block as its parameter.


PREV UP NEXT Bookshelf RTEMS Filesystem Design Guide

Copyright © 1988-2008 OAR Corporation