NAME | SYNOPSIS | API RESTRICTIONS | ARGUMENTS | DESCRIPTION | RETURN VALUESS | ERRORS | ATTRIBUTES | SEE ALSO
$(OS_DIR)/lib/libblackbox.a #include <sys/blackbox.h>void bb_freeze(bb_id_t);
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.
None.
bb_freeze() freezes the currently active black box, and directs all future events to another black box (if available).
Any time a black box is frozen, an event will be published with the publish/subscribe mechanism, to facilitate collection of frozen black boxes. If there are no more unfrozen black boxes after this box is frozen, a separate "out of space" event will be published, and future black box events will be lost until a frozen black box is released. If there is at least one unfrozen black box after this box is frozen, no events will be lost as a direct consequence of calling bb_freeze().
Once bb_freeze() returns, each CPU will add at most one more event to the newly frozen black box.
The bb_id_t returned is the index of the newly frozen black box. This integer can be passed to bb_open() to access the contents of this black box.
If the id_t returned is -1, the current black box is not frozen, and errno is set to:
The caller doesn't have permission to freeze the black box
The black box service is not configured on this node
All black boxes on the node are already frozen
bb_freeze() has been called from an interrupt context.
The black box has no identifier.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | API RESTRICTIONS | ARGUMENTS | DESCRIPTION | RETURN VALUESS | ERRORS | ATTRIBUTES | SEE ALSO