2 .\" Copyright (c) 2005, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH CPC_EVENT_DIFF 3CPC "Mar 28, 2005"
8 cpc_event_diff, cpc_event_accum \- simple difference and accumulate operations
12 cc [ \fIflag\fR... ] \fIfile\fR... \(milcpc [ \fIlibrary\fR... ]
15 \fBvoid\fR \fBcpc_event_accum\fR(\fBcpc_event_t *\fR\fIaccum\fR, \fBcpc_event_t *\fR\fIevent\fR);
20 \fBvoid\fR \fBcpc_event_diff\fR(\fBcpc_event_t *\fR\fIdiff\fR, \fBcpc_event_t *\fR\fIafter\fR,
21 \fBcpc_event_t *\fR\fIbefore\fR);
27 The \fBcpc_event_accum()\fR and \fBcpc_event_diff()\fR functions perform
28 common accumulate and difference operations on \fBcpc_event\fR(3CPC) data
29 structures. Use of these functions increases program portability, since
30 structure members are not referenced directly .
31 .SS "\fBcpc_event_accum()\fR"
34 The \fBcpc_event_accum()\fR function adds the \fBce_pic\fR fields of
35 \fIevent\fR into the corresponding fields of \fIaccum\fR. The \fBce_hrt\fR
36 field of \fIaccum\fR is set to the later of the times in \fIevent\fR and
41 The function adds the contents of the \fBce_tick\fR field of \fIevent\fR into
42 the corresponding field of \fIaccum\fR.
46 The function adds the contents of the \fBce_tsc\fR field of \fIevent\fR into
47 the corresponding field of \fIaccum\fR.
48 .SS "\fBcpc_event_diff()\fR"
51 The \fBcpc_event_diff()\fR function places the difference between the
52 \fBce_pic\fR fields of \fIafter\fR and \fIbefore\fR and places them in the
53 corresponding field of \fIdiff\fR. The \fBce_hrt\fR field of \fIdiff\fR is set
54 to the \fBce_hrt\fR field of \fIafter\fR.
58 Additionally, the function computes the difference between the \fBce_tick\fR
59 fields of \fIafter\fR and \fIbefore\fR, and places it in the corresponding
64 Additionally, the function computes the difference between the \fBce_tsc\fR
65 fields of \fIafter\fR and \fIbefore\fR, and places it in the corresponding
70 See \fBattributes\fR(5) for descriptions of the following attributes:
78 ATTRIBUTE TYPE ATTRIBUTE VALUE
80 Interface Stability Obsolete
88 \fBcpc\fR(3CPC), \fBcpc_buf_add\fR(3CPC), \fBcpc_buf_sub\fR(3CPC),
89 \fBcpc_event\fR(3CPC), \fBlibcpc\fR(3LIB), \fBattributes\fR(5)
93 The \fBcpc_event_accum()\fR and \fBcpc_event_diff()\fR functions exist for
94 binary compatibility only. Source containing these functions will not compile.
95 These functions are obsolete and might be removed in a future release.
96 Applications should use \fBcpc_buf_add\fR(3CPC) and \fBcpc_buf_sub\fR(3CPC)