2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00

workqueue: Changes for v6.15

Just one commit to expose system BH workqueues to rust.
 -----BEGIN PGP SIGNATURE-----
 
 iIQEABYKACwWIQTfIjM1kS57o3GsC/uxYfJx3gVYGQUCZ9xJ1A4cdGpAa2VybmVs
 Lm9yZwAKCRCxYfJx3gVYGfiVAP4+zWr3XRWe53iAhBQxBKGDNcfKZAZ/xywRmTvh
 sd9CywEAtTHy4u+9C1NzDW0XToUfKMhsAJuYFO6S/OpYEn2R6QQ=
 =z9C+
 -----END PGP SIGNATURE-----

Merge tag 'wq-for-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq

Pull workqueue update from Tejun Heo:
 "Just one commit to expose system BH workqueues to rust"

* tag 'wq-for-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  rust: workqueue: define built-in bh queues
This commit is contained in:
Linus Torvalds 2025-03-24 16:46:03 -07:00
commit b05f8fbe0f

View File

@ -703,3 +703,21 @@ pub fn system_freezable_power_efficient() -> &'static Queue {
// SAFETY: `system_freezable_power_efficient_wq` is a C global, always available.
unsafe { Queue::from_raw(bindings::system_freezable_power_efficient_wq) }
}
/// Returns the system bottom halves work queue (`system_bh_wq`).
///
/// It is similar to the one returned by [`system`] but for work items which
/// need to run from a softirq context.
pub fn system_bh() -> &'static Queue {
// SAFETY: `system_bh_wq` is a C global, always available.
unsafe { Queue::from_raw(bindings::system_bh_wq) }
}
/// Returns the system bottom halves high-priority work queue (`system_bh_highpri_wq`).
///
/// It is similar to the one returned by [`system_bh`] but for work items which
/// require higher scheduling priority.
pub fn system_bh_highpri() -> &'static Queue {
// SAFETY: `system_bh_highpri_wq` is a C global, always available.
unsafe { Queue::from_raw(bindings::system_bh_highpri_wq) }
}