Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rfio_lockf64(3) [debian man page]

RFIO_LOCKF(3)						      Rfio Library Functions						     RFIO_LOCKF(3)

NAME
rfio_lockf - provide record locking on files SYNOPSIS
#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); DESCRIPTION
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: F_ULOCK unlock a region. F_LOCK lock a region. F_TLOCK test and lock a region. F_TEST test a region for other locks. 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. RETURN VALUE
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately. ERRORS
EBADF sd is not a valid descriptor. EACCES The file region is locked and F_TEST or F_TLOCK was specified. EINVAL incorrect value for op or siz. SENOSHOST Host unknown. SENOSSERV Service unknown. SETIMEDOUT Timed out. SECONNDROP Connection closed by remote end. SECOMERR Communication error. SEE ALSO
rfio_open(3) AUTHOR
LCG Grid Deployment Team LCG
$Date: 2005/03/31 13:13:03 $ RFIO_LOCKF(3)

Check Out this Related Man Page

RFIO_FTELL(3)						      Rfio Library Functions						     RFIO_FTELL(3)

NAME
rfio_ftell - tells the position in a stream SYNOPSIS
#include <sys/types.h> #include "rfio_api.h" long rfio_ftell (FILE *fp); Under Linux, for large files: #define _LARGEFILE64_SOURCE #include <sys/types.h> #include "rfio_api.h" off64_t rfio_ftello64 (FILE *fp); For large files, under other systems: #include <sys/types.h> #include "rfio_api.h" off64_t rfio_ftello64 (FILE *fp); DESCRIPTION
rfio_ftell returns the current position in the file stream pointed by fp. RETURN VALUE
This routine returns the position if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appro- priately. ERRORS
EBADF fp is not a valid descriptor. SENOSHOST Host unknown. SENOSSERV Service unknown. SETIMEDOUT Timed out. SEBADVERSION Version ID mismatch. SEINTERNAL Internal error. SECONNDROP Connection closed by remote end. SECOMERR Communication error. SEE ALSO
rfio_fopen(3) AUTHOR
LCG Grid Deployment Team LCG
$Date: 2005/03/31 13:13:02 $ RFIO_FTELL(3)
Man Page