From db49a2419c52cca161f5b8511ecb4fe2a1cf7782 Mon Sep 17 00:00:00 2001 From: Boqun Feng Date: Thu, 23 Sep 2021 00:44:24 +0800 Subject: [PATCH] WIP Signed-off-by: Boqun Feng --- rust/kernel/thread.rs | 4 ++-- scripts/link-vmlinux.sh | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/rust/kernel/thread.rs b/rust/kernel/thread.rs index 08f6fe6bb2664c..4caecea7bf7b56 100644 --- a/rust/kernel/thread.rs +++ b/rust/kernel/thread.rs @@ -51,7 +51,7 @@ impl RawThread { /// This function might sleep in `kthread_create_on_node` due to the memory /// allocation and waiting for the completion, therefore do not call this /// in atomic contexts (i.e. preemption-off contexts). - pub unsafe fn try_new( + pub unsafe fn spawn( name: &CStr, f: unsafe extern "C" fn(*mut c_types::c_void) -> c_types::c_int, arg: *mut c_types::c_void, @@ -214,7 +214,7 @@ impl Thread { // SAFETY: `bridge::` is a proper function pointer to a C function, // and [`Box::from_raw`] will be used in it to consume the raw pointer // in the new thread. - let result = unsafe { RawThread::try_new(name, bridge::, data as _) }; + let result = unsafe { RawThread::spawn(name, bridge::, data as _) }; if result.is_err() { // Creation fails, we need to consume the raw pointer `data` because diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 36ef7b37fc5dff..b66496c55a74f3 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -409,9 +409,7 @@ if [ -n "${CONFIG_KALLSYMS}" ]; then size1=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" ${kallsymso_prev}) size2=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" ${kallsymso}) - if [ $size1 -ne $size2 ] || [ -n "${KALLSYMS_EXTRA_PASS}" ]; then - kallsyms_step 3 - fi + kallsyms_step 3 fi vmlinux_link vmlinux "${kallsymso}" ${btf_vmlinux_bin_o}