Lines Matching refs:obj
84 const flat_binder_object& obj, const void* who) in acquire_binder_object() argument
86 switch (obj.hdr.type) { in acquire_binder_object()
88 if (obj.binder) { in acquire_binder_object()
89 LOG_REFS("Parcel %p acquiring reference on local %p", who, obj.cookie); in acquire_binder_object()
90 reinterpret_cast<IBinder*>(obj.cookie)->incStrong(who); in acquire_binder_object()
94 if (obj.binder) in acquire_binder_object()
95 reinterpret_cast<RefBase::weakref_type*>(obj.binder)->incWeak(who); in acquire_binder_object()
98 const sp<IBinder> b = proc->getStrongProxyForHandle(obj.handle); in acquire_binder_object()
106 const wp<IBinder> b = proc->getWeakProxyForHandle(obj.handle); in acquire_binder_object()
112 ALOGD("Invalid object type 0x%08x", obj.hdr.type); in acquire_binder_object()
115 void acquire_object(const sp<ProcessState>& proc, const binder_object_header& obj, in acquire_object() argument
117 switch (obj.type) { in acquire_object()
122 const flat_binder_object& fbo = reinterpret_cast<const flat_binder_object&>(obj); in acquire_object()
130 const flat_binder_object& obj, const void* who) in release_object() argument
132 switch (obj.hdr.type) { in release_object()
134 if (obj.binder) { in release_object()
135 LOG_REFS("Parcel %p releasing reference on local %p", who, obj.cookie); in release_object()
136 reinterpret_cast<IBinder*>(obj.cookie)->decStrong(who); in release_object()
140 if (obj.binder) in release_object()
141 reinterpret_cast<RefBase::weakref_type*>(obj.binder)->decWeak(who); in release_object()
144 const sp<IBinder> b = proc->getStrongProxyForHandle(obj.handle); in release_object()
152 const wp<IBinder> b = proc->getWeakProxyForHandle(obj.handle); in release_object()
157 if (obj.cookie != 0) { // owned in release_object()
158 close(obj.handle); in release_object()
172 ALOGE("Invalid object type 0x%08x", obj.hdr.type); in release_object()
184 flat_binder_object obj = {}; in flatten_binder() local
194 obj.hdr.type = BINDER_TYPE_HANDLE; in flatten_binder()
195 obj.flags = FLAT_BINDER_FLAG_ACCEPTS_FDS; in flatten_binder()
196 obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ in flatten_binder()
197 obj.handle = handle; in flatten_binder()
198 obj.cookie = 0; in flatten_binder()
204 obj.flags = priority & FLAT_BINDER_FLAG_PRIORITY_MASK; in flatten_binder()
205 obj.flags |= FLAT_BINDER_FLAG_ACCEPTS_FDS | FLAT_BINDER_FLAG_INHERIT_RT; in flatten_binder()
206 obj.flags |= (policy & 3) << FLAT_BINDER_FLAG_SCHED_POLICY_SHIFT; in flatten_binder()
208 obj.flags |= FLAT_BINDER_FLAG_TXN_SECURITY_CTX; in flatten_binder()
210 obj.hdr.type = BINDER_TYPE_BINDER; in flatten_binder()
211 obj.binder = reinterpret_cast<uintptr_t>(local->getWeakRefs()); in flatten_binder()
212 obj.cookie = reinterpret_cast<uintptr_t>(local); in flatten_binder()
215 obj.hdr.type = BINDER_TYPE_BINDER; in flatten_binder()
216 obj.binder = 0; in flatten_binder()
217 obj.cookie = 0; in flatten_binder()
220 return finish_flatten_binder(binder, obj, out); in flatten_binder()
736 binder_buffer_object obj = { in writeEmbeddedBuffer() local
748 return writeObject(obj); in writeEmbeddedBuffer()
755 binder_buffer_object obj { in writeBuffer() local
765 return writeObject(obj); in writeBuffer()
780 binder_buffer_object *obj = in updateCache() local
782 if(obj->hdr.type != BINDER_TYPE_PTR) in updateCache()
786 ifo.buffer = obj->buffer; in updateCache()
787 ifo.bufend = obj->buffer + obj->length; in updateCache()
1226 const T* obj = reinterpret_cast<const T*>(mData+DPOS); in readObject() local
1228 const binder_object_header *hdr = reinterpret_cast<const binder_object_header*>(obj); in readObject()
1241 return obj; in readObject()
1255 return obj; in readObject()
1287 return obj; in readObject()
1303 return obj; in readObject()