Skip Navigation Links | |
Exit Print View | |
man pages section 3: Extended Library Functions Oracle Solaris 10 1/13 Information Library |
Extended Library Functions - Part 1
ct_event_read_critical(3CONTRACT)
ct_pr_event_get_exitstatus(3CONTRACT)
ct_pr_event_get_gcorefile(3CONTRACT)
ct_pr_event_get_pcorefile(3CONTRACT)
ct_pr_event_get_pid(3CONTRACT)
ct_pr_event_get_ppid(3CONTRACT)
ct_pr_event_get_sender(3CONTRACT)
ct_pr_event_get_senderct(3CONTRACT)
ct_pr_event_get_signal(3CONTRACT)
ct_pr_event_get_zcorefile(3CONTRACT)
ct_pr_status_get_contracts(3CONTRACT)
ct_pr_status_get_fatal(3CONTRACT)
ct_pr_status_get_members(3CONTRACT)
ct_pr_status_get_param(3CONTRACT)
ct_pr_tmpl_get_fatal(3CONTRACT)
ct_pr_tmpl_get_param(3CONTRACT)
ct_pr_tmpl_get_transfer(3CONTRACT)
ct_pr_tmpl_set_fatal(3CONTRACT)
ct_pr_tmpl_set_param(3CONTRACT)
ct_pr_tmpl_set_transfer(3CONTRACT)
ct_status_get_cookie(3CONTRACT)
ct_status_get_critical(3CONTRACT)
ct_status_get_holder(3CONTRACT)
ct_status_get_informative(3CONTRACT)
ct_status_get_nevents(3CONTRACT)
ct_status_get_nevid(3CONTRACT)
ct_status_get_ntime(3CONTRACT)
ct_status_get_qtime(3CONTRACT)
ct_status_get_state(3CONTRACT)
ct_status_get_zoneid(3CONTRACT)
ct_tmpl_get_critical(3CONTRACT)
ct_tmpl_get_informative(3CONTRACT)
ct_tmpl_set_critical(3CONTRACT)
ct_tmpl_set_informative(3CONTRACT)
dat_evd_clear_unwaitable(3DAT)
dat_get_consumer_context(3DAT)
Extended Library Functions - Part 2
Extended Library Functions - Part 3
Extended Library Functions - Part 4
- coordinate CPC library and application versions
cc [ flag... ] file... -lcpc [ library... ] #include <libcpc.h> uint_t cpc_version(uint_t version);
The cpc_version() function takes an interface version as an argument and returns an interface version as a result. Usually, the argument will be the value of CPC_VER_CURRENT bound to the application when it was compiled.
If the version requested is still supported by the implementation, cpc_version() returns the requested version number and the application can use the facilities of the library on that platform. If the implementation cannot support the version needed by the application, cpc_version() returns CPC_VER_NONE, indicating that the application will at least need to be recompiled to operate correctly on the new platform, and may require further changes.
If version is CPC_VER_NONE, cpc_version() returns the most current version of the library.
Example 1 Protect an application from using an incompatible library.
The following lines of code protect an application from using an incompatible library:
if (cpc_version(CPC_VER_CURRENT) == CPC_VER_NONE) { /* version mismatch - library cannot translate */ exit(1); }
See attributes(5) for descriptions of the following attributes:
|
cpc(3CPC), cpc_open(3CPC), libcpc(3LIB), attributes(5)
The cpc_version() function exists for binary compatibility only. Source containing this function will not compile. This function is obsolete and might be removed in a future release. Applications should use cpc_open(3CPC) instead.
The version number is used only to express incompatible semantic changes in the performance counter interfaces on the given platform within a single instruction set architecture, for example, when a new set of performance counter registers are added to an existing processor family that cannot be specified in the existing cpc_event_t data structure.