Beispiel #1
0
int                     /* Lock a file region using nonblocking F_SETLK */
lockRegion(int fd, int type, int whence, int start, int len)
{
    return lockReg(fd, F_SETLK, type, whence, start, len);
}
Beispiel #2
0
int                     /* Lock a file region using blocking F_SETLKW */
lockRegionWait(int fd, int type, int whence, int start, int len)
{
    return lockReg(fd, F_SETLKW, type, whence, start, len);
}
Beispiel #3
0
/* Lock 'op' by locking its register(s) */
void lock(opdesc *op)
{ 
    if (op->type != constop) lockReg(op->reg); 
    if (op->type == indexop) lockReg(op->reg2);
}