Parallel Programming Guide for HP-UX Systems

Parallel synchronization
Synchronization tools
Chapter 8138
Examples of using these functions are presented and explained
throughout this section.
Allocation functions
Allocation functions allocate memory for a gate or barrier. When first
allocated, gate variables are unlocked. The forms of these allocation
functions are shown in Table 8-2.
where (in Fortran)
gate
and
barrier
are gate or barrier variables.
where (in C/C++)
gate_p
and barrier_p are pointers of the indicated type.
Deallocation functions
The deallocation functions free the memory assigned to the specified gate
or barrier variable. The forms of these deallocation functions are shown
in Table 8-3.
Table 8-2 Forms of allocation functions
Language Form
Fortran INTEGER FUNCTION ALLOC_GATE(gate)
INTEGER FUNCTION ALLOC_BARRIER(barrier)
C/C++ int alloc_gate(gate_t *gate_p);
int alloc_barrier(barrier_t *barrier_p);
Table 8-3 Forms of deallocation functions
Language Form
Fortran INTEGER FUNCTION FREE_GATE(gate)
INTEGER FUNCTION FREE_BARRIER(barrier)