1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:base="" xml:id="eglClientWaitSync">
<info>
<copyright>
<year>2018</year>
<holder>The Khronos Group Inc.</holder>
</copyright>
</info>
<refmeta>
<refentrytitle>eglClientWaitSync</refentrytitle>
<manvolnum>3G</manvolnum>
</refmeta>
<refnamediv>
<refname>eglClientWaitSync</refname>
<refpurpose>
Wait in the client for a sync object to be signalled
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>C Specification</title>
<funcsynopsis>
<funcprototype>
<funcdef>EGLint <function>eglClientWaitSync</function></funcdef>
<paramdef>(EGLDisplay <parameter>display</parameter></paramdef>
<paramdef>EGLSync <parameter>sync</parameter></paramdef>
<paramdef>EGLint <parameter>flags</parameter></paramdef>
<paramdef>EGLTime <parameter>timeout</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 xml:id="parameters"><title>Parameters</title>
<variablelist>
<varlistentry>
<term><parameter>display</parameter></term>
<listitem><para>
Specifies the <acronym>EGL</acronym> display connection.
</para></listitem>
</varlistentry>
<varlistentry>
<term><parameter>sync</parameter></term>
<listitem><para>
Specifies the sync object to wait on.
</para></listitem>
</varlistentry>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem><para>
Specifies flags controlling wait behavior.
</para></listitem>
</varlistentry>
<varlistentry>
<term><parameter>timeout</parameter></term>
<listitem><para>
Specifies wait timeout interval.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 xml:id="description"><title>Description</title>
<para>
<function>eglClientWaitSync</function> blocks the calling thread
until the specified sync object <parameter>sync</parameter> is
signaled, or until <parameter>timeout</parameter> nanoseconds
have passed.
</para>
<para>
More than one <function>eglClientWaitSync</function> may be
outstanding on the same <parameter>sync</parameter> at any given
time. When there are multiple threads blocked on the same
<parameter>sync</parameter> and the sync object is signaled, all
such threads are released, but the order in which they are
released is not defined.
</para>
<para>
If the value of <parameter>timeout</parameter> is zero, then
<function>eglClientWaitSync</function> simply tests the current
status of <parameter>sync</parameter>. If the value of
<parameter>timeout</parameter> is the special value
<constant>EGL_FOREVER</constant>, then
<function>eglClientWaitSync</function> does not time out. For
all other values, <parameter>timeout</parameter> is adjusted to
the closest value allowed by the implementation-dependent
timeout accuracy, which may be substantially longer than one
nanosecond.
</para>
<para>
<function>eglClientWaitSync</function> returns one of three
status values describing the reason for returning. A return
value of <constant>EGL_TIMEOUT_EXPIRED</constant> indicates that
the specified timeout period expired before
<parameter>sync</parameter> was signaled, or if
<parameter>timeout</parameter> is zero, indicates that
<parameter>sync</parameter> is not signaled. A return value of
<constant>EGL_CONDITION_SATISFIED</constant> indicates that
<parameter>sync</parameter> was signaled before the timeout
expired, which includes the case when
<parameter>sync</parameter> was already signaled when
<function>eglClientWaitSync</function> was called. If an error
occurs then an error is generated and
<constant>EGL_FALSE</constant> is returned.
</para>
<para>
If the sync object being blocked upon will not be signaled in
finite time (for example, by an associated fence command issued
previously, but not yet flushed to the graphics pipeline), then
<function>eglClientWaitSync</function> may wait forever. To help
prevent this behavior, if the
<constant>EGL_SYNC_FLUSH_COMMANDS_BIT</constant> bit is set in
<parameter>flags</parameter>, and <parameter>sync</parameter> is
unsignaled when <function>eglClientWaitSync</function> is
called, then the equivalent of Flush() will be performed for the
current API context (i.e., the context returned by
<function>eglGetCurrentContext</function>) before blocking on
<parameter>sync</parameter>. If no context is current for the
bound API, the <constant>EGL_SYNC_FLUSH_COMMANDS_BIT</constant>
bit is ignored.
</para>
<para>
Note: the simple Flush behavior defined by
<constant>EGL_SYNC_FLUSH_COMMANDS_BIT</constant> will not help
when waiting for a fence command issued in a different context's
command stream. Applications which block on a fence sync object
must take additional steps to ensure that the context from which
the associated fence command was issued has flushed that command
to the graphics pipeline.
</para>
</refsect1>
<refsect1 xml:id="errors"><title>Errors</title>
<para>
<function>eglClientWaitSync</function> returns
<constant>EGL_FALSE</constant> on failure.
</para>
<para>
If <parameter>sync</parameter> is not a valid sync object for
<parameter>display</parameter>, an
<constant>EGL_BAD_PARAMETER</constant> error is generated.
</para>
<para>
If <parameter>display</parameter> does not match the
<type>EGLDisplay</type> passed to
<function>eglCreateSync</function> when
<parameter>sync</parameter> was created, the behaviour is
undefined.
</para>
</refsect1>
<refsect1 xml:id="notes"><title>Notes</title>
<para>
<function>eglClientWaitSync</function> is available only if the
EGL version is 1.5 or greater.
</para>
</refsect1>
<refsect1 xml:id="seealso"><title>See Also</title>
<para>
<citerefentry><refentrytitle>eglCreateSync</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>eglGetCurrentContext</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>eglWaitSync</refentrytitle></citerefentry>,
<function>glFinish</function>,
<function>vgFinish</function>
</para>
</refsect1>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="copyright.xml"/>
</refentry>
|