#: 20698 S12/OS9/68000 (OSK)
11-Jan-95 21:12:26
Sb: #20687-#unix functions
Fm: Bob van der Poel 76510,2203
To: Bob van der Poel 76510,2203 (X)
>Locks, unlocks, and tests for locks on a Unix file. Calling syntax is
>'lockf(fd,cmd,size)', where fd and cmd are ints, and size is a long. >
>Command tokens are: > > F_ULOCK 0 /* unlock a previously locked section */ >
F_LOCK 1 /* lock a section for exclusive use */ > F_TLOCK 2 /* test and lock
a sexction (non-blockking) */ > F_TEST 3 /* test section for other
processes' locks */ > >I'm sure you could implement this with SS_LOCK etc on an
RBF device.
1. If you do something like lockf(fd, F_LOCK, 1234) which 1234 bytes would be
locked out?
2. If you use F_TLOCK what does non-blocking mean? After all, the idea of
doing a lock is _to_ lock (ie. block?) a part of a file?
Thanks Pete!
There is 1 Reply.
|