OSF DCE Application Development Guide--Core Components
Topics in RPC Application Development
/* If the reference count turned out to have */
/* been accessed between our first check and our */
/* locking the mutex, we must now unlock the mutex */
/* preparatory to looping around to check the next */
/* storelet... */
*status = pthread_mutex_unlock((pthread_mutex_t *)hdr);
if (*status != 0)
{
return;
}
}
}
/* The following is reached only if we never found a free */
/* storelet... */
*store_h = NULL;
*status = -1;
}
/******
*
* store_set_ptr -- Insert a new value into the store buffer pointer.
*
*******/
/************************************************************************/
void store_set_ptr(
store_handle_t store_h, /* The store handle. */
unsigned32 offset, /* Value to insert into store buffer pointer. */
error_status_t *status
)
{
store_spec_t *spec; /* Our pointer to store handle. */
spec = (store_spec_t *)store_h; /* Get the store spec. */
spec->offset = offset; /* Copy in the new buffer pointer value. */
*status = error_status_ok;
}
/******
*
* store_close -- Close the opened storelet.
*
******/
/************************************************************************/
void
store_close(
store_handle_t *store_h, /* Store handle. */
error_status_t *status
)
{
store_spec_t *spec; /* Our pointer to store handle. */
store_hdr_t *hdr; /* Pointer to a storelet. */
printf("Store Manager: Closing Store0);
124245 Tandem Computers Incorporated 16− 17