Generated from ./inc/complib/cl_irqlock.h with ROBODoc v4.99.17 on Sun Mar 04 2007 18:17:52

[Modules] Component Library/Irqlock

[top][parent][index]

NAME

       Irqlock

DESCRIPTION

       Irqlock provides synchronization at interrupt level between threads for 
       exclusive access to a resource.

       The irqlock functions manipulate a cl_irqlock_t structure which should 
       be treated as opaque and should be manipulated only through the provided 
       functions.

SEE ALSO

       Structures:
               cl_irqlock_t

       Initialization:
               cl_irqlock_construct, cl_irqlock_init, cl_irqlock_destroy

       Manipulation
               cl_irqlock_acquire, cl_irqlock_release

[Functions] Component Library: Irqlock/cl_irqlock_acquire

[top][index]

NAME

       cl_irqlock_acquire

DESCRIPTION

       The cl_irqlock_acquire function acquires a IRQ lock.
       This version of lock does not prevent an interrupt from 
       occuring on the processor on which the code is being
       executed. To protect from an interrupt level resource
       use the cl_irqlock_acquire_irq function.

SYNOPSIS

CL_EXPORT void CL_API
cl_irqlock_acquire( 
        IN      cl_irqlock_t* const             p_irqlock );

PARAMETERS

       p_irqlock 
               [in] Pointer to a IRQ lock structure to acquire.

RETURN VALUE

       This function does not return a value.

SEE ALSO

       Irqlock, cl_irqlock_release

[Functions] Component Library: Irqlock/cl_irqlock_construct

[top][index]

NAME

       cl_irqlock_construct

DESCRIPTION

       The cl_irqlock_construct function initializes the state of a 
       IRQ lock.

SYNOPSIS

CL_EXPORT void CL_API
cl_irqlock_construct( 
        IN      cl_irqlock_t* const             p_irqlock );

PARAMETERS

       p_irqlock 
               [in] Pointer to a IRQ lock structure whose state to initialize.

RETURN VALUE

       This function does not return a value.

NOTES

       Allows calling cl_irqlock_destroy without first calling 
       cl_irqlock_init.

       Calling cl_irqlock_construct is a prerequisite to calling any other
       IRQ lock function except cl_irqlock_init.

SEE ALSO

       Irqlock, cl_irqlock_init, cl_irqlock_destroy

[Functions] Component Library: Irqlock/cl_irqlock_destroy

[top][index]

NAME

       cl_irqlock_destroy

DESCRIPTION

       The cl_irqlock_destroy function performs all necessary cleanup of a 
       IRQ lock.

SYNOPSIS

CL_EXPORT void CL_API
cl_irqlock_destroy( 
        IN      cl_irqlock_t* const             p_irqlock );

PARAMETERS

       p_irqlock 
               [in] Pointer to a IRQ lock structure to destroy.

RETURN VALUE

       This function does not return a value.

NOTES

       Performs any necessary cleanup of a IRQ lock. This function must only 
       be called if either cl_irqlock_construct or cl_irqlock_init has been 
       called.

SEE ALSO

       Irqlock, cl_irqlock_construct, cl_irqlock_init

[Functions] Component Library: Irqlock/cl_irqlock_init

[top][index]

NAME

       cl_irqlock_init

DESCRIPTION

       The cl_irqlock_init function initializes a IRQ lock for use.

SYNOPSIS

CL_EXPORT cl_status_t CL_API
cl_irqlock_init( 
        IN      cl_irqlock_t* const             p_irqlock,
        IN      cl_interrupt_t* const   p_interrupt );

PARAMETERS

       p_irqlock 
               [in] Pointer to a IRQ lock structure to initialize.

       p_interrupt
               [in] Platform specific pointer conveying information about the
               interrupt vector and level with which to synchronize.

 RETURN VALUES
       CL_SUCCESS if initialization succeeded.

       CL_ERROR if initialization failed. Callers should call 
       cl_irqlock_destroy to clean up any resources allocated during 
       initialization.

NOTES

       Initialize the IRQ lock structure. Allows calling cl_irqlock_aquire 
       and cl_irqlock_release.

       In Linux, the p_interrupt parameter is currently ignored.

       In Windows, the p_interrupt parameter is a pointer to a KINTERRUPT object,
       the value of which is supplied by a call to IoConnectInterrupt.

SEE ALSO

       Irqlock, cl_irqlock_construct, cl_irqlock_destroy, 
       cl_irqlock_acquire, cl_irqlock_release

[Functions] Component Library: Irqlock/cl_irqlock_release

[top][index]

NAME

       cl_irqlock_release

DESCRIPTION

       The cl_irqlock_release function releases a IRQ lock object.

SYNOPSIS

CL_EXPORT void CL_API
cl_irqlock_release(
        IN      cl_irqlock_t* const             p_irqlock );

PARAMETERS

       p_irqlock 
               [in] Pointer to a IRQ lock structure to release.

RETURN VALUE

       This function does not return a value.

NOTES

       Releases a IRQ lock after a call to cl_irqlock_acquire.

SEE ALSO

       Irqlock, cl_irqlock_acquire