From 2a5a195b5826c4ed2c6cb1636e4c78c634b4219f Mon Sep 17 00:00:00 2001 From: dhinton Date: Thu, 30 May 2002 10:47:05 +0000 Subject: ChangeLogTag:Thu May 30 10:18:27 UTC 2002 Don Hinton --- ace/config-all.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'ace/config-all.h') diff --git a/ace/config-all.h b/ace/config-all.h index 94082ac193d..b4170f4fc7c 100644 --- a/ace/config-all.h +++ b/ace/config-all.h @@ -634,6 +634,32 @@ typedef void *(*ACE_THR_C_FUNC)(void *); # define ACE_HAS_POSIX_SEM #endif /* ACE_HAS_PACE */ +// ============================================================================ +// Macros for controlling the lifetimes of dlls loaded by ACE_DLL--including +// all dlls loaded via the ACE Service Config framework. +// +// Please don't change these values or add new ones wantonly, since we use +// the ACE_BIT_ENABLED, etc..., macros to test them. +// ============================================================================ + +// Per-process policy that unloads dlls eagerly. +#define ACE_DLL_UNLOAD_POLICY_PER_PROCESS 0 +// Apply policy on a per-dll basis. If the dll doesn't use one of the macros +// below, the current per-process policy will be used. +#define ACE_DLL_UNLOAD_POLICY_PER_DLL 1 +// Don't unload dll when refcount reaches zero, i.e., wait for either an +// explicit unload request or program exit. +#define ACE_DLL_UNLOAD_POLICY_LAZY 2 +// Default policy allows dlls to control their own destinies, but will +// unload those that don't make a choice eagerly. +#define ACE_DLL_UNLOAD_POLICY_DEFAULT ACE_DLL_UNLOAD_POLICY_PER_DLL + +// Add this macro you one of your cpp file in your dll. X should +// be either ACE_DLL_UNLOAD_POLICY_DEFAULT or ACE_DLL_UNLOAD_POLICY_LAZY. +#define ACE_DLL_UNLOAD_POLICY(CLS,X) \ +extern "C" u_long CLS##_Export _get_dll_unload_policy (void) \ + { return X;} + // ============================================================================ // ACE_USES_CLASSIC_SVC_CONF macro // ============================================================================ -- cgit v1.2.1