Lines Matching +full:self +full:- +full:working
1 // SPDX-License-Identifier: GPL-2.0
5 //! Utilities for working with `struct poll_table`.
16 /// Creates a [`PollCondVar`] initialiser with the given name and a newly-created lock class.
51 pub unsafe fn from_ptr<'a>(ptr: *mut bindings::poll_table) -> &'a mut PollTable { in from_ptr()
57 fn get_qproc(&self) -> bindings::poll_queue_proc { in get_qproc()
58 let ptr = self.0.get(); in get_qproc()
66 pub fn register_wait(&mut self, file: &File, cv: &PollCondVar) { in register_wait() argument
67 if let Some(qproc) = self.get_qproc() { in register_wait()
68 // SAFETY: The pointers to `file` and `self` need to be valid for the duration of this in register_wait()
76 unsafe { qproc(file.as_ptr() as _, cv.wait_queue_head.get(), self.0.get()) }; in register_wait()
92 pub fn new(name: &'static CStr, key: &'static LockClassKey) -> impl PinInit<Self> { in new() argument
93 pin_init!(Self { in new()
94 inner <- CondVar::new(name, key), in new()
103 fn deref(&self) -> &CondVar { in deref()
104 &self.inner in deref()
110 fn drop(self: Pin<&mut Self>) { in drop() argument
114 unsafe { bindings::__wake_up_pollfree(self.inner.wait_queue_head.get()) }; in drop()