| <html> |
| <head> |
| <title>Global Functions in Namespace in Sourcefile unload.h</title> |
| <style> h1 { font-size:20pt; margin-top:3pt; margin-bottom:7pt; } |
| h2 { font-family:"Arial"; font-size:16pt; margin-top:3pt; margin-bottom:5pt; } |
| h3 { font-size:13pt; margin-top:2pt; margin-bottom:3pt; } |
| h4 { font-size:10pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; } |
| dl { margin-top:1pt; margin-bottom:1pt; } |
| dl.member { margin-top:1pt; margin-bottom:1pt; background-color:#eeeeff; } |
| dt { font-size:10pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; } |
| dt.member { font-size:13pt; font-weight:bold; margin-top:2pt; margin-bottom:1pt; } |
| dt.simple { font-size:10pt; font-weight:normal; margin-top:2pt; margin-bottom:1pt; } |
| dd { font-size:10pt; margin-top:1pt; margin-bottom:1pt; } |
| dd.member { font-size:10pt; margin-top:1pt; margin-bottom:1pt; background-color:#ffffff; } |
| p { font-size:10pt; margin-top:3pt; margin-bottom:1pt; } |
| pre { font-family: Times, serif; font-size:10pt; margin-top:1pt; margin-bottom:1pt; } |
| tr { font-size:10pt; } |
| td { font-size:10pt; } |
| </style> |
| |
| <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8"> |
| </head> |
| <body bgcolor="#ffffff"> |
| <a name="_top_"> </a> |
| <table border="0" cellpadding="1" cellspacing="0"> |
| <tr align="center" valign="top"> |
| <td bgcolor="#eeeeff"> <a href="../index.html" alt><font family="Arial" color="#000000" size="+1"><b>Overview</b></font></a> </td> |
| <td bgcolor="#eeeeff"> <a href="index.html" alt><font family="Arial" color="#000000" size="+1"><b>Namespace</b></font></a> </td> |
| <td bgcolor="#eeeeff"> <font family="Arial" color="#000000" size="+1">Class</font> </td> |
| <td bgcolor="#eeeeff"> <a href="../index-files/index-1.html" alt><font family="Arial" color="#000000" size="+1"><b>Index</b></font></a> </td> |
| <td bgcolor="#eeeeff"> <a href="../help.html" alt><font family="Arial" color="#000000" size="+1"><b>Help</b></font></a> </td> |
| </tr> |
| </table> |
| <table cellpadding="0" cellspacing="3"></table> |
| <hr> |
| <div align="center" style="background-color:#ccccff; line-height:26pt;"><h2>Global Functions in Global Namespace C++<br> |
| in Sourcefile unload.h</h2> |
| </div><hr> |
| <dl class="member"> |
| <dt class="member"><a name="rtl_addUnloadingListener-424"> </a> |
| rtl_addUnloadingListener</dt> |
| <dd class="member"><dl> |
| <dt class="simple">extern "C"<br> |
| <a href="t-sal_Int32.html">sal_Int32</a> <strong>rtl_addUnloadingListener</strong>(</dt> |
| <dd><table> |
| <tr> |
| <td>rtl_unloadingListenerFunc </td> |
| <td> callback,</td> |
| </tr> |
| <tr> |
| <td>void *</td> |
| <td>_this );</td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| <br> |
| </dd> |
| <dd class="member"><table border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Description</dt> |
| <dd>The function registered an unloading listener. The callback argument is a |
| function which is called when the unloading procedure has been initiated by a call to |
| <code>rtl_unloadUnusedLibraries</code>. The second argument is used to distinguish between different |
| listener instances and may be <code>NULL</code>. It will be passed as argument when the callback |
| function is being called. The return value identifies the registered listener and will |
| be used for removing the listener later on. If the same listener is added more then |
| once then every registration is treated as if made for a different listener. That is, |
| a different cookie is returned and the callback function will be called as many times |
| as it has been registered. |
| </dd> |
| <dt>Parameters</dt> |
| <dd><table border="0" width="100%" cellpadding="3" cellspacing="0"> |
| <tr> |
| <td width="15%" style="vertical-align:top; font-weight:bold">callback</td> |
| <td><pre>- a function that is called to notify listeners. |
| </pre></td> |
| </tr> |
| <tr> |
| <td width="15%" style="vertical-align:top; font-weight:bold">this</td> |
| <td><pre>- a value to distinguish different listener instances |
| </pre></td> |
| </tr> |
| </table> |
| </dd> |
| <dt>Return</dt> |
| <dd>identifier which is used in rtl_removeUnloadingListener |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <dl class="member"> |
| <dt class="member"><a name="rtl_moduleCount_acquire-426"> </a> |
| rtl_moduleCount_acquire</dt> |
| <dd class="member"><dl> |
| <dt class="simple">extern "C"<br> |
| void <strong>rtl_moduleCount_acquire</strong>(</dt> |
| <dd><table> |
| <tr> |
| <td><a href="t-rtl_ModuleCount.html">rtl_ModuleCount</a> * </td> |
| <td> that );</td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| <br> |
| </dd> |
| <dd class="member"><table border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Summary</dt> |
| <dd>Default implementation for <code>rtl_ModuleCount.acquire</code>. Use this function along with |
| <code>rtl_StandardModuleCount</code>. |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <dl class="member"> |
| <dt class="member"><a name="rtl_moduleCount_canUnload-427"> </a> |
| rtl_moduleCount_canUnload</dt> |
| <dd class="member"><dl> |
| <dt class="simple">extern "C"<br> |
| <a href="t-sal_Bool.html">sal_Bool</a> <strong>rtl_moduleCount_canUnload</strong>(</dt> |
| <dd><table> |
| <tr> |
| <td><a href="t-rtl_StandardModuleCount.html">rtl_StandardModuleCount</a> * </td> |
| <td> that,</td> |
| </tr> |
| <tr> |
| <td><a href="t-TimeValue.html">TimeValue</a> *</td> |
| <td>libUnused );</td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| <br> |
| </dd> |
| <dd class="member"><table border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Summary</dt> |
| <dd>Default implementation for <code>component_canUnload</code>. Use this function along with |
| <code>rtl_StandardModuleCount</code>. |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <dl class="member"> |
| <dt class="member"><a name="rtl_moduleCount_release-426"> </a> |
| rtl_moduleCount_release</dt> |
| <dd class="member"><dl> |
| <dt class="simple">extern "C"<br> |
| void <strong>rtl_moduleCount_release</strong>(</dt> |
| <dd><table> |
| <tr> |
| <td><a href="t-rtl_ModuleCount.html">rtl_ModuleCount</a> * </td> |
| <td> that );</td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| <br> |
| </dd> |
| <dd class="member"><table border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Description</dt> |
| <dd>Default implementation for <code>rtl_ModuleCount.release</code>. |
| Use this function along with |
| <code>rtl_StandardModuleCount</code>. |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <dl class="member"> |
| <dt class="member"><a name="rtl_registerModuleForUnloading-231"> </a> |
| rtl_registerModuleForUnloading</dt> |
| <dd class="member"><dl> |
| <dt class="simple">extern "C"<br> |
| <a href="t-sal_Bool.html">sal_Bool</a> <strong>rtl_registerModuleForUnloading</strong>(</dt> |
| <dd><table> |
| <tr> |
| <td><a href="t-oslModule.html">oslModule</a> </td> |
| <td> module );</td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| <br> |
| </dd> |
| <dd class="member"><table border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Summary</dt> |
| <dd>By registering a module, one declares that a module supports the |
| unloading mechanism. One registers a module by calling this function.<p> |
| |
| </dd> |
| <dt>Description</dt> |
| <dd>A module can only be unloaded from memory when it has been registered |
| as many times as it has been loaded. The reason is that a library can |
| be "loaded" several times by <code>osl_loadModule</code> |
| within the same process. The |
| function will then return the same module handle because the library will |
| effectively only be loaded once. To remove the library from memory it is |
| necessary to call <code>osl_unloadModule</code> as often as <code> |
| osl_loadModule</code> was called. The |
| function <code>rtl_unloadUnusedModules</code> calls <code>osl_unloadModule</code> |
| for a module as many |
| times as it was registered. If, for example, a module has been registered one |
| time less then <code>osl_loadModule</code> has been called and the module can be unloaded |
| then it needs a call to <code>rtl_unloadUnusedModules</code> and an explicit call to |
| <code>osl_unloadModule</code> to remove the module from memory. <p> |
| |
| A module must be registered every time it has been loaded otherwise the |
| unloading mechanism is not effective.<p> |
| |
| Before a module is registered, one has to make sure that the module is in a |
| state that prevents it from being unloaded. In other words, |
| <code>component_canUnload</code> must return <code>sal_False</code>. Assuming that |
| <code>component_canUnload</code> |
| returns <code>sal_True</code> and it is registered regardless, then a call to |
| <code>rtl_unloadUnusedModules</code> causes the module to be unloaded. This unloading can |
| be set off by a different thread and the thread which registered the module is |
| "unaware" of this. Then when the first thread tries to obtain a factory or |
| calls another function in the module, the application will crash, because the |
| module has been unloaded before. Therefore one has to ensure that the module |
| cannot be unloaded before it is registered. This is simply done by obtaining a |
| factory from the module. As long as a factory or some other object, which has |
| been created by the factory, is alive, the <code>component_canUnload</code> function will |
| return <code>sal_False</code>.<p> |
| Loading and registering have to be in this order:<br> |
| <ul> |
| <li>load a library (<code>osl_loadModule</code>)</li> |
| <li>get the <code>component_getFactory</code> function and get a factory</li> |
| <li>register the module (rtl_registerModuleForUnloading</li> |
| </ul> |
| Usually the service manager is used to obtain an instance of a service. |
| The service manager registers all modules which support the unloading mechanism. |
| When the service manager is used to get service instances than one does not |
| have to bother about registering. |
| |
| </dd> |
| <dt>Parameters</dt> |
| <dd><table border="0" width="100%" cellpadding="3" cellspacing="0"> |
| <tr> |
| <td width="15%" style="vertical-align:top; font-weight:bold">module</td> |
| <td><pre>a module handle as is obtained by osl_loadModule |
| </pre></td> |
| </tr> |
| </table> |
| </dd> |
| <dt>Return</dt> |
| <dd>sal_True - the module could be registered for unloading, sal_False otherwise |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <dl class="member"> |
| <dt class="member"><a name="rtl_removeUnloadingListener-425"> </a> |
| rtl_removeUnloadingListener</dt> |
| <dd class="member"><dl> |
| <dt class="simple">extern "C"<br> |
| void <strong>rtl_removeUnloadingListener</strong>(</dt> |
| <dd><table> |
| <tr> |
| <td><a href="t-sal_Int32.html">sal_Int32</a> </td> |
| <td> cookie );</td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| <br> |
| </dd> |
| <dd class="member"><table border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Description</dt> |
| <dd>Listeners (the callback functions) must be unregistered before the listener code |
| becomes invalid. That is, if a module contains listener code, namely callback |
| functions of type <code>rtl_unloadingListenerFunc</code>, then those functions must not be |
| registered when <code>component_canUnload</code> returns <code>sal_True</code>. |
| |
| </dd> |
| <dt>Parameters</dt> |
| <dd><table border="0" width="100%" cellpadding="3" cellspacing="0"> |
| <tr> |
| <td width="15%" style="vertical-align:top; font-weight:bold">cookie</td> |
| <td><pre>is an identifier as returned by <code>rtl_addUnloadingListener</code> function. |
| </pre></td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <dl class="member"> |
| <dt class="member"><a name="rtl_unloadUnusedModules-234"> </a> |
| rtl_unloadUnusedModules</dt> |
| <dd class="member"><dl> |
| <dt class="simple">extern "C"<br> |
| void <strong>rtl_unloadUnusedModules</strong>(</dt> |
| <dd><table> |
| <tr> |
| <td><a href="t-TimeValue.html">TimeValue</a> * </td> |
| <td> libUnused );</td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| <br> |
| </dd> |
| <dd class="member"><table border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Description</dt> |
| <dd>This function sets off the unloading mechanism. At first it notifies the |
| unloading listeners in order to give them a chance to do cleanup and get |
| their threads in a safe state. Then all registered modules are asked if they |
| can be unloaded. That is, the function calls component_canUnload on every |
| registered module. If <code>sal_True</code> is returned then <code>osl_unloadModule</code> |
| is called for the belonging module as often as it is registered. |
| <p> |
| A call to <code>osl_unloadModule</code> does not guarantee that the module is unloaded even |
| if its <code>component_canUnload</code> function returns <code>sal_True</code>. |
| <p> |
| The optional in-parameter <code>libUnused</code> specifies a period of time which a library |
| must be unused in order to qualify for being unloaded. By using this argument |
| one can counter the multithreading problem as described further above. It is in |
| the responsibility of the user of this function to provide a timespan big enough |
| to ensure that all threads are out of modules (see <code>component_canUnload</code>). |
| <p> |
| The service managers which have been created by functions such as |
| <code>createRegistryServiceFactory</code> (declared in cppuhelper/servicefactory.hxx) are |
| registered listeners and release the references to factories on notification. |
| |
| |
| </dd> |
| <dt>Parameters</dt> |
| <dd><table border="0" width="100%" cellpadding="3" cellspacing="0"> |
| <tr> |
| <td width="15%" style="vertical-align:top; font-weight:bold">libUnused</td> |
| <td><pre>span of time that a module must be unused to be unloaded. the |
| argument is optional. |
| </pre></td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <dl class="member"> |
| <dt class="member"><a name="rtl_unregisterModuleForUnloading-231"> </a> |
| rtl_unregisterModuleForUnloading</dt> |
| <dd class="member"><dl> |
| <dt class="simple">extern "C"<br> |
| void <strong>rtl_unregisterModuleForUnloading</strong>(</dt> |
| <dd><table> |
| <tr> |
| <td><a href="t-oslModule.html">oslModule</a> </td> |
| <td> module );</td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| <br> |
| </dd> |
| <dd class="member"><table border cellspacing="0"> |
| <tr> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">virtual</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">abstract</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">const</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">volatile</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">template</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">static</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">inline</td> |
| <td bgcolor="#eeeeff" width="12%" style="font-family:Arial; font-size:8pt; font-weight:bold;">C-linkage</td> |
| </tr> |
| <tr> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt;">NO</td> |
| <td style="font-family:Arial; font-size:8pt; font-weight:bold;">YES</td> |
| </tr> |
| </table> |
| <br> |
| </dd> |
| <dd class="member"><dl> |
| <dt>Description</dt> |
| <dd>The function revokes the registration of a module. By calling the function for |
| a previously registered module one prevents the module from being unloaded by |
| this unloading mechanism. However, in order to completely unregister the module |
| it is necessary to call the function as often as the module has been registered. |
| <p> |
| <code>rtl_unloadUnusedModules</code> unregisters the modules which it unloads. Therefore |
| there is no need to call this function unless one means to prevent the unloading of a module. |
| |
| </dd> |
| <dt>Parameters</dt> |
| <dd><table border="0" width="100%" cellpadding="3" cellspacing="0"> |
| <tr> |
| <td width="15%" style="vertical-align:top; font-weight:bold">module</td> |
| <td><pre>a module handle as is obtained by osl_loadModule |
| </pre></td> |
| </tr> |
| </table> |
| </dd> |
| </dl> |
| </dd> |
| </dl> |
| <hr> |
| <a href="#_top_" class="objchapter">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA.</p> |
| </body> |