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>SOFinish</TITLE> 7<LINK rel="stylesheet" type="text/css" href="../CSS/rex.css"> 8</HEAD> 9<BODY> 10<H1>SOFinish</H1> 11 12<H2>Syntax</H2> 13<DL> 14 <DD><PRE><CODE>#include <revolution/so.h></CODE></PRE> 15 <DD><PRE><CODE>int SOFinish( void );</CODE></PRE> 16</DL> 17 18<H2>Description</H2> 19<P> 20 Terminates the SO library and returns to the pre-initialization state.<br>If using the SO library again, it is necessary to reinitialize using the <CODE><a href="SOInit.html">SOInit</a></CODE> function. 21</P> 22 23<H2>Arguments</H2> 24<P> 25 None. 26</P> 27 28<h2>Return Values</h2> 29<TABLE border="1" cellpadding="3" cellspacing="0.1"> 30 <TR> 31 <TH>0</TH> 32 <TD> 33 Process succeeded. 34 </TD> 35 </TR> 36 <TR> 37 <TH>SO_EAGAIN</TH> 38 <TD> 39 Not all memory temporarily allocated by the SO library has been released.<br>There is a chance that an API called from a thread other than the thread calling the <CODE>SOFinish</CODE> function has not terminated. 40 </TD> 41 </TR> 42 <TR> 43 <TH>SO_EALREADY</TH> 44 <TD> 45 Either it has already been terminated with the <CODE>SOFinish</CODE> function, or it has not been initialized with the <CODE><a href="SOInit.html">SOInit</a></CODE> function. 46 </TD> 47 </TR> 48 <TR> 49 <TH>SO_EBUSY</TH> 50 <TD> 51 Because processing that accompanies the state transition of the SO library is in execution, processing cannot be accepted in the current state. 52 </TD> 53 </TR> 54 <TR> 55 <TH>SO_EINPROGRESS</TH> 56 <TD> 57 Because the <CODE><a href="SOStartup.html">SOStartup[Ex]</a></CODE> function has moved it into a state in which communication is possible, it cannot be terminated. You must call after moving to the initialized state due to the <CODE><a href="SOCleanup.html">SOCleanup</a></CODE> function. 58 </TD> 59 </TR> 60</TABLE> 61<P style="background-color:ffe8ff;padding-top:4px;padding-bottom:4px;padding-left:4px;padding-right:4px;"> 62 <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. 63</P> 64 65<H2>See Also</H2> 66<P> 67 <CODE> 68 <a href="SOInit.html">SOInit</a><br> 69 <a href="SOCleanup.html">SOCleanup</a><br> 70 </CODE> 71</P> 72 73<H2>Revision History</H2> 74<P> 75 2008/05/19 Revised notes for error codes. <br>2007/01/31 Initial version.<br> 76</P> 77 78<hr><p>CONFIDENTIAL</p></body> 79</HTML> 80