• Home
  • Raw
  • Download

Lines Matching refs:obj

91     const flat_binder_object& obj, const void* who)  in acquire_binder_object()  argument
93 switch (obj.hdr.type) { in acquire_binder_object()
95 if (obj.binder) { in acquire_binder_object()
96 LOG_REFS("Parcel %p acquiring reference on local %p", who, obj.cookie); in acquire_binder_object()
97 reinterpret_cast<IBinder*>(obj.cookie)->incStrong(who); in acquire_binder_object()
101 if (obj.binder) in acquire_binder_object()
102 reinterpret_cast<RefBase::weakref_type*>(obj.binder)->incWeak(who); in acquire_binder_object()
105 const sp<IBinder> b = proc->getStrongProxyForHandle(obj.handle); in acquire_binder_object()
113 const wp<IBinder> b = proc->getWeakProxyForHandle(obj.handle); in acquire_binder_object()
119 ALOGD("Invalid object type 0x%08x", obj.hdr.type); in acquire_binder_object()
122 void acquire_object(const sp<ProcessState>& proc, const binder_object_header& obj, in acquire_object() argument
124 switch (obj.type) { in acquire_object()
129 const flat_binder_object& fbo = reinterpret_cast<const flat_binder_object&>(obj); in acquire_object()
137 const flat_binder_object& obj, const void* who) in release_object() argument
139 switch (obj.hdr.type) { in release_object()
141 if (obj.binder) { in release_object()
142 LOG_REFS("Parcel %p releasing reference on local %p", who, obj.cookie); in release_object()
143 reinterpret_cast<IBinder*>(obj.cookie)->decStrong(who); in release_object()
147 if (obj.binder) in release_object()
148 reinterpret_cast<RefBase::weakref_type*>(obj.binder)->decWeak(who); in release_object()
151 const sp<IBinder> b = proc->getStrongProxyForHandle(obj.handle); in release_object()
159 const wp<IBinder> b = proc->getWeakProxyForHandle(obj.handle); in release_object()
164 if (obj.cookie != 0) { // owned in release_object()
165 close(obj.handle); in release_object()
179 ALOGE("Invalid object type 0x%08x", obj.hdr.type); in release_object()
191 flat_binder_object obj = {}; in flatten_binder() local
201 obj.hdr.type = BINDER_TYPE_HANDLE; in flatten_binder()
202 obj.flags = FLAT_BINDER_FLAG_ACCEPTS_FDS; in flatten_binder()
203 obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ in flatten_binder()
204 obj.handle = handle; in flatten_binder()
205 obj.cookie = 0; in flatten_binder()
211 obj.flags = priority & FLAT_BINDER_FLAG_PRIORITY_MASK; in flatten_binder()
212 obj.flags |= FLAT_BINDER_FLAG_ACCEPTS_FDS | FLAT_BINDER_FLAG_INHERIT_RT; in flatten_binder()
213 obj.flags |= (policy & 3) << FLAT_BINDER_FLAG_SCHEDPOLICY_SHIFT; in flatten_binder()
215 obj.flags |= FLAT_BINDER_FLAG_TXN_SECURITY_CTX; in flatten_binder()
217 obj.hdr.type = BINDER_TYPE_BINDER; in flatten_binder()
218 obj.binder = reinterpret_cast<uintptr_t>(local->getWeakRefs()); in flatten_binder()
219 obj.cookie = reinterpret_cast<uintptr_t>(local); in flatten_binder()
222 obj.hdr.type = BINDER_TYPE_BINDER; in flatten_binder()
223 obj.binder = 0; in flatten_binder()
224 obj.cookie = 0; in flatten_binder()
227 return finish_flatten_binder(binder, obj, out); in flatten_binder()
233 flat_binder_object obj = {}; in flatten_binder() local
235 obj.flags = 0x7f | FLAT_BINDER_FLAG_ACCEPTS_FDS; in flatten_binder()
246 obj.hdr.type = BINDER_TYPE_WEAK_HANDLE; in flatten_binder()
247 obj.binder = 0; /* Don't pass uninitialized stack data to a remote process */ in flatten_binder()
248 obj.handle = handle; in flatten_binder()
249 obj.cookie = 0; in flatten_binder()
251 obj.hdr.type = BINDER_TYPE_WEAK_BINDER; in flatten_binder()
252 obj.binder = reinterpret_cast<uintptr_t>(binder.get_refs()); in flatten_binder()
253 obj.cookie = reinterpret_cast<uintptr_t>(binder.unsafe_get()); in flatten_binder()
255 return finish_flatten_binder(real, obj, out); in flatten_binder()
266 obj.hdr.type = BINDER_TYPE_BINDER; in flatten_binder()
267 obj.binder = 0; in flatten_binder()
268 obj.cookie = 0; in flatten_binder()
269 return finish_flatten_binder(nullptr, obj, out); in flatten_binder()
272 obj.hdr.type = BINDER_TYPE_BINDER; in flatten_binder()
273 obj.binder = 0; in flatten_binder()
274 obj.cookie = 0; in flatten_binder()
275 return finish_flatten_binder(nullptr, obj, out); in flatten_binder()
340 static inline bool isBuffer(const binder_buffer_object& obj) { in isBuffer() argument
341 return obj.hdr.type == BINDER_TYPE_PTR in isBuffer()
342 && (obj.flags & BINDER_BUFFER_FLAG_REF) == 0; in isBuffer()
839 binder_buffer_object obj = { in writeEmbeddedBuffer() local
851 return writeObject(obj); in writeEmbeddedBuffer()
858 binder_buffer_object obj { in writeBuffer() local
868 return writeObject(obj); in writeBuffer()
887 binder_buffer_object obj { in writeReference() local
898 return writeObject(obj); in writeReference()
919 binder_buffer_object obj { in writeEmbeddedReference() local
931 return writeObject(obj); in writeEmbeddedReference()
940 binder_buffer_object obj { in writeNullReference() local
948 return writeObject(obj); in writeNullReference()
962 binder_buffer_object obj { in writeEmbeddedNullReference() local
972 return writeObject(obj); in writeEmbeddedNullReference()
987 binder_buffer_object *obj = in updateCache() local
989 if(!isBuffer(*obj)) in updateCache()
993 ifo.buffer = obj->buffer; in updateCache()
994 ifo.bufend = obj->buffer + obj->length; in updateCache()
1440 const T* obj = reinterpret_cast<const T*>(mData+DPOS); in readObject() local
1442 const binder_object_header *hdr = reinterpret_cast<const binder_object_header*>(obj); in readObject()
1455 return obj; in readObject()
1469 return obj; in readObject()
1501 return obj; in readObject()
1517 return obj; in readObject()