rock_util - Resource Lock Utilities

The Resource Lock Utilities provide a high-level interface to the VMS Lock Management facility.

Exclusive locking of a resource is as simple as:

    void  *lock ;
				-- Create null lock on resource.
    rock_create ("resourceName", NULL, &lock) ;
				-- Get and hold exclusive access to resource.
    rock_hold (lock, NULL, NULL) ;
    ... perform processing of resource ...
				-- Release hold on resource.
    rock_release (lock, NULL, NULL) ;

The ROCK_UTIL package also provides for more sophisticated types of locking, including support for non-blocking locking (I'm a poet!) using completion ASTs, the relinquishing of locks by blocking ASTs, and lock value blocks.

Public Procedures

rock_create() - creates a resource lock.
rock_delete() - deletes a resource lock.
rock_hold() - requests a more privileged lock on a resource.
rock_id() - returns the system ID for a resource lock.
rock_query() - returns information about a resource lock.
rock_release() - requests a less privileged lock on a resource.
rock_resource() - returns the name of the resource associated with a lock.

Source Files


Alex Measday  /  E-mail