Skip to content

Commit 52d5dce

Browse files
committed
userlib: remove inline(never) on naked fns
These are always inline(never), and so adding it is considered incorrect. See rust-lang/rust#79653 for more details.
1 parent b0251d4 commit 52d5dce

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

userlib/src/lib.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ struct SendArgs<'a> {
125125
/// Core implementation of the SEND syscall.
126126
///
127127
/// See the note on syscall stubs at the top of this module for rationale.
128-
#[inline(never)]
129128
#[naked]
130129
unsafe extern "C" fn sys_send_stub(_args: &mut SendArgs<'_>) -> RcLen {
131130
asm!("
@@ -260,7 +259,6 @@ pub struct RecvMessage {
260259
/// Core implementation of the RECV syscall.
261260
///
262261
/// See the note on syscall stubs at the top of this module for rationale.
263-
#[inline(never)]
264262
#[naked]
265263
#[must_use]
266264
unsafe extern "C" fn sys_recv_stub(
@@ -326,7 +324,6 @@ pub fn sys_reply(peer: TaskId, code: u32, message: &[u8]) {
326324
/// Core implementation of the REPLY syscall.
327325
///
328326
/// See the note on syscall stubs at the top of this module for rationale.
329-
#[inline(never)]
330327
#[naked]
331328
unsafe extern "C" fn sys_reply_stub(
332329
_peer: u32,
@@ -390,7 +387,6 @@ pub fn sys_set_timer(deadline: Option<u64>, notifications: u32) {
390387
/// Core implementation of the SET_TIMER syscall.
391388
///
392389
/// See the note on syscall stubs at the top of this module for rationale.
393-
#[inline(never)]
394390
#[naked]
395391
unsafe extern "C" fn sys_set_timer_stub(
396392
_set_timer: u32,
@@ -447,7 +443,6 @@ pub fn sys_borrow_read(
447443
/// Core implementation of the BORROW_READ syscall.
448444
///
449445
/// See the note on syscall stubs at the top of this module for rationale.
450-
#[inline(never)]
451446
#[naked]
452447
unsafe extern "C" fn sys_borrow_read_stub(_args: *mut BorrowReadArgs) -> RcLen {
453448
asm!("
@@ -506,7 +501,6 @@ pub fn sys_borrow_write(
506501
/// Core implementation of the BORROW_WRITE syscall.
507502
///
508503
/// See the note on syscall stubs at the top of this module for rationale.
509-
#[inline(never)]
510504
#[naked]
511505
unsafe extern "C" fn sys_borrow_write_stub(
512506
_args: *mut BorrowWriteArgs,
@@ -571,7 +565,6 @@ struct RawBorrowInfo {
571565
/// Core implementation of the BORROW_INFO syscall.
572566
///
573567
/// See the note on syscall stubs at the top of this module for rationale.
574-
#[inline(never)]
575568
#[naked]
576569
unsafe extern "C" fn sys_borrow_info_stub(
577570
_lender: u32,
@@ -615,7 +608,6 @@ pub fn sys_irq_control(mask: u32, enable: bool) {
615608
/// Core implementation of the IRQ_CONTROL syscall.
616609
///
617610
/// See the note on syscall stubs at the top of this module for rationale.
618-
#[inline(never)]
619611
#[naked]
620612
unsafe extern "C" fn sys_irq_control_stub(_mask: u32, _enable: u32) {
621613
asm!("
@@ -651,7 +643,6 @@ pub fn sys_panic(msg: &[u8]) -> ! {
651643
/// Core implementation of the PANIC syscall.
652644
///
653645
/// See the note on syscall stubs at the top of this module for rationale.
654-
#[inline(never)]
655646
#[naked]
656647
unsafe extern "C" fn sys_panic_stub(_msg: *const u8, _len: usize) -> ! {
657648
asm!("
@@ -734,7 +725,6 @@ struct RawTimerState {
734725
/// Core implementation of the GET_TIMER syscall.
735726
///
736727
/// See the note on syscall stubs at the top of this module for rationale.
737-
#[inline(never)]
738728
#[naked]
739729
unsafe extern "C" fn sys_get_timer_stub(_out: *mut RawTimerState) {
740730
asm!("
@@ -875,7 +865,6 @@ pub fn sys_refresh_task_id(task_id: TaskId) -> TaskId {
875865
/// Core implementation of the REFRESH_TASK_ID syscall.
876866
///
877867
/// See the note on syscall stubs at the top of this module for rationale.
878-
#[inline(never)]
879868
#[naked]
880869
unsafe extern "C" fn sys_refresh_task_id_stub(_tid: u32) -> u32 {
881870
asm!("

0 commit comments

Comments
 (0)