Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

simple_lock(9r) [osf1 man page]

simple_lock(9r) 														   simple_lock(9r)

NAME
simple_lock - General: Asserts a simple lock SYNOPSIS
#include <kern/lock.h> void simple_lock( simple_lock_t slock_ptr ); ARGUMENTS
Specifies a pointer to a simple lock structure. You can declare this simple lock structure by using the decl_simple_lock_data routine. DESCRIPTION
The simple_lock routine asserts a lock with exclusive access for the resource associated with the specified slock structure pointer. This means that no other kernel thread can gain access to the locked resource until you call simple_unlock to release it. Because simple locks are spin locks, simple_lock does not return until the lock has been obtained. NOTES
You must call simple_lock_init (once only) prior to calling simple_lock to initialize the simple lock structure 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: decl_simple_lock_data(9r), simple_lock_init(9r), simple_lock_terminate(9r), simple_lock_try(9r), simple_unlock(9r) Data Structures: slock(9s) simple_lock(9r)

Check Out this Related Man Page

decl_simple_lock_data(9r)												 decl_simple_lock_data(9r)

NAME
decl_simple_lock_data - General: Declares a simple lock structure SYNOPSIS
#include <kern/lock.h> void decl_simple_lock_data( char class, char name ); ARGUMENTS
Specifies the class of the declaration. For example, you pass the keyword extern if you want to declare the simple lock structure as an external structure. Specifies the name you want the decl_simple_lock_data routine to assign to the declaration of the simple lock struc- ture. DESCRIPTION
The decl_simple_lock_data routine declares a simple lock structure, slock, of the specified name. You declare a simple lock structure to protect data structures and device register access. You use decl_simple_lock_data to declare a simple lock structure and then pass it to the following simple lock-specific routines: simple_lock_init, simple_lock, simple_lock_try, simple_unlock, and simple_lock_terminate. RETURN VALUES
None FILES
SEE ALSO
Routines: simple_lock(9r), simple_lock_try(9r), simple_lock_init(9r), simple_unlock(9r) Data Structures: slock(9s) decl_simple_lock_data(9r)
Man Page

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Ok simple question for simple knowledge...

Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies

2. Shell Programming and Scripting

Modifying simple commands to create a script

Can anyone direct me to a resource that explains scripting in simple terms? I have visited many sites and browsed this forum and have yet to find simple explanations. (8 Replies)
Discussion started by: rocinante
8 Replies

3. UNIX for Dummies Questions & Answers

Can we optimize this simple script ?

Hi All , I am just a new bie in Unix/Linux . With help of tips from 'here and there' , I just created a simple script to 1. declare one array and some global variables 2. read the schema names from user (user input) and want2proceed flag 3. if user want to proceed , keep reading user... (8 Replies)
Discussion started by: rajavu
8 Replies

4. What is on Your Mind?

Those simple one liners

I wanted to say LOL and punch my face when I saw post#11 (where Don_Cragun even reduced the string manipulation with a simple regex) in the thread https://www.unix.com/shell-programming-scripting/220553-add-0-start-filename-2.html I mean, when things can be done with just a one liner, sometimes I... (6 Replies)
Discussion started by: ahamed101
6 Replies