Lines Matching full:process

5 //! This module defines the `Process` type, which represents a process using a particular binder
8 //! The `Process` object keeps track of all of the resources that this process owns in the binder
11 //! There is one `Process` object for each binder fd that a process has opened, so processes using
12 //! several binder contexts have several `Process` objects. This ensures that the contexts are
92 /// Whether freeze notifications consider this process frozen.
102 /// The fields of `Process` protected by the spinlock.
107 /// INVARIANT: Threads pushed to this list must be owned by this process.
116 /// The maximum number of threads used by the process thread pool.
127 /// Process is frozen and unable to service binder transactions.
129 /// Process received sync transactions since last frozen.
131 /// Process received async transactions since last frozen.
162 /// Schedule the work item for execution on this process.
165 /// it is woken up. Otherwise, it is pushed to the process work list.
167 /// This call can fail only if the process is dead. In this case, the work item is returned to
168 /// the caller so that the caller can drop it after releasing the inner process lock. This is
170 /// taken while holding the inner process lock.
226 // If we decided that we need to push work, push either to the process or to a thread if in update_node_refcount()
233 // Nothing to do: `push_work` may fail if the process is dead, but that's ok as in in update_node_refcount()
335 /// Used to keep track of a node that this process has a handle to.
339 /// The refcount that this process owns to the node.
349 /// The process that has a handle to the node.
350 pub(crate) process: Arc<Process>, field
359 fn new(node_ref: NodeRef, handle: u32, process: Arc<Process>) -> impl PinInit<Self> { in new()
367 process, in new()
389 /// Keeps track of references this process has to nodes owned by other processes.
395 /// Used to look up nodes using the 32-bit id that this process knows it by.
417 /// A process using binder.
419 /// Strictly speaking, there can be multiple of these per process. There is one for each binder fd
420 /// that a process has opened, so processes using several binder contexts have several `Process`
423 pub(crate) struct Process { struct
426 // The task leader (process).
429 // Credential associated with file when `Process` is created. argument
444 // incrementing/decrementing a node in another process.
450 defer_work: Work<Process>, argument
452 // Links for process list in Context.
460 impl HasWork<Process> for Process { self.defer_work } argument
464 impl ListArcSafe<0> for Process { untracked; }
467 impl ListItem<0> for Process {
472 impl workqueue::WorkItem for Process { implementation
473 type Pointer = Arc<Process>;
492 impl Process { impl
496 try_pin_init!(Process { in new()
499 inner <- kernel::new_spinlock!(ProcessInner::new(), "Process::inner"), in new()
501 node_refs <- kernel::new_mutex!(ProcessNodeRefs::new(), "Process::node_refs"), in new()
502 freeze_wait <- kernel::new_condvar!("Process::freeze_wait"), in new()
504 defer_work <- kernel::new_work!("Process::defer_work"), in new()
511 let process = list_process.clone_arc(); in new() localVariable
512 process.ctx.register_process(list_process); in new()
514 Ok(process) in new()
646 /// Attempts to fetch a work item from the process queue.
651 /// Attempts to fetch a work item from the process queue. If none is available, it registers the
655 /// it is, work will always be delivered directly to the thread (and not through the process
662 // Try to get work from the process queue. in get_work_or_register()
675 pr_err!("get_current_thread was called from the wrong process."); in get_current_thread()
803 self: ArcBorrow<'_, Process>, in insert_or_update_handle() argument
855 // Ensure the process is still alive while we insert a new reference. in insert_or_update_handle()
858 // first thing in `deferred_release`, process cleanup will not miss the items inserted into in insert_or_update_handle()
901 self: ArcBorrow<'_, Process>, in update_ref() argument
927 // Remove reference from process tables, and from the node's `refs` list. in update_ref()
937 // All refs are cleared in process exit, so this warning is expected in that case. in update_ref()
959 // This only fails if the process is dead. in inc_ref_done()
1334 // Remove all death notifications from the nodes (that belong to a different process). in deferred_release()
1499 // Very unlikely for there to be more than 3, since a process normally uses at most binder and in ioctl_freeze()
1517 impl Process { implementation
1522 this: ArcBorrow<'_, Process>, in ioctl_write_only() argument
1548 this: ArcBorrow<'_, Process>, in ioctl_write_read() argument
1568 /// The file operations supported by `Process`.
1569 impl Process { implementation
1570 pub(crate) fn open(ctx: ArcBorrow<'_, Context>, file: &File) -> Result<Arc<Process>> { in open() argument
1574 pub(crate) fn release(this: Arc<Process>, _file: &File) { in release() argument
1593 pub(crate) fn flush(this: ArcBorrow<'_, Process>) -> Result { in flush()
1609 pub(crate) fn ioctl(this: ArcBorrow<'_, Process>, file: &File, cmd: u32, arg: usize) -> Result { in ioctl() argument
1627 this: ArcBorrow<'_, Process>, in compat_ioctl() argument
1636 this: ArcBorrow<'_, Process>, in mmap() argument
1640 // We don't allow mmap to be used in a different process. in mmap()
1657 this: ArcBorrow<'_, Process>, in poll() argument
1670 /// Represents that a thread has registered with the `ready_threads` list of its process.
1679 assert!(core::ptr::eq(&thread.process.inner, guard.lock_ref())); in new()
1695 let mut inner = self.thread.process.inner.lock(); in drop()
1697 // the `ready_threads` list of its parent process. Therefore, the thread is either in that in drop()