Sun Java System Web Server 6.1 SP9 NSAPI Programmer's Guide

crit_init

The crit_init function is a critical-section function that creates and returns a new critical-section variable (a variable of type CRITICAL). Use this function to obtain a new instance of a variable of type CRITICAL (a critical-section variable) to be used in managing the prevention of interference between two threads of execution. At the time of its creation, no thread owns the critical section.

Warning

Threads must not own or be waiting for the critical section when crit_terminate is called.

Syntax

CRITICAL crit_init(void);

Returns

A newly allocated critical-section variable (CRITICAL).

Parameters

none

See Also

crit_enter, crit_exit, crit_terminate