]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3p/clock_getcpuclockid.3p
Import of man-pages 1.70
[thirdparty/man-pages.git] / man3p / clock_getcpuclockid.3p
1 .\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
2 .TH "CLOCK_GETCPUCLOCKID" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
3 .\" clock_getcpuclockid
4 .SH NAME
5 clock_getcpuclockid \- access a process CPU-time clock (\fBADVANCED
6 REALTIME\fP)
7 .SH SYNOPSIS
8 .LP
9 \fB#include <time.h>
10 .br
11 .sp
12 int clock_getcpuclockid(pid_t\fP \fIpid\fP\fB, clockid_t *\fP\fIclock_id\fP\fB);
13 \fP
14 \fB
15 .br
16 \fP
17 .SH DESCRIPTION
18 .LP
19 The \fIclock_getcpuclockid\fP() function shall return the clock ID
20 of the CPU-time clock of the process specified by
21 \fIpid\fP. If the process described by \fIpid\fP exists and the calling
22 process has permission, the clock ID of this clock shall
23 be returned in \fIclock_id\fP.
24 .LP
25 If \fIpid\fP is zero, the \fIclock_getcpuclockid\fP() function shall
26 return the clock ID of the CPU-time clock of the process
27 making the call, in \fIclock_id\fP.
28 .LP
29 The conditions under which one process has permission to obtain the
30 CPU-time clock ID of other processes are
31 implementation-defined.
32 .SH RETURN VALUE
33 .LP
34 Upon successful completion, \fIclock_getcpuclockid\fP() shall return
35 zero; otherwise, an error number shall be returned to
36 indicate the error.
37 .SH ERRORS
38 .LP
39 The \fIclock_getcpuclockid\fP() function shall fail if:
40 .TP 7
41 .B EPERM
42 The requesting process does not have permission to access the CPU-time
43 clock for the process.
44 .sp
45 .LP
46 The \fIclock_getcpuclockid\fP() function may fail if:
47 .TP 7
48 .B ESRCH
49 No process can be found corresponding to the process specified by
50 \fIpid\fP.
51 .sp
52 .LP
53 \fIThe following sections are informative.\fP
54 .SH EXAMPLES
55 .LP
56 None.
57 .SH APPLICATION USAGE
58 .LP
59 The \fIclock_getcpuclockid\fP() function is part of the Process CPU-Time
60 Clocks option and need not be provided on all
61 implementations.
62 .SH RATIONALE
63 .LP
64 None.
65 .SH FUTURE DIRECTIONS
66 .LP
67 None.
68 .SH SEE ALSO
69 .LP
70 \fIclock_getres\fP() , \fItimer_create\fP() , the Base
71 Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<time.h>\fP
72 .SH COPYRIGHT
73 Portions of this text are reprinted and reproduced in electronic form
74 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
75 -- Portable Operating System Interface (POSIX), The Open Group Base
76 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
77 Electrical and Electronics Engineers, Inc and The Open Group. In the
78 event of any discrepancy between this version and the original IEEE and
79 The Open Group Standard, the original IEEE and The Open Group Standard
80 is the referee document. The original Standard can be obtained online at
81 http://www.opengroup.org/unix/online.html .