RFIO_LOCKF(3) | Rfio Library Functions | RFIO_LOCKF(3) |
rfio_lockf - provide record locking on files
#include <sys/types.h>
#include "rfio_api.h"
int rfio_lockf (int sd, int op, long siz);
Under Linux, for large files:
#define _LARGEFILE64_SOURCE
#include <sys/types.h>
#include "rfio_api.h"
int rfio_lockf64 (int sd, int op, off64_t siz);
For large files, under other systems:
#include <sys/types.h>
#include "rfio_api.h"
int rfio_lockf64 (int sd, int op, off64_t siz);
rfio_lockf restricts access to regions of files to the calling process.
sd is the file descriptor returned by a previous rfio_open.
op specifies the action to be taken:
siz gives the size of the region to be locked, starting at the current file offset.
rfio_lockf64 must be used for large files and uses an off64_t instead of a long to specify the size of the region to be locked.
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately.
LCG Grid Deployment Team
$Date: 2005/03/31 13:13:03 $ | LCG |