Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ACE_STATIC_OBJECT_LOCK_H
00016 #define ACE_STATIC_OBJECT_LOCK_H
00017 #include "ace/pre.h"
00018
00019 #include "ace/ACE_export.h"
00020
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif
00024
00025 #if defined (ACE_HAS_THREADS)
00026
00027 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00028
00029 class ACE_Recursive_Thread_Mutex;
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 class ACE_Export ACE_Static_Object_Lock
00042 {
00043 public:
00044
00045 static ACE_Recursive_Thread_Mutex *instance (void);
00046
00047
00048
00049 static void cleanup_lock (void);
00050 };
00051
00052 ACE_END_VERSIONED_NAMESPACE_DECL
00053
00054 #endif
00055
00056
00057 #if defined (ACE_HAS_THREADS)
00058
00059 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00060
00061 # if defined (ACE_IS_SPLITTING)
00062 typedef ACE_Cleanup_Adapter<ACE_Recursive_Thread_Mutex> ACE_Static_Object_Lock_Type;
00063
00064 # if defined (__GNUC__)
00065
00066 static ACE_Static_Object_Lock_Type *ACE_Static_Object_Lock_lock __attribute__ ((unused)) = 0;
00067 # else
00068 static ACE_Static_Object_Lock_Type *ACE_Static_Object_Lock_lock = 0;
00069 # endif
00070
00071 # endif
00072
00073 ACE_END_VERSIONED_NAMESPACE_DECL
00074
00075 #endif
00076
00077 #include "ace/post.h"
00078 #endif