Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / ace / Static_Object_Lock.h
blob0539e0052e2d240e45088660b5a642922e305158
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Static_Object_Lock.h
7 * @author David L. Levine <levine@cs.wustl.edu>
8 * @author Matthias Kerkhoff
9 * @author Per Andersson
11 //=============================================================================
13 #ifndef ACE_STATIC_OBJECT_LOCK_H
14 #define ACE_STATIC_OBJECT_LOCK_H
15 #include /**/ "ace/pre.h"
17 #include /**/ "ace/ACE_export.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #if defined (ACE_HAS_THREADS)
25 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
27 class ACE_Recursive_Thread_Mutex;
29 /**
30 * @class ACE_Static_Object_Lock
32 * @brief Provide an interface to access a global lock.
34 * This class is used to serialize the creation of static
35 * singleton objects. It really isn't needed any more, because
36 * anyone can access ACE_STATIC_OBJECT_LOCK directly. But, it
37 * is retained for backward compatibility.
39 class ACE_Export ACE_Static_Object_Lock
41 public:
42 /// Static lock access point.
43 static ACE_Recursive_Thread_Mutex *instance ();
45 /// For use only by ACE_Object_Manager to clean up lock if it
46 /// what dynamically allocated.
47 static void cleanup_lock ();
50 ACE_END_VERSIONED_NAMESPACE_DECL
52 #endif /* ACE_HAS_THREADS */
54 #include /**/ "ace/post.h"
55 #endif /* ACE_STATIC_OBJECT_LOCK_H */