NAME | SYNOPSIS | API RESTRICTIONS | ARGUMENTS | DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO
$(OS_DIR)/lib/libblackbox.a #include <sys/blackbox.h>int bb_getprodids(bb_prodid_t *ids, uint_t *nids);
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.
An array of bb_prodid_ts.
Points to the number of bb_prodid_ts passed in ids.
bb_getprodids() gets the list of producers registered to use the filter list and the filtered severity bitmap on this node.
On successful return, ids will be filled in with a list that specifies which producers are using the fine-grained filters. For each bb_prodid_t returned:
The bbp_pname member is the name of the producer. This is the basename of the first argument that was passed to one of the exec(3POSIX) functions, after traversing any symlinks. This is often the same as argv[0] in many UNIX programs.
If the bbp_pname is a null pointer, and the PID is set to --1, this signifies that the events originate in the microkernel. In this case, only the global mask severity is used to filter traces.
The maximum defined value for the list of producers obtained by a call to bb_getprodids() is blackboxMaxPidNb. This value is also accessible through sysGetConf()
There are multiple wild card types that can be returned in a bb_prodid_t:
If the bbp_pid member is equal to BB_ALL_PIDS, and the bbp_pname is not BB_ALL_PROD, the fine-grained filters are enabled for all producers with this bbp_pname.
If the bbp_pid member is equal to BB_ALL_PIDS, and the bbp_pname is equal to BB_ALL_PROD, the fine-grained filters are enabled for all producers on the system.
If the bbp_pname is equal to BB_ALL_PROD, and a specific PID is given in the bbp_pid member, the fine-grained filters are enabled for that PID, regardless of the producer's name.
When calling bb_getprodids(), nids should point to the number of bb_prodid_ts passed in ids. On successful return, nids will be updated with the number of bb_prodid_ts needed to construct a full list of producers that are using the fine-grained filters. The caller can determine this number by passing a NULL ids value and a valid nids pointer, e.g. the address of an integer with value 0.
bb_getprodids() may not return the exact same list that was passed in the most recent call to bb_setprodids(), but it will be an equivalent list.
bb_getprodids() returns 0 on success and -1 on failure.
If it returns -1, the contents of ids and nids are undefined, and errno is set to:
The ids or nids argument points to an illegal address.
bb_getprodids() has been called within an interrupt context.
One of the parameters is invalid.
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