slock(9s)slock(9s)NAME
slock - General: Contains simple lock-specific information
SYNOPSIS
The slock data structure is an opaque data structure; that is, its associated members are referenced and manipulated by the operating sys-
tem and not by the user of the simple lock method. Therefore, this reference page omits a description of the slock data structure's associ-
ated members.
DESCRIPTION
The slock data structure is the simple spin lock structure that contains simple lock-specific information. The user of the simple lock
method declares a slock data structure by calling the decl_simple_lock_data routine. In subsequent calls to simple_lock, simple_lock_init,
simple_lock_try, and simple_unlock, the caller passes the address of the previously declared slock data structure.
NOTES
The header file <lock.h> shows typedef statements that assign the alternate name simple_lock_data_t for the simple spin lock structure and
simple_lock_t for a pointer to the simple spin lock structure.
FILES SEE ALSO
Routines: decl_simple_lock_data(9r), simple_lock(9r), simple_lock_init(9r), simple_lock_terminate(9r), simple_lock_try(9r), sim-
ple_unlock(9r)
Data Structures: lock(9s)slock(9s)
Check Out this Related Man Page
simple_lock_try(9r)simple_lock_try(9r)NAME
simple_lock_try - General: Tries to assert a simple lock
SYNOPSIS
#include <kern/lock.h>
boolean_t simple_lock_try(
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_try routine tries to assert a lock with read and write access for the resource associated with the specified simple lock.
The main difference between this routine and simple_lock is that simple_lock_try returns immediately if the resource is already locked,
while simple_lock spins until the lock has been obtained. Thus, call simple_lock_try when you need a simple lock but the code cannot spin
until the lock is obtained.
To release a simple lock successfully asserted by simple_lock_try, call the simple_unlock routine.
RETURN VALUES
The simple_lock_try routine returns one of the following values: The simple_lock_try routine successfully asserted the simple lock. The
simple_lock_try routine failed to assert the simple lock.
FILES SEE ALSO
Routines: decl_simple_lock_data(9r), simple_lock(9r), simple_lock_init(9r), simple_lock_terminate(9r), simple_unlock(9r)
Data Structures: slock(9s)simple_lock_try(9r)
I am new to scropting and I am just trying to work on a few simple things....
Using sh I want to do something similar to the follwoing run a simple command like a dig then I want it to get the server that it is authorotative and return it to me saying somehting like xx.xx is authorotative. I am... (3 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)
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)
Dear All,
I would appreciate if some one could please post a few examples using GDSL library. The library provides general data structure operations.
I am having confusion using list data structure regarding arguments.
Would appreciate your kind response.
with regards,
Usman (2 Replies)
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)