lock_try_read(9r)lock_try_read(9r)NAME
lock_try_read - General: Tries to assert a complex lock with read-only access
SYNOPSIS
#include <kern/lock.h>
boolean_t lock_try_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 try
to assert a complex lock with read-only access. The lock structure is an opaque data structure; that is, its associated members are refer-
enced and manipulated by the operating system and not by the user of the complex lock mechanism.
DESCRIPTION
The lock_try_read routine tries to assert a complex lock (without blocking) with read-only access for the resource associated with the
specified lock structure pointer. To release a complex lock with read-only access successfully asserted by lock_try_read, call the
lock_done routine.
NOTES
You must call lock_init (once only) prior to calling lock_try_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 vari-
ables and in data structure members.
RETURN VALUES
The lock_try_read routine returns one of the following values: The attempt to acquire the read-only complex lock was successful. The
attempt to acquire the read-only complex lock was unsuccessful.
FILES SEE ALSO
Routines: lock_done(9r), lock_terminate(9r), lock_try_write(9r), lock_write(9r)
Data Structures: lock(9s)lock_try_read(9r)
Check Out this Related Man Page
lock_terminate(9r)lock_terminate(9r)NAME
lock_terminate - General: Terminates, using a complex lock
SYNOPSIS
#include <kern/lock.h>
void lock_terminate(
lock_t lock_structptr );
ARGUMENTS
Specifies a pointer to the complex lock structure, lock. 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_terminate routine determines that the driver is done using the complex lock forever. The complex lock must be free (that is, the
driver does not hold the lock) before calling lock_terminate. The kernel module must not reference the specified complex lock after calling
lock_terminate.
NOTES
You must call lock_init (once only) prior to calling lock_terminate 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
None
FILES SEE ALSO
Kernel routines: lock_done(9r), lock_init(9r), lock_try_read(9r), lock_try_write(9r), lock_write(9r)
Data Structures: lock(9s)lock_terminate(9r)
I found a lock file like this
lrwxrwxr-x 1 sskb apollo 16 Oct 22 22:00 lock -> hostname:2747
(pl. note that hostname is a number like 123.4.5.6)
but this was not shown in the file manager eventhough I had selected to show the hidden files.
I could not even read the... (4 Replies)
how can I lock my keyboard while I'm away from the computer without using lock command. What other commands gives me the option to lock keyboard device?
thanks (7 Replies)
Once I knew how to set up a unix file so that the num lock would automatically be on after booting up. How exactly is that done?
Unix has final control on the setting of the num lock from off or on to on at the end of the boot up process.
Any help will be appreciated, especially if detailed.
Oh... (0 Replies)
Hi Admin,
I need a help regarding to lock the user for 5 days..
for example i want to lock user account from Monday 1.00AM to Friday 1.00PM..
is there any method to do from Cron or passwd command.
Regards,
Prem :cool: (2 Replies)
hi friends
i have a small problem,in my redhat enterprise linux system screen lock is not working
if i click screen lock no action takes place...
so is there any solution to fix this problem or any alternate method available please let me know....
waiting for replys.......
thanks... (2 Replies)
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)
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)
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)