Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

simple_lock_terminate(9r) [osf1 man page]

simple_lock_terminate(9r)												 simple_lock_terminate(9r)

NAME
simple_lock_terminate - General: Terminates, using a simple lock SYNOPSIS
#include <kern/lock.h> void simple_lock_terminate( 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_terminate routine determines that the kernel module is done using the simple lock permanently. The kernel module must free the simple lock (that is, the kernel module does not hold the lock) before calling simple_lock_terminate. The kernel module must not refer- ence the specified simple lock after calling simple_lock_terminate. NOTES
You must call simple_lock_init (once only) prior to calling simple_lock_terminate 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_try(9r), simple_unlock(9r) Data Structures: slock(9s) simple_lock_terminate(9r)

Check Out this Related 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)
Man Page

12 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. UNIX for Dummies Questions & Answers

Too simple to search for

Hey. I'm just getting started with scripting and although i will admit i haven't searched the forum yet, i think it would be a waste of time. It really will be very simple. I want to enter a list of arguments after my script with the last being the filename. (not the first, as this is part of... (3 Replies)
Discussion started by: spudtheimpaler
3 Replies

3. 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

4. SuSE

max number of slabs per kernel module (kernel 2.6.17, suse)

Hi All, Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff. Cheers, Brendan (4 Replies)
Discussion started by: Brendan Kennedy
4 Replies

5. IP Networking

kernel module

Hi All, I need to develop a kernel module which changes the IP address of a package according to its mac address. It would be a sort of L2 Nat. Somebody know if I can do this using netfilter?? Thanks. (2 Replies)
Discussion started by: lagigliaivan
2 Replies

6. 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

7. UNIX for Dummies Questions & Answers

Text book / online resource for learning to program at system/kernel level

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)
Discussion started by: vishwamitra
2 Replies

8. UNIX for Dummies Questions & Answers

insmod: Invalid module format error

I have open suse kernel kernel 3.1.0-1.2-desktop on which I used kernel source 3.1.10-1.2 downloaded from kernel.org. The module gets built. While loading a kernel module I am getting Invalid module format error with description "first_driver: no symbol version for module_layout" The... (5 Replies)
Discussion started by: rupeshkp728
5 Replies

9. Linux

/var/lock/subsys permission denied for root

Hello I have simple line of code here: FILE *lockfp = fopen("/var/lock/subsys/processName", "w"); which is denied even running as root. The result is locking failed for the following reason: Permission denied How is this possible? Why is this happening? Thanks for your... (4 Replies)
Discussion started by: flagman5
4 Replies

10. Ubuntu

Static Driver Loading Issue

To load the driver at boot time I added my driver name in /etc/modules. Next I copied the driver to /lib/modules/2.6.34.12/kernel/drivers/char/. But when I reboot the machine the drriver does not get loaded. What am I missing and how to load the driver at boot time? (9 Replies)
Discussion started by: rupeshkp728
9 Replies

11. Shell Programming and Scripting

New to Linux, have some simple question

Hi All, Here is the problem: I have done a c++ code in Visual Studio 2010, it's a simple project that only have one main function which takes 2 parameters: an integer and a file that stores data. Now, I am asked to write a shell script in linux to execute my main function. I asked my professor... (1 Reply)
Discussion started by: EasonRU
1 Replies

12. 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