FTAM/9000 Programmer's Guide
Chapter 3 111
HP FTAM/9000 Data Structures
Ft_concurrency_control
Ft_file_lock
enum Ft_file_lock {
FT_NOT_REQUIRED = 0,
FT_SHARED = 1,
FT_EXCLUSIVE = 2,
FT_NO_ACCESS = 3
};
Ft_file_lock enumerates the type of locks on a file. It is the enumerated
type for values in struct Ft_concurrency_control. For example, if you
want to be able to read a file, but you do not want other users to be able
to, set the concurrency_control.read lock to FT_EXCLUSIVE.
Rules for Ft_concurrency_control
• You may wish to set concurrency control to NULL wherever it exists
as a parameter. This way, the responder uses its own default values.
HP-UX responders use the defaults specified in the NBS Phase III
agreements. The values used by a responder during the open regime
are returned in the inout_dcb of the ft_open() and ft_fopen() calls.
• If you use concurrency control (concurrency control is not NULL), you
must specify a lock for each file action.
• For those actions that are available (because you requested them in
the requested_access parameter), the applicable locks are
FT_SHARED and FT_EXCLUSIVE.
• For those actions not available (because you did not request them in
the requested_access parameter), the applicable locks are
FT_NO_ACCESS and FT_NOT_REQUIRED.
File Action Lock Set by
Ft_file_lock
Owner May Perform The
Action
Others May Perform The
Action
Not Required No Yes
Shared Yes Yes
Exclusive Yes No
No Access No No