NAME | SYNOPSIS | API RESTRICTIONS | ARGUMENTS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO
$(OS_DIR)/lib/libblackbox.a #include <sys/blackbox.h>bb_handle_t bb_open(bb_id_t id);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
bb_open() obtains access to a frozen black box.
bb_open() returns an opaque object (similar to, but not necessarily equivalent to, a file descriptor) that can be used to read events from the given black box with bb_read(). When done reading the black box, the object should be passed to bb_close().
Black box handles are inherited by the child on calls to fork() or fork1() and are closed on exec().
A handle opened by one thread in a process is accessible to all other threads in that process. Upon process exit, all open black box handles are closed.
bb_open() returns BB_INVALID_HANDLE on failure, and a valid handle on success.
If it returns BB_INVALID_HANDLE, errno is set to:
There is no black box with the specified ID
The specified black box is not frozen
Too many calls to bb_open() from this process
The black box is full.
The caller doesn't have permission to open a black box
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | ARGUMENTS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO