本文整理汇总了C++中wp::unsafe_get方法的典型用法代码示例。如果您正苦于以下问题:C++ wp::unsafe_get方法的具体用法?C++ wp::unsafe_get怎么用?C++ wp::unsafe_get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wp
的用法示例。
在下文中一共展示了wp::unsafe_get方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: free_heap
void HeapCache::free_heap(const wp<IBinder>& binder)
{
sp<IMemoryHeap> rel;
{
Mutex::Autolock _l(mHeapCacheLock);
ssize_t i = mHeapCache.indexOfKey(binder);
if (i>=0) {
heap_info_t& info(mHeapCache.editValueAt(i));
int32_t c = android_atomic_dec(&info.count);
if (c == 1) {
ALOGD_IF(VERBOSE,
"removing binder=%p, heap=%p, size=%d, fd=%d, count=%d",
binder.unsafe_get(), info.heap.get(),
static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
static_cast<BpMemoryHeap*>(info.heap.get())->mHeapId,
info.count);
rel = mHeapCache.valueAt(i).heap;
mHeapCache.removeItemsAt(i);
}
} else {
ALOGE("free_heap binder=%p not found!!!", binder.unsafe_get());
}
}
}
示例2: _l
// IBinder::DeathRecipient
void ChatSession::binderDied(const wp<IBinder>& who){
LOGV("binderDied() %p, tid %d, calling tid %d", who.unsafe_get(), gettid(), IPCThreadState::self()->getCallingPid());
Mutex::Autolock _l(m_csAdviseLock);
/*
IBinder *binder = who.unsafe_get();
if (binder != NULL) {
int index = mNotificationClients.indexOf(binder);
if (index >= 0) {
LOGV("Removing notification client %p", binder);
mNotificationClients.removeAt(index);
}
}
*/
pid_t callerPid = IPCThreadState::self()->getCallingPid();
LOGV("Removing notification client %d", callerPid);
m_Listeners.removeItem(callerPid);
}
示例3: binderDied
virtual void binderDied(const wp<IBinder>& who) {
ALOGW("ComposerService remote (surfaceflinger) died [%p]",
who.unsafe_get());
mComposerService.composerServiceDied();
}
示例4: binderDied
virtual void binderDied(const wp<IBinder>& who) {
ALOGW("sensorservice died [%p]", who.unsafe_get());
mSensorManger.sensorManagerDied();
}
示例5: binderDied
void AudioPolicyService::binderDied(const wp<IBinder>& who) {
LOGW("binderDied() %p, tid %d, calling tid %d", who.unsafe_get(), gettid(), IPCThreadState::self()->getCallingPid());
}