xref: /aoo42x/main/sal/inc/osl/getglobalmutex.hxx (revision 565d668c)
1*565d668cSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*565d668cSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*565d668cSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*565d668cSAndrew Rist  * distributed with this work for additional information
6*565d668cSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*565d668cSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*565d668cSAndrew Rist  * "License"); you may not use this file except in compliance
9*565d668cSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*565d668cSAndrew Rist  *
11*565d668cSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*565d668cSAndrew Rist  *
13*565d668cSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*565d668cSAndrew Rist  * software distributed under the License is distributed on an
15*565d668cSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*565d668cSAndrew Rist  * KIND, either express or implied.  See the License for the
17*565d668cSAndrew Rist  * specific language governing permissions and limitations
18*565d668cSAndrew Rist  * under the License.
19*565d668cSAndrew Rist  *
20*565d668cSAndrew Rist  *************************************************************/
21*565d668cSAndrew Rist 
22*565d668cSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #if !defined INCLUDED_OSL_GETGLOBALMUTEX_HXX
25cdf0e10cSrcweir #define INCLUDED_OSL_GETGLOBALMUTEX_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "osl/mutex.hxx"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir namespace osl {
30cdf0e10cSrcweir 
31cdf0e10cSrcweir /** A helper functor for the rtl_Instance template.
32cdf0e10cSrcweir 
33cdf0e10cSrcweir     See the rtl_Instance template for examples of how this class is used.
34cdf0e10cSrcweir  */
35cdf0e10cSrcweir class GetGlobalMutex
36cdf0e10cSrcweir {
37cdf0e10cSrcweir public:
operator ()()38cdf0e10cSrcweir     ::osl::Mutex * operator()()
39cdf0e10cSrcweir     {
40cdf0e10cSrcweir         return ::osl::Mutex::getGlobalMutex();
41cdf0e10cSrcweir     }
42cdf0e10cSrcweir };
43cdf0e10cSrcweir 
44cdf0e10cSrcweir }
45cdf0e10cSrcweir 
46cdf0e10cSrcweir #endif // INCLUDED_OSL_GETGLOBALMUTEX_HXX
47