1PTHREAD_CONDATTR_GETCLOCK(3PP)OSIX Programmer's ManuPaTlHREAD_CONDATTR_GETCLOCK(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       pthread_condattr_getclock, pthread_condattr_setclock - get and set  the
13       clock selection condition variable attribute (ADVANCED REALTIME)
14

SYNOPSIS

16       #include <pthread.h>
17
18       int pthread_condattr_getclock(const pthread_condattr_t *restrict attr,
19              clockid_t *restrict clock_id);
20       int pthread_condattr_setclock(pthread_condattr_t *attr,
21              clockid_t clock_id);
22
23

DESCRIPTION

25       The  pthread_condattr_getclock() function shall obtain the value of the
26       clock attribute from the attributes  object  referenced  by  attr.  The
27       pthread_condattr_setclock()  function  shall set the clock attribute in
28       an initialized attributes object referenced by  attr.  If  pthread_con‐
29       dattr_setclock()  is  called  with a clock_id argument that refers to a
30       CPU-time clock, the call shall fail.
31
32       The clock attribute is the clock ID of the clock that shall be used  to
33       measure  the  timeout service of pthread_cond_timedwait().  The default
34       value of the clock attribute shall refer to the system clock.
35

RETURN VALUE

37       If successful, the pthread_condattr_getclock()  function  shall  return
38       zero and store the value of the clock attribute of attr into the object
39       referenced by the clock_id argument.  Otherwise, an error number  shall
40       be returned to indicate the error.
41
42       If  successful,  the  pthread_condattr_setclock() function shall return
43       zero; otherwise, an error number shall  be  returned  to  indicate  the
44       error.
45

ERRORS

47       These functions may fail if:
48
49       EINVAL The value specified by attr is invalid.
50
51
52       The pthread_condattr_setclock() function may fail if:
53
54       EINVAL The value specified by clock_id does not refer to a known clock,
55              or is a CPU-time clock.
56
57
58       These functions shall not return an error code of [EINTR].
59
60       The following sections are informative.
61

EXAMPLES

63       None.
64

APPLICATION USAGE

66       None.
67

RATIONALE

69       None.
70

FUTURE DIRECTIONS

72       None.
73

SEE ALSO

75       pthread_cond_destroy(),     pthread_cond_timedwait(),      pthread_con‐
76       dattr_destroy(),       pthread_condattr_getpshared(),      pthread_con‐
77       dattr_init(),     pthread_condattr_setpshared(),      pthread_create(),
78       pthread_mutex_init(),     the     Base     Definitions     volume    of
79       IEEE Std 1003.1-2001, <pthread.h>
80
82       Portions of this text are reprinted and reproduced in  electronic  form
83       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
84       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
85       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
86       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
87       event of any discrepancy between this version and the original IEEE and
88       The Open Group Standard, the original IEEE and The Open Group  Standard
89       is  the  referee document. The original Standard can be obtained online
90       at http://www.opengroup.org/unix/online.html .
91
92
93
94IEEE/The Open Group                  2003        PTHREAD_CONDATTR_GETCLOCK(3P)
Impressum