| aug2004.tar |
Listing 2 Init_semaphore()
{
# Init_semaphore sets the number of resources for a semaphore.
local FUNC_NAME=Init_semaphore
${TRACE:-trace $FUNC_NAME $@}
local semaphore=$1
integer num_resources=$2
if ! is_initialized $semaphore
then
if ! create_directories $semaphore
then
return 1
fi
fi
${INFO:-info "Initializing semaphore $semaphore to $num_resources..."}
set_num_resources $semaphore $num_resources
return $?
} |