| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 3: Basic Library Functions Oracle Solaris 11 Information Library |
enable_extended_FILE_stdio(3C)
posix_spawnattr_getschedparam(3C)
posix_spawnattr_getschedpolicy(3C)
posix_spawnattr_getsigdefault(3C)
posix_spawnattr_getsigignore_np(3C)
posix_spawnattr_getsigmask(3C)
posix_spawnattr_setschedparam(3C)
posix_spawnattr_setschedpolicy(3C)
posix_spawnattr_setsigdefault(3C)
posix_spawnattr_setsigignore_np(3C)
posix_spawnattr_setsigmask(3C)
posix_spawn_file_actions_addclose(3C)
posix_spawn_file_actions_addclosefrom_np(3C)
posix_spawn_file_actions_adddup2(3C)
posix_spawn_file_actions_addopen(3C)
posix_spawn_file_actions_destroy(3C)
posix_spawn_file_actions_init(3C)
pthread_attr_getdetachstate(3C)
pthread_attr_getinheritsched(3C)
pthread_attr_getschedparam(3C)
pthread_attr_getschedpolicy(3C)
pthread_attr_setdetachstate(3C)
pthread_attr_setinheritsched(3C)
pthread_attr_setschedparam(3C)
pthread_attr_setschedpolicy(3C)
pthread_barrierattr_destroy(3C)
pthread_barrierattr_getpshared(3C)
pthread_barrierattr_setpshared(3C)
pthread_condattr_getpshared(3C)
pthread_condattr_setpshared(3C)
pthread_cond_reltimedwait_np(3C)
pthread_key_create_once_np(3C)
pthread_mutexattr_getprioceiling(3C)
pthread_mutexattr_getprotocol(3C)
pthread_mutexattr_getpshared(3C)
pthread_mutexattr_getrobust(3C)
pthread_mutexattr_setprioceiling(3C)
pthread_mutexattr_setprotocol(3C)
pthread_mutexattr_setpshared(3C)
pthread_mutexattr_setrobust(3C)
pthread_mutex_getprioceiling(3C)
pthread_mutex_reltimedlock_np(3C)
pthread_mutex_setprioceiling(3C)
pthread_rwlockattr_destroy(3C)
pthread_rwlockattr_getpshared(3C)
pthread_rwlockattr_setpshared(3C)
pthread_rwlock_reltimedrdlock_np(3C)
pthread_rwlock_reltimedwrlock_np(3C)
pthread_rwlock_timedrdlock(3C)
pthread_rwlock_timedwrlock(3C)
rctlblk_get_enforced_value(3C)
- asynchronous file synchronization
#include <aio.h>intaio_fsync(intop,struct aiocb *aiocbp);
Theaio_fsync() function asynchronously forces all I/O operations associated with the fileindicated by the file descriptoraio_fildes member of theaiocb structure referencedby theaiocbp argument and queued at the time of the call toaio_fsync() to the synchronized I/O completion state. The function call returns whenthe synchronization request has been initiated or queued to the file ordevice (even when the data cannot be synchronized immediately).
Ifop isO_DSYNC, all currently queued I/O operations are completed asif by a call tofdatasync(3C); that is, as defined for synchronized I/Odata integrity completion. Ifop isO_SYNC, all currently queued I/O operationsare completed as if by a call tofsync(3C); that is, asdefined for synchronized I/O file integrity completion. If theaio_fsync() function fails,or if the operation queued byaio_fsync() fails, then, as forfsync(3C)andfdatasync(3C), outstanding I/O operations are not guaranteed to have been completed.
Ifaio_fsync() succeeds, then it is only the I/O that was queuedat the time of the call toaio_fsync() that is guaranteed tobe forced to the relevant completion state. The completion of subsequent I/Oon the file descriptor is not guaranteed to be completed in a synchronizedfashion.
Theaiocbp argument refers to an asynchronous I/O control block. Theaiocbpvalue may be used as an argument toaio_error(3C) andaio_return(3C) inorder to determine the error status and return status, respectively, of theasynchronous operation while it is proceeding. When the request is queued, the errorstatus for the operation isEINPROGRESS. When all data has been successfullytransferred, the error status will be reset to reflect the success orfailure of the operation. If the operation does not complete successfully, the errorstatus for the operation will be set to indicate the error. Theaio_sigevent member determines the asynchronous notification to occur when all operations haveachieved synchronized I/O completion (seesignal.h(3HEAD)). All other members of the structurereferenced byaiocbp are ignored. If the control block referenced byaiocbpbecomes an illegal address prior to asynchronous I/O completion, then the behavior isundefined.
If theaio_fsync() function fails or theaiocbp indicates an error condition,data is not guaranteed to have been successfully transferred.
Ifaiocbp isNULL, then no status is returned inaiocbp, andno signal is generated upon completion of the operation.
Theaio_fsync() function returns0 to the calling process if the I/Ooperation is successfully queued; otherwise, the function returns-1 and setserrnoto indicate the error.
Theaio_fsync() function will fail if:
The requested asynchronous operation was not queued due to temporary resource limitations.
Theaio_fildes member of theaiocb structure referenced by theaiocbp argument is not a valid file descriptor open for writing.
The system does not support synchronized I/O for this file.
A value ofop other thanO_DSYNC orO_SYNC was specified.
In the event that any of the queued I/O operations fail,aio_fsync()returns the error condition defined forread(2) andwrite(2). The error willbe returned in the error status for the asynchronousfsync(3C) operation, whichcan be retrieved usingaio_error(3C).
Theaio_fsync() function has a transitional interface for 64-bit file offsets. Seelf64(5).
Seeattributes(5) for descriptions of the following attributes:
|
fcntl(2),open(2),read(2),write(2),aio_error(3C),aio_return(3C),aio.h(3HEAD),fcntl.h(3HEAD),fdatasync(3C),fsync(3C),signal.h(3HEAD),attributes(5),lf64(5),standards(5)
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |