lockObj - lock a Shore object


CONTENTS


SYNOPSIS

enum LockMode { NL=0,IS=1,IX=2,S=3,SIX=4,U=5,X=6 };

VASResult shore_vas::lockObj(
            const  lrid_t     &obj,     
            LockMode          lock,     
            RequestMode       blockmode = Blocking
        );    

DESCRIPTION

LockObj locks an object without bringing it into the caller's address space.

ARGUMENTS

The argument obj is the full logical object identifier of the object to be locked.

The argument lock takes one of the values

    enum LockMode { NL=0,IS=1,IX=2,S=3,SIX=4,U=5,X=6 },
which indicates what kind of a lock the SVAS will acquire when the object is read. A value of NL has no effect. If the object is already locked at some level, the lock is upgraded if appropriate.

The argument blockmode takes a value from the enumeration

    enum RequestMode    { NonBlocking=0, Blocking = 1 };

The default value is Blocking, in which case the call to lockObj does not return until the lock is acquired or a deadlock occurs. Nonblocking lock requests are not implemented to date.

ENVIRONMENT

LockObj is available on both the server and clients.

LockObj must be called when a transaction is active.


ERRORS

Deadlocks can occur while locks are being acquired. See transaction(svas) for information about deadlocks.

A complete list of errors is in errors(svas).


VERSION

This manual page applies to Version 1.1.1 of the Shore software.

SPONSORSHIP

The Shore project is sponsored by the Advanced Research Project Agency, ARPA order number 018 (formerly 8230), monitored by the U.S. Army Research Laboratory under contract DAAB07-91-C-Q518.

COPYRIGHT

Copyright © 1994, 1995, 1996, 1997, Computer Sciences Department, University of Wisconsin -- Madison. All Rights Reserved.

SEE ALSO

readObj(svas), transaction(svas), and errors(svas).