Back to index

glibc  2.9
Defines | Functions
aio_fsync.c File Reference
#include <aio.h>
#include <errno.h>
#include <aio_misc.h>

Go to the source code of this file.

Defines

#define aio_fsync64   XXX

Functions

int aio_fsync (int op, struct aiocb *aiocbp)

Define Documentation

#define aio_fsync64   XXX

Definition at line 27 of file aio_fsync.c.


Function Documentation

int aio_fsync ( int  op,
struct aiocb aiocbp 
)

Definition at line 37 of file aio_fsync.c.

{
  int flags;

  if (op != O_DSYNC && __builtin_expect (op != O_SYNC, 0))
    {
      __set_errno (EINVAL);
      return -1;
    }

  flags = fcntl (aiocbp->aio_fildes, F_GETFL);
  if (__builtin_expect (flags == -1, 0)
      || __builtin_expect ((flags & (O_RDWR | O_WRONLY)) == 0, 0))
    {
      __set_errno (EBADF);
      return -1;
    }

  return (__aio_enqueue_request ((aiocb_union *) aiocbp,
                             op == O_SYNC ? LIO_SYNC : LIO_DSYNC) == NULL
         ? -1 : 0);
}

Here is the call graph for this function:

Here is the caller graph for this function: