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>Syntax</H2> 13<DL> 14 <DD><PRE><CODE>#include <revolution/so.h></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 occurred: 67 <UL> 68 <li>A call from the exception handler. 69 <li>A fatal error occurred while running the firmware. 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> Error codes other than those described above might be returned following subsequent library or console firmware updates. To deal with unexpected errors during development, treat all negative return values other than those described above as fatal errors, and either halt program execution or perform similar error handling. 76</P> 77 78<H2>See Also</H2> 79<P> 80 <CODE> 81 <a href="SOStartup.html">SOStartup</a><br> 82 <a href="SOFinish.html">SOFinish</a><br> 83 </CODE> 84</P> 85 86<H2>Revision History</H2> 87<P> 88 2008/05/19 Revised notes related to error codes. <br>2007/10/31 Added descriptions. <br>2007/01/31 Initial version.<br> 89</P> 90 91<hr><p>CONFIDENTIAL</p></body> 92</HTML> 93