Skip Navigation Links | |
Exit Print View | |
man pages section 3: Extended Library Functions, Volume 1 Oracle Solaris 11.1 Information Library |
Extended Library Functions, Volume 1
CIRCLEQ_HEAD_INITIALIZER(3EXT)
cpc_walk_generic_events_all(3CPC)
cpc_walk_generic_events_pic(3CPC)
ct_dev_status_get_aset(3CONTRACT)
ct_dev_status_get_dev_state(3CONTRACT)
ct_dev_status_get_minor(3CONTRACT)
ct_dev_status_get_noneg(3CONTRACT)
ct_dev_tmpl_clear_noneg(3CONTRACT)
ct_dev_tmpl_get_aset(3CONTRACT)
ct_dev_tmpl_get_minor(3CONTRACT)
ct_dev_tmpl_get_noneg(3CONTRACT)
ct_dev_tmpl_set_aset(3CONTRACT)
ct_dev_tmpl_set_minor(3CONTRACT)
ct_dev_tmpl_set_noneg(3CONTRACT)
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_status_get_svc_aux(3CONTRACT)
ct_pr_status_get_svc_creator(3CONTRACT)
ct_pr_status_get_svc_ctid(3CONTRACT)
ct_pr_status_get_svc_fmri(3CONTRACT)
ct_pr_tmpl_get_fatal(3CONTRACT)
ct_pr_tmpl_get_param(3CONTRACT)
ct_pr_tmpl_get_svc_aux(3CONTRACT)
ct_pr_tmpl_get_svc_fmri(3CONTRACT)
ct_pr_tmpl_get_transfer(3CONTRACT)
ct_pr_tmpl_set_fatal(3CONTRACT)
ct_pr_tmpl_set_param(3CONTRACT)
ct_pr_tmpl_set_svc_aux(3CONTRACT)
ct_pr_tmpl_set_svc_fmri(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)
dat_registry_add_provider(3DAT)
dat_registry_list_providers(3DAT)
dat_registry_remove_provider(3DAT)
dat_set_consumer_context(3DAT)
devid_deviceid_to_nmlist(3DEVID)
di_link_next_by_lnode(3DEVINFO)
di_link_next_by_node(3DEVINFO)
di_lnode_private_get(3DEVINFO)
di_lnode_private_set(3DEVINFO)
di_minor_private_get(3DEVINFO)
di_minor_private_set(3DEVINFO)
di_path_client_devfs_path(3DEVINFO)
di_path_client_next_path(3DEVINFO)
di_path_phci_next_path(3DEVINFO)
di_path_prop_lookup_bytes(3DEVINFO)
di_path_prop_lookup_int64s(3DEVINFO)
di_path_prop_lookup_ints(3DEVINFO)
di_path_prop_lookup_strings(3DEVINFO)
di_path_prop_strings(3DEVINFO)
di_prom_prop_lookup_bytes(3DEVINFO)
di_prom_prop_lookup_ints(3DEVINFO)
di_prom_prop_lookup_strings(3DEVINFO)
di_prop_lookup_bytes(3DEVINFO)
di_prop_lookup_int64(3DEVINFO)
di_prop_lookup_strings(3DEVINFO)
ea_match_object_catalog(3EXACCT)
- common contract control functions
cc [ flag… ] file… -D_LARGEFILE64_SOURCE -lcontract [ library… ] #include <libcontract.h> int ct_ctl_adopt(int fd);
int ct_ctl_abandon(int fd);
int ct_ctl_newct(int fd, uint64_t evid, int templatefd);
int ct_ctl_ack(int fd, uint64_t evid);
int ct_ctl_nack(int fd, uint64_t evid);
int ct_ctl_qack(int fd, uint64_t evid);
These functions operate on contract control file descriptors obtained from the contract(4) file system.
The ct_ctl_adopt() function adopts the contract referenced by the file descriptor fd. After a successful call to ct_ctl_adopt(), the contract is owned by the calling process and any events in that contract's event queue are appended to the process's bundle of the appropriate type.
The ct_ctl_abandon() function abandons the contract referenced by the file descriptor fd. After a successful call to ct_ctl_abandon() the process no longer owns the contract, any events sent by that contract are automatically removed from the process's bundle, and any critical events on the contract's event queue are automatically acknowledged. Depending on its type and terms, the contract will either be orphaned or destroyed.
The ct_ctl_ack() function acknowledges the critical event specified byevid. If the event corresponds to an exit negotiation, ct_ctl_ack() also indicates that the caller is prepared for the system to proceed with the referenced reconfiguration.
The ct_ctl_nack() function acknowledges the critical negotiation event specified by evid. The ct_ctl_nack() function also indicates that the caller wishes to block the proposed reconfiguration indicated by event evid. Depending on the contract type, this function might require certain privileges to be asserted in the process's effective set. This function will fail and return an error if the event represented by evid is not a negotiation event.
The ct_ctl_qack() function requests a new quantum of time for the negotiation specified by the event ID evid.
The ct_ctl_newct() function instructs the contract specified by the file descriptor fd that when the current exit negotiation completes, another contract with the terms provided by the template specified by templatefd should be automatically written.
Upon successful completion, ct_ctl_adopt(), ct_ctl_abandon(), ct_ctl_newct(), ct_ctl_ack(), and ct_ctl_qack() return 0. Otherwise, they return a non-zero error value.
The ct_ctl_adopt() function will fail if:
The contract is in the owned state.
The contract was not inherited by the caller's process contract or was created by a process in a different zone.
The ct_ctl_abandon(), ct_ctl_newct(), ct_ctl_ack(), ct_ctl_nack(), and ct_ctl_qack() functions will fail if:
The contract does not belong to the calling process.
The ct_ctl_newct() and ct_ctl_qack() functions will fail if:
The event ID specified by evid does not correspond to an unacknowledged negotiation event.
The ct_ctl_newct() function will fail if:
The file descriptor specified by fd was not a valid template file descriptor.
The ct_ctl_ack() and ct_ctl_nack() functions will fail if:
The event ID specified by evid does not correspond to an unacknowledged negotiation event.
The ct_ctl_nack() function will fail if:
The calling process lacks the appropriate privileges required to block the reconfiguration.
The ct_ctl_qack() function will fail if:
The maximum amount of time has been requested.
See attributes(5) for descriptions of the following attributes:
|