.ig Copyright (C) 1993,1994 by the author(s). This software is published in the hope that it will be useful, but WITHOUT ANY WARRANTY for any part of this software to work correctly or as described in the manuals. See the ShapeTools Public License for details. Permission is granted to use, copy, modify, or distribute any part of this software but only under the conditions described in the ShapeTools Public License. A copy of this license is supposed to have been given to you along with ShapeTools in a file named LICENSE. Among other things, this copyright notice and the Public License must be preserved on all copies. Author: Andreas Lampen (Andreas.Lampen@cs.tu-berlin.de) $Header: af_transact.3[7.0] Fri Jun 25 14:33:21 1993 andy@cs.tu-berlin.de frozen $ .. .TH af_transact 3 "Fri Jun 25 14:33:21 1993" "AtFS-1.71" "Attribute Filesystem (AtFS)" .SH NAME af_transaction, af_commit, af_abort \- a simple transaction mechanism for AtFS .SH SYNOPSIS #include .sp int af_transaction (void) .sp int af_commit (void) .sp int af_abort (void) .sp .SH DESCRIPTION These functions implement a simple transaction mechanism for AtFS. A transaction starts with calling \fIaf_transaction\fP. All changes to existing ASOs performed hereafter have no immediate permanent effect. They rather get into effect, when the transaction is ended. Calling \fIaf_commit\fP ends the transactions and causes all changes to be saved to disk. \fIaf_abort\fP aborts the transaction without saving the changes. These will then be discarded. .LP 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. .LP 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). .SH DIAGNOSTICS Upon error, \-1 is returned and \fIaf_errno\fP is set to the corresponding error number. .SH BUGS Changes to the contents of busy versions have immediate effect.