Home
last modified time | relevance | path

Searched refs:lock (Results 1 – 25 of 868) sorted by relevance

12345678910>>...35

/frameworks/base/services/core/java/com/android/server/
DLockGuard.java94 private static LockInfo findOrCreateLockInfo(Object lock) { in findOrCreateLockInfo() argument
95 LockInfo info = sKnown.get(lock); in findOrCreateLockInfo()
98 info.label = "0x" + Integer.toHexString(System.identityHashCode(lock)) + " [" in findOrCreateLockInfo()
100 sKnown.put(lock, info); in findOrCreateLockInfo()
110 public static Object guard(Object lock) { in guard() argument
112 if (lock == null || Thread.holdsLock(lock)) return lock; in guard()
116 final LockInfo info = findOrCreateLockInfo(lock); in guard()
122 doLog(lock, "Calling thread " + Thread.currentThread().getName() in guard()
124 + lockToString(lock)); in guard()
134 if (test == null || test == lock) continue; in guard()
[all …]
/frameworks/base/libs/hwui/thread/
DCommonPool.cpp43 std::unique_lock lock(mLock); in CommonPool() local
46 tidConditionVars[i].wait(lock); in CommonPool()
69 std::unique_lock lock(mLock); in enqueue() local
71 lock.unlock(); in enqueue()
73 lock.lock(); in enqueue()
82 std::unique_lock lock(mLock); in workerLoop() local
86 mCondition.wait(lock); in workerLoop()
93 lock.unlock(); in workerLoop()
95 lock.lock(); in workerLoop()
105 std::unique_lock lock(mLock); in doWaitForIdle() local
[all …]
/frameworks/native/services/inputflinger/tests/
DFakeInputDispatcherPolicy.cpp53 std::scoped_lock lock(mLock); in assertFilterInputEventWasNotCalled() local
58 std::scoped_lock lock(mLock); in assertNotifyConfigurationChangedWasCalled() local
65 std::scoped_lock lock(mLock); in assertNotifySwitchWasCalled() local
76 std::scoped_lock lock(mLock); in assertOnPointerDownEquals() local
82 std::scoped_lock lock(mLock); in assertOnPointerDownWasNotCalled() local
90 std::unique_lock lock(mLock); in assertNotifyNoFocusedWindowAnrWasCalled() local
94 application = getAnrTokenLockedInterruptible(timeout, mAnrApplications, lock)); in assertNotifyNoFocusedWindowAnrWasCalled()
108 std::unique_lock lock(mLock); in assertNotifyWindowUnresponsiveWasCalled() local
111 ASSERT_NO_FATAL_FAILURE(result = getAnrTokenLockedInterruptible(timeout, mAnrWindows, lock)); in assertNotifyWindowUnresponsiveWasCalled()
118 std::unique_lock lock(mLock); in getUnresponsiveWindowToken() local
[all …]
/frameworks/native/services/surfaceflinger/tests/unittests/
DWindowInfosListenerInvokerTest.cpp51 std::scoped_lock lock{mutex}; in TEST_F() local
64 std::unique_lock<std::mutex> lock{mutex}; in TEST_F() local
65 cv.wait(lock, [&]() { return callCount == 1; }); in TEST_F()
83 std::scoped_lock lock{mutex}; in TEST_F() local
100 std::unique_lock<std::mutex> lock{mutex}; in TEST_F() local
101 cv.wait(lock, [&]() { return callCount == expectedCallCount; }); in TEST_F()
116 std::scoped_lock lock{mutex}; in TEST_F() local
130 std::unique_lock lock{mutex}; in TEST_F() local
131 cv.wait(lock, [&]() { return callCount == 1; }); in TEST_F()
139 std::unique_lock lock{mutex}; in TEST_F() local
[all …]
DBackgroundExecutorTest.cpp19 std::lock_guard<std::mutex> lock{mutex}; in TEST_F() local
24 std::unique_lock<std::mutex> lock{mutex}; in TEST_F() local
25 condition_variable.wait(lock, [&backgroundTaskComplete]() { return backgroundTaskComplete; }); in TEST_F()
39 std::lock_guard<std::mutex> lock{mutex}; in TEST_F() local
48 std::unique_lock<std::mutex> lock{mutex}; in TEST_F() local
49 condition_variable.wait(lock, [&backgroundTaskCompleteCount]() { in TEST_F()
/frameworks/av/media/module/libmediatranscoding/transcoder/tests/
DTranscoderTestUtils.h88 std::unique_lock<std::mutex> lock(mMutex); in onTrackFormatAvailable()
94 std::unique_lock<std::mutex> lock(mMutex); in onTrackFinished()
100 std::unique_lock<std::mutex> lock(mMutex); in onTrackStopped()
107 std::unique_lock<std::mutex> lock(mMutex); in onTrackError()
115 std::unique_lock<std::mutex> lock(mMutex); in waitUntilFinished()
117 mTranscodingFinishedCondition.wait(lock); in waitUntilFinished()
123 std::unique_lock<std::mutex> lock(mMutex); in waitUntilTrackFormatAvailable()
125 mTrackFormatAvailableCondition.wait(lock); in waitUntilTrackFormatAvailable()
147 std::unique_lock<std::mutex> lock(mMutex); in onFinished()
155 std::unique_lock<std::mutex> lock(mMutex); in onError()
[all …]
/frameworks/av/media/libmediaplayerservice/
DMediaRecorderClient.cpp61 Mutex::Autolock lock(mLock); in setInputSurface() local
72 Mutex::Autolock lock(mLock); in querySurfaceMediaSource() local
86 Mutex::Autolock lock(mLock); in setCamera() local
97 Mutex::Autolock lock(mLock); in setPreviewSurface() local
112 Mutex::Autolock lock(mLock); in setVideoSource() local
140 Mutex::Autolock lock(mLock); in setAudioSource() local
151 Mutex::Autolock lock(mLock); in setPrivacySensitive() local
161 Mutex::Autolock lock(mLock); in isPrivacySensitive() local
174 Mutex::Autolock lock(mLock); in setOutputFormat() local
185 Mutex::Autolock lock(mLock); in setVideoEncoder() local
[all …]
/frameworks/native/libs/renderengine/skia/debug/
DCommonPool.cpp63 std::unique_lock lock(mLock); in enqueue() local
65 lock.unlock(); in enqueue()
68 lock.lock(); in enqueue()
77 std::unique_lock lock(mLock); in workerLoop() local
81 mCondition.wait(lock); in workerLoop()
89 lock.unlock(); in workerLoop()
91 lock.lock(); in workerLoop()
/frameworks/base/tools/lock_agent/java/com/android/lock_checker/
DOnThreadLockChecker.java131 public void pre(Object lock) { in pre() argument
132 handlePre(Thread.currentThread(), lock); in pre() local
136 public void post(Object lock) { in post() argument
137 handlePost(Thread.currentThread(), lock); in post() local
140 private void handlePre(Thread self, Object lock) { in handlePre() argument
145 heldLocks.add(lock); in handlePre()
155 LockPair tmp = new LockPair(lock, lock); in handlePre()
160 if (SKIP_RECURSIVE && lock == alreadyHeld) { in handlePre()
165 tmp.set(alreadyHeld, lock); in handlePre()
175 tmp.set(lock, alreadyHeld); in handlePre()
[all …]
/frameworks/av/media/module/service.mediatranscoding/
DSimulatedTranscoder.cpp64 auto lock = std::scoped_lock(mLock); in start() local
76 auto callback = mCallback.lock(); in start()
85 auto callback = mCallback.lock(); in pause()
97 auto callback = mCallback.lock(); in resume()
117 auto lock = std::scoped_lock(mLock); in queueEvent() local
137 std::unique_lock<std::mutex> lock(mLock); in threadLoop() local
144 mCondition.wait(lock); in threadLoop()
150 std::cv_status status = mCondition.wait_for(lock, mRemainingTimeMap[key]); in threadLoop()
154 auto callback = mCallback.lock(); in threadLoop()
158 lock.unlock(); in threadLoop()
[all …]
/frameworks/native/services/surfaceflinger/
DMutexUtils.h25 ConditionalLock(Mutex& mutex, bool lock) ACQUIRE(mutex) : mutex(mutex), lock(lock) { in ConditionalLock()
26 if (lock) mutex.lock(); in ConditionalLock()
30 if (lock) mutex.unlock(); in RELEASE()
34 const bool lock; member
/frameworks/native/services/surfaceflinger/Display/
DDisplayModeController.cpp49 std::lock_guard lock(mDisplayLock); in registerDisplay() local
59 std::lock_guard lock(mDisplayLock); in registerDisplay() local
66 std::lock_guard lock(mDisplayLock); in unregisterDisplay() local
73 std::lock_guard lock(mDisplayLock); in selectorPtrFor() local
81 std::lock_guard lock(mDisplayLock); in setDesiredMode() local
89 std::scoped_lock lock(displayPtr->desiredModeLock); in setDesiredMode() local
131 std::lock_guard lock(mDisplayLock); in getDesiredMode() local
136 std::scoped_lock lock(displayPtr->desiredModeLock); in getDesiredMode() local
143 std::lock_guard lock(mDisplayLock); in getPendingMode() local
148 std::scoped_lock lock(displayPtr->desiredModeLock); in getPendingMode() local
[all …]
/frameworks/libs/systemui/toruslib/torus-wallpaper-settings/src/main/java/com/google/android/torus/settings/storage/
DCustomizedSharedPreferences.kt100 private val lock = Any() constant
124 synchronized(lock) { jsonObj = bundleToJson(bundle) } in save()
141 synchronized(lock) { bundle = jsonToBundle(json) } in load()
158 synchronized(lock) { bundle.putBoolean(key, value) } in putBoolean()
169 synchronized(lock) { bundle.putInt(key, value) } in putInt()
180 synchronized(lock) { bundle.putFloat(key, value) } in putFloat()
191 synchronized(lock) { bundle.putString(key, value) } in putString()
202 synchronized(lock) { return bundle.getBoolean(key, defaultValue) } in getBoolean()
213 synchronized(lock) { return bundle.getInt(key, defaultValue) } in getInt()
224 synchronized(lock) { return bundle.getFloat(key, defaultValue) } in getFloat()
[all …]
/frameworks/native/include/input/
DBlockingQueue.h48 std::unique_lock lock(mLock); in pop()
50 mHasElements.wait(lock, [this]() REQUIRES(mLock) { return !this->mQueue.empty(); }); in pop()
62 std::unique_lock lock(mLock); in popWithTimeout()
64 if (!mHasElements.wait_for(lock, duration, in popWithTimeout()
81 std::scoped_lock lock(mLock); in push()
100 std::scoped_lock lock(mLock); in emplace()
111 std::scoped_lock lock(mLock); in erase_if()
120 std::scoped_lock lock(mLock); in clear()
130 std::scoped_lock lock(mLock); in size()
/frameworks/base/core/java/com/android/internal/midi/
DEventScheduler.java155 Object lock = getLock(); in add() local
156 synchronized (lock) { in add()
166 lock.notify(); in add()
193 Object lock = getLock(); in getNextEvent() local
194 synchronized (lock) { in getNextEvent()
217 Object lock = getLock(); in waitNextEvent() local
218 synchronized (lock) { in waitNextEvent()
240 lock.wait((int) millisToWait); in waitNextEvent()
256 Object lock = getLock(); in close() local
257 synchronized (lock) { in close()
[all …]
/frameworks/av/services/camera/libcameraservice/device3/
DCamera3OutputStreamInterface.cpp35 std::lock_guard<std::mutex> lock(mLock); in add() local
40 std::lock_guard<std::mutex> lock(mLock); in remove() local
45 std::lock_guard<std::mutex> lock(mLock); in get() local
54 std::lock_guard<std::mutex> lock(mLock); in operator []() local
59 std::lock_guard<std::mutex> lock(mLock); in size() local
64 std::lock_guard<std::mutex> lock(mLock); in clear() local
69 std::lock_guard<std::mutex> lock(mLock); in getStreamIds() local
78 std::lock_guard<std::mutex> lock(other.mLock); in StreamSet() local
/frameworks/native/services/vibratorservice/
DVibratorCallbackScheduler.cpp55 std::lock_guard<std::mutex> lock(mMutex); in ~CallbackScheduler() local
66 std::lock_guard<std::mutex> lock(mMutex); in schedule() local
77 std::unique_lock<std::mutex> lock(mMutex); in loop() local
85 lock.unlock(); in loop()
87 lock.lock(); in loop()
91 mCondition.wait(lock, [this] { return mFinished || !mQueue.empty(); }); in loop()
96 mCondition.wait_for(lock, mQueue.top().getWaitForExpirationDuration()); in loop()
/frameworks/av/drm/libdrmframework/plugins/common/util/include/
DSessionMap.h37 Mutex::Autolock lock(mLock); in ~SessionMap()
51 Mutex::Autolock lock(mLock); in addValue()
67 Mutex::Autolock lock(mLock); in getValue()
77 Mutex::Autolock lock(mLock); in getSize()
90 Mutex::Autolock lock(mLock); in getValueAt()
105 Mutex::Autolock lock(mLock); in removeValue()
118 Mutex::Autolock lock(mLock); in isCreated()
123 Mutex::Autolock lock(mLock);
/frameworks/av/media/libstagefright/renderfright/threaded/
DRenderEngineThreaded.cpp49 std::lock_guard lock(mThreadMutex); in ~RenderEngineThreaded() local
71 std::unique_lock<std::mutex> lock(mThreadMutex); in threadMain() local
80 mCondition.wait(lock, [this]() REQUIRES(mThreadMutex) { in threadMain()
90 std::lock_guard lock(mThreadMutex); in primeCache() local
105 std::lock_guard lock(mThreadMutex); in dump() local
122 std::lock_guard lock(mThreadMutex); in useNativeFenceSync() local
137 std::lock_guard lock(mThreadMutex); in useWaitSync() local
152 std::lock_guard lock(mThreadMutex); in genTextures() local
167 std::lock_guard lock(mThreadMutex); in deleteTextures() local
182 std::lock_guard lock(mThreadMutex); in bindExternalTextureImage() local
[all …]
/frameworks/native/libs/bufferstreams/rust/src/subscribers/
Dshared.rs46 let inner = self.0.lock().unwrap(); in map_inner()
52 let mut inner = self.0.lock().unwrap(); in map_inner_mut()
65 let inner = self.0.lock().unwrap(); in get_subscriber_stream_config()
70 let mut inner = self.0.lock().unwrap(); in on_subscribe()
81 let mut inner = self.0.lock().unwrap(); in on_next()
86 let mut inner = self.0.lock().unwrap(); in on_error()
91 let mut inner = self.0.lock().unwrap(); in on_complete()
/frameworks/native/libs/vr/libpdx/
Dservice.cpp27 auto svc = service_.lock();
52 auto svc = service_.lock(); in Destroy()
79 if (auto svc = service_.lock()) { in ReadVector()
89 if (auto svc = service_.lock()) { in ReadVectorAll()
107 if (auto svc = service_.lock()) { in Read()
118 if (auto svc = service_.lock()) { in WriteVector()
128 if (auto svc = service_.lock()) { in WriteVectorAll()
146 if (auto svc = service_.lock()) { in Write()
156 if (auto svc = service_.lock()) { in PushFileHandle()
165 if (auto svc = service_.lock()) { in PushFileHandle()
[all …]
/frameworks/native/libs/renderengine/threaded/
DRenderEngineThreaded.cpp94 std::scoped_lock lock(mInitializedMutex); in threadMain() local
101 std::scoped_lock lock(mThreadMutex); in threadMain() local
116 std::unique_lock<std::mutex> lock(mThreadMutex); in threadMain() local
117 mCondition.wait(lock, [this]() REQUIRES(mThreadMutex) { in threadMain()
128 std::unique_lock<std::mutex> lock(mInitializedMutex); in waitUntilInitialized() local
129 mInitializedCondition.wait(lock, [this] { return mIsInitialized.load(); }); in waitUntilInitialized()
140 std::lock_guard lock(mThreadMutex); in primeCache() local
164 std::lock_guard lock(mThreadMutex); in dump() local
183 std::lock_guard lock(mThreadMutex); in mapExternalTextureBuffer() local
197 std::lock_guard lock(mThreadMutex); in unmapExternalTextureBuffer() local
[all …]
/frameworks/av/media/module/libmediatranscoding/
DTranscodingThermalPolicy.cpp49 std::scoped_lock lock{mRegisteredLock}; in registerSelf() local
79 std::scoped_lock lock{mRegisteredLock}; in unregisterSelf() local
103 std::scoped_lock lock{mCallbackLock}; in setCallback() local
108 std::scoped_lock lock{mRegisteredLock}; in getThrottlingStatus() local
116 std::scoped_lock lock{mRegisteredLock}; in onStatusChange() local
124 std::scoped_lock lock{mCallbackLock}; in onStatusChange() local
126 if ((cb = mThermalPolicyCallback.lock()) != nullptr) { in onStatusChange()
/frameworks/base/media/jni/soundpool/
DSoundDecoder.cpp53 std::lock_guard lock(mLock); in quit() local
64 std::unique_lock lock(mLock); in run() local
69 lock, std::chrono::duration<int32_t, std::milli>(kWaitTimeBeforeCloseMs)); in run()
79 lock.unlock(); in run()
87 lock.lock(); in run()
97 std::unique_lock lock(mLock); in loadSound() local
101 mQueueSpaceAvailable.wait(lock); in loadSound()
/frameworks/av/media/module/bufferpool/2.0/
DObserver.cpp34 std::unique_lock<std::mutex> lock(mLock); in onMessage() local
37 const std::shared_ptr<BufferPoolClient> client = it->second.lock(); in onMessage()
41 lock.unlock(); in onMessage()
50 std::lock_guard<std::mutex> lock(mLock); in addClient() local
52 if (!it->second.lock() || it->first == connectionId) { in addClient()
63 std::lock_guard<std::mutex> lock(mLock); in delClient() local

12345678910>>...35