logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

clock_getcpuclockid.3p (2938B)


  1. '\" et
  2. .TH CLOCK_GETCPUCLOCKID "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. clock_getcpuclockid
  12. \(em access a process CPU-time clock
  13. (\fBADVANCED REALTIME\fP)
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <time.h>
  18. .P
  19. int clock_getcpuclockid(pid_t \fIpid\fP, clockid_t *\fIclock_id\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The
  23. \fIclock_getcpuclockid\fR()
  24. function shall return the clock ID of the CPU-time clock of the process
  25. specified by
  26. .IR pid .
  27. If the process described by
  28. .IR pid
  29. exists and the calling process has permission, the clock ID of this
  30. clock shall be returned in
  31. .IR clock_id .
  32. .P
  33. If
  34. .IR pid
  35. is zero, the
  36. \fIclock_getcpuclockid\fR()
  37. function shall return the clock ID of the CPU-time clock of the process
  38. making the call, in
  39. .IR clock_id .
  40. .P
  41. The conditions under which one process has permission to obtain the
  42. CPU-time clock ID of other processes are implementation-defined.
  43. .SH "RETURN VALUE"
  44. Upon successful completion,
  45. \fIclock_getcpuclockid\fR()
  46. shall return zero; otherwise, an error number shall be returned to
  47. indicate the error.
  48. .SH ERRORS
  49. The
  50. \fIclock_getcpuclockid\fR()
  51. function shall fail if:
  52. .TP
  53. .BR EPERM
  54. The requesting process does not have permission to access the CPU-time
  55. clock for the process.
  56. .P
  57. The
  58. \fIclock_getcpuclockid\fR()
  59. function may fail if:
  60. .TP
  61. .BR ESRCH
  62. No process can be found corresponding to the process specified by
  63. .IR pid .
  64. .LP
  65. .IR "The following sections are informative."
  66. .SH EXAMPLES
  67. None.
  68. .SH "APPLICATION USAGE"
  69. The
  70. \fIclock_getcpuclockid\fR()
  71. function is part of the Process CPU-Time Clocks option and need not be
  72. provided on all implementations.
  73. .SH RATIONALE
  74. None.
  75. .SH "FUTURE DIRECTIONS"
  76. None.
  77. .SH "SEE ALSO"
  78. .IR "\fIclock_getres\fR\^(\|)",
  79. .IR "\fItimer_create\fR\^(\|)"
  80. .P
  81. The Base Definitions volume of POSIX.1\(hy2017,
  82. .IR "\fB<time.h>\fP"
  83. .\"
  84. .SH COPYRIGHT
  85. Portions of this text are reprinted and reproduced in electronic form
  86. from IEEE Std 1003.1-2017, Standard for Information Technology
  87. -- Portable Operating System Interface (POSIX), The Open Group Base
  88. Specifications Issue 7, 2018 Edition,
  89. Copyright (C) 2018 by the Institute of
  90. Electrical and Electronics Engineers, Inc and The Open Group.
  91. In the event of any discrepancy between this version and the original IEEE and
  92. The Open Group Standard, the original IEEE and The Open Group Standard
  93. is the referee document. The original Standard can be obtained online at
  94. http://www.opengroup.org/unix/online.html .
  95. .PP
  96. Any typographical or formatting errors that appear
  97. in this page are most likely
  98. to have been introduced during the conversion of the source files to
  99. man page format. To report such errors, see
  100. https://www.kernel.org/doc/man-pages/reporting_bugs.html .