Previous section.

Protocols for Interworking: XNFS, Version 3W
Copyright © 1998 The Open Group


NLM_NM_LOCK - Non-monitored Lock

Call Arguments

struct nlm_lockargs { netobj cookie; bool block; /* Flag to indicate blocking behaviour. */ bool exclusive; /* If exclusive access is required. */ struct nlm_lock alock; /* Actual lock data */ bool reclaim; /* used for recovering locks */ int state; /* specify local NSM state */ };

Return Arguments

struct nlm_res { netobj cookie; nlm_stat stat; };

RPC Procedure Description

nlm_res NLM_NM_LOCK(nlm_lockargs) = 22;


This procedure should only be called by clients that do not run the NSM, for example personal computer clients. If an NSM is run on the client, then the NLM_LOCK (monitored lock) procedure should be used. This procedure has the same functionality as the NLM_LOCK procedure except that there is no monitoring performed via the NSM.

This procedure establishes a non-monitored lock on "alock.l_len" bytes starting at offset "alock.l_offset" in the file identified by "alock.fh". "state" should be set to 0, "block" should be set to false. This procedure does not block; it is the responsibility of the client to retry any rejected requests.

Locks created with this procedure should be released with the NLM_UNLOCK procedure.

The phrase "non-monitored" refers to the fact that the NLM will make no attempt to verify that the lock is still valid; if the client host crashes and restarts while the lock is still in effect, it must call the NLM_FREE_ALL procedure to release all locks held.

Return Codes

When the procedure returns, "stat" will be set to the following values:

Indicates that the procedure completed successfully.

Indicates that the procedure failed because the request conflicted with existing locks for the file.


Indicates that the procedure failed because the server NLM could not allocate the resources needed to process the request.


Indicates that the procedure failed because the server host has recently been rebooted and the server NLM is re-establishing existing locks, and is not yet ready to accept normal service requests.

Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index