Frees a Barrier Synchronization Register (BSR) resource previously allocated with the bsr_alloc kernel service.
#include <sys/adspace.h>
int bsr_free (
int bsr_id,
Item | Description |
---|---|
bsr_id | BSR resource identifier as returned in the bsr_id field of the bsr_alloc call. |
The bsr_free service releases a BSR allocation. The specific BSR resource being freed is identified by the unique identifier bsr_id from the corresponding bsr_alloc call.
It is the caller's responsibility to ensure that all prior attachments to the BSR resource, through rmmap_create calls, have been detached with corresponding rmmap_remove calls prior to freeing the BSR resource.
The bsr_free service can only be called from the process environment.
Item | Description |
---|---|
0 | A successful operation. |
ENODEV | The BSR facility is not present. |
EINVAL | BSR resource corresponding to bsr_id is invalid or not currently allocated. |