lock_try_write(9r)lock_try_write(9r)NAME
lock_try_write - General: Tries to assert a complex lock with write access
SYNOPSIS
#include <kern/lock.h>
boolean_t lock_try_write(
lock_t lock_structptr );
ARGUMENTS
Specifies a pointer to the complex lock structure, lock. This is the lock structure associated with the resource on which you want to try
to assert write access. The lock structure is an opaque data structure; that is, its associated members are referenced and manipulated by
the Tru64 UNIX operating system and not by the user of the complex lock mechanism.
DESCRIPTION
The lock_try_write routine tries to assert a complex lock (without blocking) with write access for the resource associated with the speci-
fied lock structure pointer. To release a complex lock with write access successfully asserted by lock_try_write, call the lock_done rou-
tine.
NOTES
You must call lock_init (once only) prior to calling lock_try_write to initialize the lock structure pointer for the resource. A resource,
from the kernel module's standpoint, is data that more than one kernel thread can manipulate. You can store the resource in global vari-
ables and in data structure members.
RETURN VALUES
The lock_try_write routine returns one of the following values: The attempt to acquire the write complex lock was successful. The attempt
to acquire the write complex lock was unsuccessful.
FILES SEE ALSO
Routines: lock_done(9r), lock_terminate(9r), lock_try_read(9r), lock_write(9r)
Data Structures: lock(9s)lock_try_write(9r)
Check Out this Related Man Page
lock_read(9r)lock_read(9r)NAME
lock_read - General: Asserts a complex lock with read-only access
SYNOPSIS
#include <kern/lock.h>
void lock_read(
lock_t lock_structptr );
ARGUMENTS
Specifies a pointer to the complex lock structure, lock. This is the lock structure associated with the resource on which you want to
assert a complex lock with read-only access. The lock structure is an opaque data structure; that is, its associated members are referenced
and manipulated by the operating system and not by the user of the complex lock mechanism.
DESCRIPTION
The lock_read routine asserts a lock with read-only access for the resource associated with the specified lock structure pointer. The
lock_read routine allows multiple kernel threads to access the resource read-only at the same time. When a read lock is asserted, the pro-
tected resource is guaranteed not to change.
To release a previously asserted read lock, call the lock_done routine.
NOTES
You must call lock_init (once only) prior to calling lock_read to initialize the lock structure pointer for the resource. A resource, from
the kernel module's standpoint, is data that more than one kernel thread can manipulate. You can store the resource in global variables and
in data structure members.
RETURN VALUES
None
FILES SEE ALSO
Routines: lock_done(9r), lock_terminate(9r), lock_try_read(9r), lock_try_write(9r), lock_write(9r)
Data Structures: lock(9s)lock_read(9r)
is there a way to "lock" an entire directory to where it currently resides for securtiy purposes? only certain users can access these data, however i want to prevent the possibility of transferring/duplicating the data to where other unauthorized users can access it. Any one who knows a good... (4 Replies)
Is there any book/resource that one can refer to, to be able to write programs at kernel/system level.. I'm looking for a programming book that could serve as a guide to write kernel codes / system level programming etc..
I have Tannenbaum's Design and Implementation. It addresses theoretical... (2 Replies)
Hi Everybody..
I am using Moblin V2 which has nautilus file manager the one which is also used in Ubuntu.
I want to lock the access to file system such that i can only browse my home folder not other locations like /, /usr, /bin and all.
Or i want to create a partition of 10 or 15 GB so... (1 Reply)
Hi Everybody..
I am using Moblin V2 which has nautilus file manager the one which is also used in Ubuntu.
I want to lock the access to file system such that i can only browse my home folder not other locations like /, /usr, /bin and all.
Or i want to create a partition of 10 or 15 GB so... (4 Replies)
Hello Friends,
I need to examine a huge CDR file according to a complex (at least for me) condition like below and i couldnt write anything :(
In CDR file there are more than hundreds of fields, I need to print the rows which matches the below condition:
while $13 field of subsequent... (9 Replies)
Hi All!
I am not able to lock my Ubuntu 12.04 LXDE.
Can anybody tell me the shortcut to lock the system.
I have tried all conventional keyboard shortcuts as well as buttons. (2 Replies)
Hi Team,
I have a requirement to access a shared resource from the user and interrupt context. What type of locking mechanism I have to use for this. Can any body give advice on this.
Thanks in advance.
-Shiva (4 Replies)