1208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian/*
2208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian * Copyright (C) 2008 The Android Open Source Project
3208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian *
4208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian * Licensed under the Apache License, Version 2.0 (the "License");
5208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian * you may not use this file except in compliance with the License.
6208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian * You may obtain a copy of the License at
7208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian *
8208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian *      http://www.apache.org/licenses/LICENSE-2.0
9208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian *
10208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian * Unless required by applicable law or agreed to in writing, software
11208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian * distributed under the License is distributed on an "AS IS" BASIS,
12208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian * See the License for the specific language governing permissions and
14208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian * limitations under the License.
15208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian */
16208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian
17208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian// All static variables go here, to control initialization and
18208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian// destruction order in the library.
19208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian
20208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian#include <private/binder/Static.h>
21208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian
22c5b2c0bf8007562536b822eb060fc54a01f8e08bMathias Agopian#include <binder/IPCThreadState.h>
23208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian#include <utils/Log.h>
24208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian
25208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopiannamespace android {
26208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian
27208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian// ------------ ProcessState.cpp
28208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian
29208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias AgopianMutex gProcessMutex;
30208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopiansp<ProcessState> gProcess;
31208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian
32208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopianclass LibUtilsIPCtStatics
33208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian{
34208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopianpublic:
35208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian    LibUtilsIPCtStatics()
36208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian    {
37208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian    }
38208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian
39208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian    ~LibUtilsIPCtStatics()
40208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian    {
41208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian        IPCThreadState::shutdown();
42208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian    }
43208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian};
44208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian
45208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopianstatic LibUtilsIPCtStatics gIPCStatics;
46208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian
47208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian// ------------ ServiceManager.cpp
48208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian
49208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias AgopianMutex gDefaultServiceManagerLock;
50208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopiansp<IServiceManager> gDefaultServiceManager;
51208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopiansp<IPermissionController> gPermissionController;
52208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian
53208059f67ed2dd9fa025e07fcb6954d3cb61c79eMathias Agopian}   // namespace android
54