Generated from cl_spinlock.h with ROBODoc v3.2.3 on Sat Jan 18 07:05:18 2003
TABLE OF CONTENTS
- Component Library: Spinlock/cl_spinlock_acquire
- Component Library: Spinlock/cl_spinlock_construct
- Component Library: Spinlock/cl_spinlock_destroy
- Component Library: Spinlock/cl_spinlock_init
- Component Library: Spinlock/cl_spinlock_release
- Public/Spinlock
NAME
cl_spinlock_acquire
DESCRIPTION
The cl_spinlock_acquire function acquires a spin lock.
SYNOPSIS
void
cl_spinlock_acquire(
IN cl_spinlock_t* const p_spinlock );
PARAMETERS
p_spin_lock
[in] Pointer to a spin lock structure to acquire.
RETURN VALUE
This function does not return a value.
SEE ALSO
Spinlock, cl_spin_lock_release
NAME
cl_spinlock_construct
DESCRIPTION
The cl_spinlock_construct function initializes the state of a
spin lock.
SYNOPSIS
void
cl_spinlock_construct(
IN cl_spinlock_t* const p_spinlock );
PARAMETERS
p_spin_lock
[in] Pointer to a spin lock structure whose state to initialize.
RETURN VALUE
This function does not return a value.
NOTES
Allows calling cl_spin_lock_destroy without first calling
cl_spin_lock_init.
Calling cl_spinlock_construct is a prerequisite to calling any other
spin lock function except cl_spinlock_init.
SEE ALSO
Spinlock, cl_spin_lock_init, cl_spin_lock_destroy
NAME
cl_spinlock_destroy
DESCRIPTION
The cl_spinlock_destroy function performs all necessary cleanup of a
spin lock.
SYNOPSIS
void
cl_spinlock_destroy(
IN cl_spinlock_t* const p_spinlock );
PARAMETERS
p_spin_lock
[in] Pointer to a spin lock structure to destroy.
RETURN VALUE
This function does not return a value.
NOTES
Performs any necessary cleanup of a spin lock. This function must only
be called if either cl_spin_lock_construct or cl_spin_lock_init has been
called.
SEE ALSO
Spinlock, cl_spin_lock_construct, cl_spin_lock_init
NAME
cl_spinlock_init
DESCRIPTION
The cl_spin_lock_init function initializes a spin lock for use.
SYNOPSIS
cl_status_t
cl_spinlock_init(
IN cl_spinlock_t* const p_spinlock );
PARAMETERS
p_spin_lock
[in] Pointer to a spin lock structure to initialize.
RETURN VALUES
CL_SUCCESS if initialization succeeded.
CL_ERROR if initialization failed. Callers should call
cl_spin_lock_destroy to clean up any resources allocated during
initialization.
NOTES
Initialize the spin lock structure. Allows calling cl_spin_lock_aquire
and cl_spin_lock_release.
SEE ALSO
Spinlock, cl_spin_lock_construct, cl_spin_lock_destroy,
cl_spin_lock_acquire, cl_spin_lock_release
NAME
cl_spinlock_release
DESCRIPTION
The cl_spinlock_release function releases a spin lock object.
SYNOPSIS
void
cl_spinlock_release(
IN cl_spinlock_t* const p_spinlock );
PARAMETERS
p_spin_lock
[in] Pointer to a spin lock structure to release.
RETURN VALUE
This function does not return a value.
NOTES
Releases a spin lock after a call to cl_spinlock_acquire.
SEE ALSO
Spinlock, cl_spin_lock_acquire
NAME
Spinlock
DESCRIPTION
Spinlock provides synchronization between threads for exclusive access to
a resource.
The spinlock functions manipulate a cl_spinlock_t structure which should
be treated as opaque and should be manipulated only through the provided
functions.
SEE ALSO
Structures:
cl_spinlock_t
Initialization:
cl_spinlock_construct, cl_spinlock_init, cl_spinlock_destroy
Manipulation
cl_spinlock_acquire, cl_spinlock_release