Homepage > Man Pages > Category > Subroutines
Homepage > Man Pages > Name > A


man page of af_transaction

af_transaction: a simple transaction mechanism for AtFS


af_transaction, af_commit, af_abort - a simple transaction mechanism for AtFS


#include <atfs.h> int af_transaction (void) int af_commit (void) int af_abort (void)


These functions implement a simple transaction mechanism for AtFS. A transaction starts with calling af_transaction. All changes to existing ASOs performed hereafter have no immediate permanent effect. They rather get into effect, when the transaction is ended. Calling af_commit ends the transactions and causes all changes to be saved to disk. af_abort aborts the transaction without saving the changes. These will then be discarded. Only modification of the state of existing source ASOs will be deferred. Creation or deletion of ASOs have immediate effect, regardless if a transaction is in effect or not. Additionally, all operations on derived ASOs (all operations on the derived object cache) are not affected by the transaction. All archive files that are to be changed when the transaction is finished are locked until the end of the transaction. The lock prevents all other applications to perform any modifications on the archive file. You should make sure, that ending a transaction should never be dependent on the successful termination of another application (deadlock danger).


Upon error, -1 is returned and af_errno is set to the corresponding error number.
Changes to the contents of busy versions have immediate effect. AF_TRANSACTION(3)

Copyright © 2011–2018 by topics-of-interest.com . All rights reserved. Hosted by all-inkl.
Contact · Imprint · Privacy

Page generated in 30.23ms.

uhren.name | elternfragen.net | doomsdaydude.com