rfio_lockf man page

RFIO_LOCKF(3)               Rfio Library Functions               RFIO_LOCKF(3)

[1mNAME[0m
      rfio_lockf - provide record locking on files

[1mSYNOPSIS[0m
      [1m#include <sys/types.h>[0m
      [1m#include "rfio_api.h"[0m

      [1mint rfio_lockf (int [4m[22msd[24m[1m, int [4m[22mop[24m[1m, long [4m[22msiz[24m[1m);[0m

      Under Linux, for large files:
      [1m#define _LARGEFILE64_SOURCE[0m
      [1m#include <sys/types.h>[0m
      [1m#include "rfio_api.h"[0m

      [1mint rfio_lockf64 (int [4m[22msd[24m[1m, int [4m[22mop[24m[1m, off64_t [4m[22msiz[24m[1m);[0m

      For large files, under other systems:
      [1m#include <sys/types.h>[0m
      [1m#include "rfio_api.h"[0m

      [1mint rfio_lockf64 (int [4m[22msd[24m[1m, int [4m[22mop[24m[1m, off64_t [4m[22msiz[24m[1m);[0m

[1mDESCRIPTION[0m
      [1mrfio_lockf [22mrestricts access to regions of files to the calling process.

      [4msd[24m is the file descriptor returned by a previous [1mrfio_open[22m.

      [4mop[24m specifies the action to be taken:

             [1mF_ULOCK      [22munlock a region.

             [1mF_LOCK       [22mlock a region.

             [1mF_TLOCK      [22mtest and lock a region.

             [1mF_TEST       [22mtest a region for other locks.

      [4msiz[24m  gives the size of the region to be locked, starting at the current
      file offset.

      [1mrfio_lockf64 [22mmust be used for large files and uses an  off64_t  instead
      of a long to specify the size of the region to be locked.

[1mRETURN VALUE[0m
      This  routine  returns  0  if the operation was successful or -1 if the
      operation failed. In the latter case, [1mserrno [22mis set appropriately.

[1mERRORS[0m
      [1mEBADF        [4m[22msd[24m is not a valid descriptor.

      [1mEACCES       [22mThe file region is locked and F_TEST or F_TLOCK was speci-
                   fied.

      [1mEINVAL       [22mincorrect value for [4mop[24m or [4msiz[24m.

      [1mSENOSHOST    [22mHost unknown.

      [1mSENOSSERV    [22mService unknown.

      [1mSETIMEDOUT   [22mTimed out.

      [1mSECONNDROP   [22mConnection closed by remote end.

      [1mSECOMERR     [22mCommunication error.

[1mSEE ALSO[0m
      [1mrfio_open(3)[0m

[1mAUTHOR[0m
      [1mLCG Grid Deployment [22mTeam

LCG                      $Date: 2005/03/31 13:13:03 $            RFIO_LOCKF(3)

Referenced By

rfio_lockf64(3) is an alias of rfio_lockf(3).