summaryrefslogtreecommitdiff
path: root/sal/inc/rtl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-16 15:34:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-16 17:52:37 +0200
commit1268326e814837e111eaf320f72661f288393839 (patch)
tree5518044c0fc0c952ae365560c287e7b3d5162929 /sal/inc/rtl
parentb98617b3c86863fe5b4e3d9a96519707ae8cf58c (diff)
Further clean-up related to removed library unloading feature
Change-Id: I1ec2aa4d0ed0940e7c0a26a18c78f2df4693d278
Diffstat (limited to 'sal/inc/rtl')
-rw-r--r--sal/inc/rtl/unload.h66
1 files changed, 22 insertions, 44 deletions
diff --git a/sal/inc/rtl/unload.h b/sal/inc/rtl/unload.h
index 0bbc414e792d..118b5cce9127 100644
--- a/sal/inc/rtl/unload.h
+++ b/sal/inc/rtl/unload.h
@@ -22,46 +22,22 @@
#include "sal/config.h"
#include "osl/interlck.h"
-#include "osl/module.h"
#include "osl/time.h"
#include "sal/saldllapi.h"
#include "sal/types.h"
-/** C-interface for a module reference counting
- */
+/** @file
+ Backwards-compatibility remainders of a removed library unloading feature.
+*/
+
#ifdef __cplusplus
extern "C"
{
#endif
-/**
-Pointers to <code>rtl_ModuleCount</code> are passed as arguments to the default factory creator
-functions: <code>createSingleComponentFactory</code>, <code>createSingleFactory</code>,
-<code>createOneInstanceFactory</code>.
-The factory implementation is calling <code>rtl_ModuleCount.acquire</code> when it is being
-constructed and it is calling <code>rtl_ModuleCount.release</code>. The implementations of
-<code>acquire</code>
-and <code>release</code> should influence the return value of <code>component_canUnload</code>
-in a way that it
-returns <code>sal_False</code> after <code>acquire</code> has been called. That is the module will not be unloaded
-once a default factory has been created. A call to <code>release</code> may cause
-<code>component_canUnload</code> to return <code>sal_False</code>, but only if there are
-no object alive which
-originated from the module. These objects are factory instances and the service instances
-which have been created by these factories.
-<p>
-It is not necessary to synchronize <code>acquire</code> and <code>release</code> as a whole.
-Simply sychronize the
-access to a counter variable, e.g. the <code>rtl_moduleCount_release</code> implementation:
-<pre>
-extern "C" void rtl_moduleCount_acquire(rtl_ModuleCount * that )
-{
- rtl_StandardModuleCount* pMod= (rtl_StandardModuleCount*)that;
- osl_atomic_increment( &pMod->counter);
-}
-</pre>
-The SAL library offers functions that can be used for <code>acquire</code> and <code>release</code>. See struct
-<code>_rtl_StandardModuleCount</code>.
+/** Backwards-compatibility remainder of a removed library unloading feature.
+
+ @deprecated Do not use.
*/
typedef struct _rtl_ModuleCount
{
@@ -69,16 +45,16 @@ typedef struct _rtl_ModuleCount
void ( SAL_CALL * release ) ( struct _rtl_ModuleCount * that );
}rtl_ModuleCount;
+/** Backwards-compatibility remainder of a removed library unloading feature.
+ @deprecated Do not use.
+*/
#define MODULE_COUNT_INIT \
{ {rtl_moduleCount_acquire,rtl_moduleCount_release}, rtl_moduleCount_canUnload, 0, {0, 0}}
-/**
-This struct can be used to implement the unloading mechanism. To make a UNO library
-unloadable create one global instance of this struct in the module. To initialize it one
-uses the MODULE_COUNT_INIT macro.
+/** Backwards-compatibility remainder of a removed library unloading feature.
-<pre>rtl_StandardModuleCount globalModuleCount= MODULE_COUNT_INIT</pre>;
+ @deprecated Do not use.
*/
typedef struct _rtl_StandardModuleCount
{
@@ -88,22 +64,24 @@ typedef struct _rtl_StandardModuleCount
TimeValue unusedSince;
} rtl_StandardModuleCount;
-/** Default implementation for <code>rtl_ModuleCount.acquire</code>. Use this function along with
-<code>rtl_StandardModuleCount</code>.
+/** Backwards-compatibility remainder of a removed library unloading feature.
+
+ @deprecated Do not use.
*/
SAL_DLLPUBLIC void rtl_moduleCount_acquire(rtl_ModuleCount * that );
-/** Default implementation for <code>rtl_ModuleCount.release</code>.
-Use this function along with
-<code>rtl_StandardModuleCount</code>.
+
+/** Backwards-compatibility remainder of a removed library unloading feature.
+
+ @deprecated Do not use.
*/
SAL_DLLPUBLIC void rtl_moduleCount_release( rtl_ModuleCount * that );
-/** Default implementation for <code>component_canUnload</code>. Use this function along with
-<code>rtl_StandardModuleCount</code>.
+/** Backwards-compatibility remainder of a removed library unloading feature.
+
+ @deprecated Do not use.
*/
SAL_DLLPUBLIC sal_Bool rtl_moduleCount_canUnload( rtl_StandardModuleCount * that, TimeValue* libUnused);
-
#ifdef __cplusplus
}
#endif