Lines Matching full:subsystem
35 //! config: configfs::Subsystem<Configuration>,
43 //! container: configfs::Subsystem<Configuration>,
52 //! config <- configfs::Subsystem::new(
124 /// A configfs subsystem.
129 pub struct Subsystem<Data> {
131 subsystem: Opaque<bindings::configfs_subsystem>,
136 // SAFETY: We do not provide any operations on `Subsystem`.
137 unsafe impl<Data> Sync for Subsystem<Data> {}
139 // SAFETY: Ownership of `Subsystem` can safely be transferred to other threads.
140 unsafe impl<Data> Send for Subsystem<Data> {}
142 impl<Data> Subsystem<Data> {
143 /// Create an initializer for a [`Subsystem`].
145 /// The subsystem will appear in configfs as a directory name given by
150 item_type: &'static ItemType<Subsystem<Data>, Data>,
154 subsystem <- pin_init::init_zeroed().chain(
180 // SAFETY: We initialized `this.subsystem` according to C API contract above.
181 unsafe { bindings::configfs_register_subsystem(this.subsystem.get()) },
188 impl<Data> PinnedDrop for Subsystem<Data> {
190 // SAFETY: We registered `self.subsystem` in the initializer returned by `Self::new`.
191 unsafe { bindings::configfs_unregister_subsystem(self.subsystem.get()) };
192 // SAFETY: We initialized the mutex in `Subsystem::new`.
193 unsafe { bindings::mutex_destroy(&raw mut (*self.subsystem.get()).su_mutex) };
223 // SAFETY: `Subsystem<Data>` embeds a field of type `bindings::config_group`
224 // within the `subsystem` field.
225 unsafe impl<Data> HasGroup<Data> for Subsystem<Data> {
228 unsafe { &raw const (*(*this).subsystem.get()).su_group }
237 unsafe { container_of!(opaque_ptr, Subsystem<Data>, subsystem) }
301 /// If `this` does not represent the root group of a configfs subsystem,
307 /// `Subsystem<Parent>`.
319 // `bindings::config_group` field within a `Subsystem<Parent>`.
320 unsafe { &(*Subsystem::container_of(this)).data }
335 /// If `this` does not represent the root group of a configfs subsystem,
341 /// `Subsystem<Parent>`.
380 /// If `this` does not represent the root group of a configfs subsystem,
386 /// `Subsystem<Parent>`.
471 impl<Data> ItemOperationsVTable<Subsystem<Data>, Data> {
485 /// Implement this trait on structs that embed a [`Subsystem`] or a [`Group`].
543 /// If `item` does not represent the root group of a configfs subsystem,
547 /// `bindings::configfs_subsystem` that is embedded in a `Subsystem<Data>`.
576 /// If `item` does not represent the root group of a configfs subsystem,
580 /// `bindings::configfs_subsystem` that is embedded in a `Subsystem<Data>`.
725 /// [`Subsystem`].
729 /// shape of a [`Group`] or [`Subsystem`].
787 impl_item_type!(Subsystem<Data>);
802 /// container: configfs::Subsystem<Configuration>,
874 /// kernel::configfs::ItemType<configfs::Subsystem<Configuration> ,Configuration>
876 /// configfs::Subsystem<Configuration>,