lock_done(9r)lock_done(9r)NAME
lock_done - General: Releases a complex lock
SYNOPSIS
#include <kern/lock.h>
void lock_done(
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_done routine releases a lock that was previously asserted by one of the following complex lock routines: lock_read, lock_try_read,
lock_try_write, and lock_write.
NOTES
You must hold the lock on the resource before calling lock_done.
RETURN VALUES
None
FILES SEE ALSO
Routines: lock_init(9r), lock_read(9r), lock_terminate(9r), lock_try_read(9r), lock_try_write(9r), lock_write(9r)
Data Structures: lock(9s)lock_done(9r)
Check Out this Related Man Page
lock_write(9r)lock_write(9r)NAME
lock_write - Asserts a complex lock with write access
SYNOPSIS
#include <kern/lock.h>
void lock_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
assert a complex lock with write 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_write routine asserts a lock with exclusive write access for the resource associated with the specified lock structure pointer.
This means that once a write lock is asserted, no other kernel thread can gain read or write access to the resource until it is released.
To release a complex write lock successfully asserted by lock_write, call the lock_done routine.
NOTES
You must call lock_init (once only) prior to calling lock_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
None
FILES SEE ALSO
Routines: lock_done(9r), lock_read(9r), lock_terminate(9r), lock_try_read(9r), lock_try_write(9r)
Data Structures: lock(9s)lock_write(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)
Hi,
I want to do the foll steps:
1. Check if someone has a lock on my file1.
2. if file1 is locked by any other user
wait in a loop till another user releases lock
3. when lock released, lock file1.
4. do procesing (write) on file1.
5. processing complete. release lock on file1.
... (2 Replies)
I have a Sol system. The lock timeout is default 15 minutes. I tried to make it longer but cannot by
lock -t timeout
Anyon can tell me the cmd in solai for this please.
A thank in advance (2 Replies)
Hi Guys,
I have the below;
case $1 in
checkvob) checkvob_log=$log_loc/cchealth/$1/$1.$date_stamp.$$ ;;
dbcheck) dbcheck_log=$log_loc/cchealth/$1/$1.$date_stamp.$$ ;;
lock) lock_log=$log_loc/cchealth/$1/$1.$date_stamp.$$ ;;
... (2 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)
Hello,
I need to implement a locking system in C. My problem is how to make the check if the lock file exist and locking it atomic operation.
I want to make something like this:
FILE* lock_fname;
lock_fname = fopen ( "file.lock", "r");
/*check if file exsists*/
if (lock_fname)
{
fclose... (7 Replies)
hello every one
i am working on a project to lock remote computer resources(hard drive, usb, cd- rom, folder etc). i have maintained connection using JAVA RMI and using JAVA JNI to lock resources, now i am really stuck up with C programme to do actual locking, i am using RHL-5 on admin computer... (7 Replies)
Hello,
We are having a problem with running dtterm off a RHEL server. Logging into an HP-UX server from a RHEL 5.1 desktop, setting DISPLAY and running dtterm, the caps lock does not work. We have been playing with xmodmap & stty but to no avail.
Any help appreciated.
mgb (7 Replies)
I am trying to create a script that will take a very large, tab delimited file and then lock accounts.
File headers look like this
id desc server pass sudo lock
test Test user server01 67 no no
"Test user" is under the desc column
Basically if pass column is greater... (5 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)
I'm having a weird problem with a RHEL6 workstation. When the screen lock is activated manually the system will lock and the screens will go blank. Once I try to unlock the system, the monitor will just flicker and won't respond. I tried the combination CTRL, ALT, Backspace and it did not work,... (4 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)