Skip to content

Commit

Permalink
userlib: remove inline(never) on naked fns
Browse files Browse the repository at this point in the history
These are always inline(never), and so adding it is considered
incorrect. See rust-lang/rust#79653 for more
details.
  • Loading branch information
steveklabnik committed Oct 27, 2021
1 parent cd4d845 commit 3c498a4
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions userlib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ struct SendArgs<'a> {
/// Core implementation of the SEND syscall.
///
/// See the note on syscall stubs at the top of this module for rationale.
#[inline(never)]
#[naked]
unsafe extern "C" fn sys_send_stub(_args: &mut SendArgs<'_>) -> RcLen {
asm!("
Expand Down Expand Up @@ -260,7 +259,6 @@ pub struct RecvMessage {
/// Core implementation of the RECV syscall.
///
/// See the note on syscall stubs at the top of this module for rationale.
#[inline(never)]
#[naked]
#[must_use]
unsafe extern "C" fn sys_recv_stub(
Expand Down Expand Up @@ -326,7 +324,6 @@ pub fn sys_reply(peer: TaskId, code: u32, message: &[u8]) {
/// Core implementation of the REPLY syscall.
///
/// See the note on syscall stubs at the top of this module for rationale.
#[inline(never)]
#[naked]
unsafe extern "C" fn sys_reply_stub(
_peer: u32,
Expand Down Expand Up @@ -390,7 +387,6 @@ pub fn sys_set_timer(deadline: Option<u64>, notifications: u32) {
/// Core implementation of the SET_TIMER syscall.
///
/// See the note on syscall stubs at the top of this module for rationale.
#[inline(never)]
#[naked]
unsafe extern "C" fn sys_set_timer_stub(
_set_timer: u32,
Expand Down Expand Up @@ -447,7 +443,6 @@ pub fn sys_borrow_read(
/// Core implementation of the BORROW_READ syscall.
///
/// See the note on syscall stubs at the top of this module for rationale.
#[inline(never)]
#[naked]
unsafe extern "C" fn sys_borrow_read_stub(_args: *mut BorrowReadArgs) -> RcLen {
asm!("
Expand Down Expand Up @@ -506,7 +501,6 @@ pub fn sys_borrow_write(
/// Core implementation of the BORROW_WRITE syscall.
///
/// See the note on syscall stubs at the top of this module for rationale.
#[inline(never)]
#[naked]
unsafe extern "C" fn sys_borrow_write_stub(
_args: *mut BorrowWriteArgs,
Expand Down Expand Up @@ -571,7 +565,6 @@ struct RawBorrowInfo {
/// Core implementation of the BORROW_INFO syscall.
///
/// See the note on syscall stubs at the top of this module for rationale.
#[inline(never)]
#[naked]
unsafe extern "C" fn sys_borrow_info_stub(
_lender: u32,
Expand Down Expand Up @@ -615,7 +608,6 @@ pub fn sys_irq_control(mask: u32, enable: bool) {
/// Core implementation of the IRQ_CONTROL syscall.
///
/// See the note on syscall stubs at the top of this module for rationale.
#[inline(never)]
#[naked]
unsafe extern "C" fn sys_irq_control_stub(_mask: u32, _enable: u32) {
asm!("
Expand Down Expand Up @@ -651,7 +643,6 @@ pub fn sys_panic(msg: &[u8]) -> ! {
/// Core implementation of the PANIC syscall.
///
/// See the note on syscall stubs at the top of this module for rationale.
#[inline(never)]
#[naked]
unsafe extern "C" fn sys_panic_stub(_msg: *const u8, _len: usize) -> ! {
asm!("
Expand Down Expand Up @@ -734,7 +725,6 @@ struct RawTimerState {
/// Core implementation of the GET_TIMER syscall.
///
/// See the note on syscall stubs at the top of this module for rationale.
#[inline(never)]
#[naked]
unsafe extern "C" fn sys_get_timer_stub(_out: *mut RawTimerState) {
asm!("
Expand Down Expand Up @@ -875,7 +865,6 @@ pub fn sys_refresh_task_id(task_id: TaskId) -> TaskId {
/// Core implementation of the REFRESH_TASK_ID syscall.
///
/// See the note on syscall stubs at the top of this module for rationale.
#[inline(never)]
#[naked]
unsafe extern "C" fn sys_refresh_task_id_stub(_tid: u32) -> u32 {
asm!("
Expand Down

0 comments on commit 3c498a4

Please sign in to comment.