diff options
author | Mathias Agopian <mathias@google.com> | 2009-05-18 15:08:03 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-05-20 12:55:02 -0700 |
commit | 25ba5b6564224dceefa086b5c439ef28dad530ca (patch) | |
tree | af3c9fa40d27425c37cf6492589cb86854b08f8a /libs | |
parent | 6b961bb54bfb44abd1bcee46924ca38c2d10dd72 (diff) | |
download | frameworks_base-25ba5b6564224dceefa086b5c439ef28dad530ca.zip frameworks_base-25ba5b6564224dceefa086b5c439ef28dad530ca.tar.gz frameworks_base-25ba5b6564224dceefa086b5c439ef28dad530ca.tar.bz2 |
checkpoint: split libutils into libutils + libbinder
Diffstat (limited to 'libs')
-rw-r--r-- | libs/audioflinger/Android.mk | 2 | ||||
-rw-r--r-- | libs/binder/Android.mk | 44 | ||||
-rw-r--r-- | libs/binder/Binder.cpp (renamed from libs/utils/Binder.cpp) | 0 | ||||
-rw-r--r-- | libs/binder/BpBinder.cpp (renamed from libs/utils/BpBinder.cpp) | 0 | ||||
-rw-r--r-- | libs/binder/IDataConnection.cpp (renamed from libs/utils/IDataConnection.cpp) | 0 | ||||
-rw-r--r-- | libs/binder/IInterface.cpp (renamed from libs/utils/IInterface.cpp) | 0 | ||||
-rw-r--r-- | libs/binder/IMemory.cpp (renamed from libs/utils/IMemory.cpp) | 0 | ||||
-rw-r--r-- | libs/binder/IPCThreadState.cpp (renamed from libs/utils/IPCThreadState.cpp) | 4 | ||||
-rw-r--r-- | libs/binder/IPermissionController.cpp (renamed from libs/utils/IPermissionController.cpp) | 2 | ||||
-rw-r--r-- | libs/binder/IServiceManager.cpp (renamed from libs/utils/IServiceManager.cpp) | 2 | ||||
-rw-r--r-- | libs/binder/MemoryBase.cpp (renamed from libs/utils/MemoryBase.cpp) | 0 | ||||
-rw-r--r-- | libs/binder/MemoryDealer.cpp (renamed from libs/utils/MemoryDealer.cpp) | 0 | ||||
-rw-r--r-- | libs/binder/MemoryHeapBase.cpp (renamed from libs/utils/MemoryHeapBase.cpp) | 0 | ||||
-rw-r--r-- | libs/binder/MemoryHeapPmem.cpp (renamed from libs/utils/MemoryHeapPmem.cpp) | 0 | ||||
-rw-r--r-- | libs/binder/Parcel.cpp (renamed from libs/utils/Parcel.cpp) | 2 | ||||
-rw-r--r-- | libs/binder/ProcessState.cpp (renamed from libs/utils/ProcessState.cpp) | 4 | ||||
-rw-r--r-- | libs/binder/Static.cpp | 53 | ||||
-rw-r--r-- | libs/surfaceflinger/Android.mk | 1 | ||||
-rw-r--r-- | libs/ui/Android.mk | 1 | ||||
-rw-r--r-- | libs/utils/Android.mk | 13 | ||||
-rw-r--r-- | libs/utils/Static.cpp | 31 |
21 files changed, 108 insertions, 51 deletions
diff --git a/libs/audioflinger/Android.mk b/libs/audioflinger/Android.mk index 50d516b..874f2c4 100644 --- a/libs/audioflinger/Android.mk +++ b/libs/audioflinger/Android.mk @@ -11,6 +11,7 @@ LOCAL_SRC_FILES:= \ LOCAL_SHARED_LIBRARIES := \ libcutils \ libutils \ + libbinder \ libmedia \ libhardware_legacy @@ -34,6 +35,7 @@ LOCAL_SRC_FILES:= \ LOCAL_SHARED_LIBRARIES := \ libcutils \ libutils \ + libbinder \ libmedia \ libhardware_legacy diff --git a/libs/binder/Android.mk b/libs/binder/Android.mk new file mode 100644 index 0000000..c4d695e --- /dev/null +++ b/libs/binder/Android.mk @@ -0,0 +1,44 @@ +# Copyright (C) 2009 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LOCAL_PATH:= $(call my-dir) +include $(CLEAR_VARS) + +# we have the common sources, plus some device-specific stuff +LOCAL_SRC_FILES:= \ + Binder.cpp \ + BpBinder.cpp \ + IInterface.cpp \ + IMemory.cpp \ + IPCThreadState.cpp \ + IPermissionController.cpp \ + IServiceManager.cpp \ + MemoryDealer.cpp \ + MemoryBase.cpp \ + MemoryHeapBase.cpp \ + MemoryHeapPmem.cpp \ + Parcel.cpp \ + ProcessState.cpp \ + Static.cpp + +LOCAL_LDLIBS += -lpthread + +LOCAL_SHARED_LIBRARIES := \ + liblog \ + libcutils \ + libutils + +LOCAL_MODULE:= libbinder + +include $(BUILD_SHARED_LIBRARY) diff --git a/libs/utils/Binder.cpp b/libs/binder/Binder.cpp index 37e4685..37e4685 100644 --- a/libs/utils/Binder.cpp +++ b/libs/binder/Binder.cpp diff --git a/libs/utils/BpBinder.cpp b/libs/binder/BpBinder.cpp index 69ab195..69ab195 100644 --- a/libs/utils/BpBinder.cpp +++ b/libs/binder/BpBinder.cpp diff --git a/libs/utils/IDataConnection.cpp b/libs/binder/IDataConnection.cpp index c6d49aa..c6d49aa 100644 --- a/libs/utils/IDataConnection.cpp +++ b/libs/binder/IDataConnection.cpp diff --git a/libs/utils/IInterface.cpp b/libs/binder/IInterface.cpp index 6ea8178..6ea8178 100644 --- a/libs/utils/IInterface.cpp +++ b/libs/binder/IInterface.cpp diff --git a/libs/utils/IMemory.cpp b/libs/binder/IMemory.cpp index 429bc2b..429bc2b 100644 --- a/libs/utils/IMemory.cpp +++ b/libs/binder/IMemory.cpp diff --git a/libs/utils/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp index 04ae142..704a481 100644 --- a/libs/utils/IPCThreadState.cpp +++ b/libs/binder/IPCThreadState.cpp @@ -23,8 +23,8 @@ #include <utils/TextOutput.h> #include <utils/threads.h> -#include <private/utils/binder_module.h> -#include <private/utils/Static.h> +#include <private/binder/binder_module.h> +#include <private/binder/Static.h> #include <sys/ioctl.h> #include <signal.h> diff --git a/libs/utils/IPermissionController.cpp b/libs/binder/IPermissionController.cpp index f01d38f..6b5dd8e 100644 --- a/libs/utils/IPermissionController.cpp +++ b/libs/binder/IPermissionController.cpp @@ -23,7 +23,7 @@ #include <utils/Parcel.h> #include <utils/String8.h> -#include <private/utils/Static.h> +#include <private/binder/Static.h> namespace android { diff --git a/libs/utils/IServiceManager.cpp b/libs/binder/IServiceManager.cpp index 9beeadd..f2d0c27 100644 --- a/libs/utils/IServiceManager.cpp +++ b/libs/binder/IServiceManager.cpp @@ -25,7 +25,7 @@ #include <utils/String8.h> #include <utils/SystemClock.h> -#include <private/utils/Static.h> +#include <private/binder/Static.h> #include <unistd.h> diff --git a/libs/utils/MemoryBase.cpp b/libs/binder/MemoryBase.cpp index f25e11c..f25e11c 100644 --- a/libs/utils/MemoryBase.cpp +++ b/libs/binder/MemoryBase.cpp diff --git a/libs/utils/MemoryDealer.cpp b/libs/binder/MemoryDealer.cpp index cf8201b..cf8201b 100644 --- a/libs/utils/MemoryDealer.cpp +++ b/libs/binder/MemoryDealer.cpp diff --git a/libs/utils/MemoryHeapBase.cpp b/libs/binder/MemoryHeapBase.cpp index 8251728..8251728 100644 --- a/libs/utils/MemoryHeapBase.cpp +++ b/libs/binder/MemoryHeapBase.cpp diff --git a/libs/utils/MemoryHeapPmem.cpp b/libs/binder/MemoryHeapPmem.cpp index eba2b30..eba2b30 100644 --- a/libs/utils/MemoryHeapPmem.cpp +++ b/libs/binder/MemoryHeapPmem.cpp diff --git a/libs/utils/Parcel.cpp b/libs/binder/Parcel.cpp index 4225e67..cea5277 100644 --- a/libs/utils/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -29,7 +29,7 @@ #include <utils/TextOutput.h> #include <utils/misc.h> -#include <private/utils/binder_module.h> +#include <private/binder/binder_module.h> #include <stdio.h> #include <stdlib.h> diff --git a/libs/utils/ProcessState.cpp b/libs/binder/ProcessState.cpp index 4567df6..3a99e24 100644 --- a/libs/utils/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -29,8 +29,8 @@ #include <utils/String8.h> #include <utils/threads.h> -#include <private/utils/binder_module.h> -#include <private/utils/Static.h> +#include <private/binder/binder_module.h> +#include <private/binder/Static.h> #include <errno.h> #include <fcntl.h> diff --git a/libs/binder/Static.cpp b/libs/binder/Static.cpp new file mode 100644 index 0000000..ff2a046 --- /dev/null +++ b/libs/binder/Static.cpp @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// All static variables go here, to control initialization and +// destruction order in the library. + +#include <private/binder/Static.h> + +#include <utils/IPCThreadState.h> +#include <utils/Log.h> + +namespace android { + +// ------------ ProcessState.cpp + +Mutex gProcessMutex; +sp<ProcessState> gProcess; + +class LibUtilsIPCtStatics +{ +public: + LibUtilsIPCtStatics() + { + } + + ~LibUtilsIPCtStatics() + { + IPCThreadState::shutdown(); + } +}; + +static LibUtilsIPCtStatics gIPCStatics; + +// ------------ ServiceManager.cpp + +Mutex gDefaultServiceManagerLock; +sp<IServiceManager> gDefaultServiceManager; +sp<IPermissionController> gPermissionController; + +} // namespace android diff --git a/libs/surfaceflinger/Android.mk b/libs/surfaceflinger/Android.mk index 2212436..b7a464f 100644 --- a/libs/surfaceflinger/Android.mk +++ b/libs/surfaceflinger/Android.mk @@ -34,6 +34,7 @@ endif LOCAL_SHARED_LIBRARIES := \ libhardware \ libutils \ + libbinder \ libcutils \ libui \ libcorecg \ diff --git a/libs/ui/Android.mk b/libs/ui/Android.mk index f944357..1ebcb54 100644 --- a/libs/ui/Android.mk +++ b/libs/ui/Android.mk @@ -32,6 +32,7 @@ LOCAL_SHARED_LIBRARIES := \ libcorecg \ libcutils \ libutils \ + libbinder \ libpixelflinger \ libhardware \ libhardware_legacy diff --git a/libs/utils/Android.mk b/libs/utils/Android.mk index 5a1a89b..30b6733 100644 --- a/libs/utils/Android.mk +++ b/libs/utils/Android.mk @@ -103,19 +103,6 @@ include $(CLEAR_VARS) # we have the common sources, plus some device-specific stuff LOCAL_SRC_FILES:= \ $(commonSources) \ - Binder.cpp \ - BpBinder.cpp \ - IInterface.cpp \ - IMemory.cpp \ - IPCThreadState.cpp \ - MemoryDealer.cpp \ - MemoryBase.cpp \ - MemoryHeapBase.cpp \ - MemoryHeapPmem.cpp \ - Parcel.cpp \ - ProcessState.cpp \ - IPermissionController.cpp \ - IServiceManager.cpp \ Unicode.cpp \ backup_data.cpp \ backup_helper_file.cpp diff --git a/libs/utils/Static.cpp b/libs/utils/Static.cpp index 93f7e4f..4dfa578 100644 --- a/libs/utils/Static.cpp +++ b/libs/utils/Static.cpp @@ -20,7 +20,6 @@ #include <private/utils/Static.h> #include <utils/BufferedTextOutput.h> -#include <utils/IPCThreadState.h> #include <utils/Log.h> namespace android { @@ -87,34 +86,4 @@ TextOutput& alog(gLogTextOutput); TextOutput& aout(gStdoutTextOutput); TextOutput& aerr(gStderrTextOutput); -#ifndef LIBUTILS_NATIVE - -// ------------ ProcessState.cpp - -Mutex gProcessMutex; -sp<ProcessState> gProcess; - -class LibUtilsIPCtStatics -{ -public: - LibUtilsIPCtStatics() - { - } - - ~LibUtilsIPCtStatics() - { - IPCThreadState::shutdown(); - } -}; - -static LibUtilsIPCtStatics gIPCStatics; - -// ------------ ServiceManager.cpp - -Mutex gDefaultServiceManagerLock; -sp<IServiceManager> gDefaultServiceManager; -sp<IPermissionController> gPermissionController; - -#endif - } // namespace android |