rusty: Use scx_ops_open!() in scx_rusty

Now that the scx_ops_open!() macro is available, let's use it in scx_rusty to
cover all cases of when hotplug can happen.

Signed-off-by: David Vernet <void@manifault.com>
This commit is contained in:
David Vernet 2024-05-15 16:07:14 -05:00
parent 4edd8d75e6
commit 27d2490b1e
No known key found for this signature in database
GPG Key ID: 59E4B86965C4F364

View File

@ -38,6 +38,7 @@ use scx_utils::compat;
use scx_utils::init_libbpf_logging;
use scx_utils::scx_ops_attach;
use scx_utils::scx_ops_load;
use scx_utils::scx_ops_open;
use scx_utils::uei_exited;
use scx_utils::uei_read;
use scx_utils::SCX_ECODE_ACT_RESTART;
@ -235,7 +236,7 @@ impl<'a> Scheduler<'a> {
let mut skel_builder = BpfSkelBuilder::default();
skel_builder.obj_builder.debug(opts.verbose > 0);
init_libbpf_logging(None);
let mut skel = skel_builder.open().context("Failed to open BPF program")?;
let mut skel = scx_ops_open!(skel_builder, rusty).unwrap();
// Initialize skel according to @opts.
let top = Arc::new(Topology::new()?);