1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<TITLE>SOCleanup</TITLE>
7<LINK rel="stylesheet" type="text/css" href="../CSS/rex.css">
8</HEAD>
9<BODY>
10<H1>SOCleanup</H1>
11
12<H2>C Specification</H2>
13<DL>
14	<DD><PRE><CODE>#include &lt;revolution/so.h&gt;</CODE></PRE>
15	<DD><PRE><CODE>int SOCleanup( void );</CODE></PRE>
16</DL>
17
18<H2>Description</H2>
19<P>
20	Returns the SO library to the state just after initialization. All communication processes using the SO library will be forcibly stopped.
21</P>
22<P>
23	Blocking occurs until the communication termination process of all <CODE>SOCleanup</CODE> functions has completed. The block on all blocked API calls will be cleared, and the given errors are returned.
24</P>
25<P>
26This function may block for a long period of time before it finishes processing. Consequently, we recommend that when you call this function you prepare a separate thread from other processing, such as rendering.
27</P>
28<P style="background-color:ffe8ff;padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:4px;">
29	<strong>Note: </strong>The system may be performing communications automatically, so in some cases the amount of time required until processing ends may be longer than normal.
30</P>
31
32<H2>Arguments</H2>
33<P>
34	None.
35</P>
36
37<h2>Return Values</h2>
38<TABLE border="1" cellpadding="3" cellspacing="0.1">
39	<TR>
40		<TH>0</TH>
41		<TD>
42			Process succeeded.
43		</TD>
44	</TR>
45	<TR>
46		<TH>SO_EALREADY</TH>
47		<TD>
48			Either the <CODE><a href="SOStartup.html">SOStartup[Ex]</a></CODE> function has not moved it into a state in which communication is possible, or the <CODE>SOCleanup</CODE> function has already returned the library to the state just after initialization.
49		</TD>
50	</TR>
51	<TR>
52		<TH>SO_EBUSY</TH>
53		<TD>
54			Because processing that accompanies the state transition of the SO library is in execution, processing cannot be accepted in the current state.
55		</TD>
56	</TR>
57	<TR>
58		<TH>SO_ENETRESET</TH>
59		<TD>
60			The SO library has not been initialized with <CODE><a href="SOInit.html">SOInit</a></CODE>.
61		</TD>
62	</TR>
63	<TR>
64		<TH>SO_EFATAL</TH>
65		<TD>
66			One of the following fatal errors.
67			<UL>
68				<li>A call from the exception handler.
69				<li>A fatal error occurred during a firmware operation.
70			</UL>
71		</TD>
72	</TR>
73</TABLE>
74<P style="background-color:ffe8ff;padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:4px;">
75	<strong>Note: </strong>Errors may be added as the library is updated. Treat all negative return values as all-purpose errors.
76</P>
77
78<H2>See Also</H2>
79<P>
80	<CODE><a href="SOStartup.html">SOStartup</a><br> <a href="SOFinish.html">SOFinish</a><br></CODE>
81</P>
82
83<H2>Revision History</H2>
84<P>
85	2007/10/31 Added a description<br>2007/01/31 Initial version<br>
86</P>
87
88<hr><p>CONFIDENTIAL</p></body>
89</HTML>
90