release: Publish 1.7.2
[mesa-waffle.git] / man / waffle_teardown.3.xml
blobbef2665189748085bfb2c76b9b9257c1c417b6dc
1 <?xml version='1.0'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5 <!--
6   Copyright Intel 2015
8   This manual page is licensed under the Creative Commons Attribution-ShareAlike 3.0 United States License (CC BY-SA 3.0
9   US). To view a copy of this license, visit http://creativecommons.org.license/by-sa/3.0/us.
10 -->
12 <refentry
13     id="waffle_teardown"
14     xmlns:xi="http://www.w3.org/2001/XInclude">
16   <!-- See http://www.docbook.org/tdg/en/html/refentry.html. -->
18   <refmeta>
19     <refentrytitle>waffle_teardown</refentrytitle>
20     <manvolnum>3</manvolnum>
21   </refmeta>
23   <refnamediv>
24     <refname>waffle_teardown</refname>
25     <refpurpose>Teardown waffle's per-process global state</refpurpose>
26   </refnamediv>
28   <refentryinfo>
29     <title>Waffle Manual</title>
30     <productname>waffle</productname>
31     <xi:include href="common/author-emil.velikov.xml"/>
32     <xi:include href="common/copyright.xml"/>
33     <xi:include href="common/legalnotice.xml"/>
34   </refentryinfo>
36   <refsynopsisdiv>
37     <funcsynopsis>
38       <funcsynopsisinfo><![CDATA[#include <waffle.h>]]></funcsynopsisinfo>
39       <funcprototype>
40         <funcdef>bool <function>waffle_teardown</function></funcdef>
41         <void/>
42       </funcprototype>
43     </funcsynopsis>
44   </refsynopsisdiv>
46   <refsect1>
47     <title>Description</title>
49     <para>
50       Feature test macro: <code>WAFFLE_API_VERSION >= 0x0106</code>.
51       (See <citerefentry><refentrytitle>waffle_feature_test_macros</refentrytitle><manvolnum>7</manvolnum></citerefentry>).
52     </para>
53     <para>
54       <function>waffle_teardown()</function> tears down the per-process global state of the waffle library.
55     </para>
56     <para>
57       А call to <function>waffle_teardown()</function> can fail. In the case it does the caller is advised
58       to use <function>waffle_error_get_info</function>, <function>waffle_error_get_code</function>
59       and/or <function>waffle_error_to_string</function> to retrieve the error.
61       In case of an error that differs from <errorcode>WAFFLE_ERROR_NOT_INITIALIZED</errorcode> the caller
62       should not use the Waffle API as the global state is likely to be in an undetermined/corrupt.
64       In the case of <errorcode>WAFFLE_ERROR_NOT_INITIALIZED</errorcode> one should call
65       <function>waffle_init()</function> prior to reusing Waffle.
66     </para>
67   </refsect1>
69   <refsect1>
70     <title>Return Value</title>
71     <xi:include href="common/return-value.xml"/>
72   </refsect1>
74   <refsect1>
75     <title>Errors</title>
77     <xi:include href="common/error-codes.xml"/>
79     <variablelist>
81       <varlistentry>
82         <term><errorcode>WAFFLE_ERROR_NOT_INITIALIZED</errorcode></term>
83         <listitem>
84           <para>
85             Waffle has not been initialized with a successful call to <function>waffle_init()</function>
86             since the last call to <function>waffle_teardown()</function> or the start of the program.
87           </para>
88         </listitem>
89       </varlistentry>
91     </variablelist>
93   </refsect1>
95   <xi:include href="common/issues.xml"/>
97   <refsect1>
98     <title>See Also</title>
100     <para>
101       <simplelist>
102         <member><citerefentry><refentrytitle>waffle_init</refentrytitle><manvolnum>3</manvolnum></citerefentry>,</member>
103         <member><citerefentry><refentrytitle>waffle</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</member>
104       </simplelist>
105     </para>
106   </refsect1>
108 </refentry>
110 <!--
111 vim:tw=120 et ts=2 sw=2: