Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion components/rust/core/src/api/libloading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl Library {
let h = self.handle;
forget(self);
let rc = libc::dlclose(h);
if rc == 1 {
if rc == 0 {
Ok(())
} else {
Err(DlError::Close(rc))
Expand Down
2 changes: 1 addition & 1 deletion components/rust/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub enum RTTError {
FileSetLengthErr,
FileSyncErr,

FuncUnDefine,
FuncUndefined,
}

pub type RTResult<T> = Result<T, RTTError>;
2 changes: 1 addition & 1 deletion components/rust/core/src/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn panic(info: &core::panic::PanicInfo) -> ! {
}

#[linkage = "weak"]
#[unsafe(no_mangle)]
#[no_mangle]
fn __rust_panic() -> ! {
/* Default weak panic handler: loops forever to halt execution. */
print!("Entered weak panic handler: system will halt.");
Expand Down
4 changes: 2 additions & 2 deletions components/rust/core/src/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl Thread {

pub fn new() -> ThreadBuilder {
ThreadBuilder {
th_name: "uname".into(),
th_name: "Unnamed".into(),
th_stack_size: 4096,
th_priority: 10,
th_ticks: 10,
Expand Down Expand Up @@ -151,4 +151,4 @@ impl ThreadBuilder {
func,
)
}
}
}
6 changes: 3 additions & 3 deletions components/rust/examples/modules/example_lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/* Bring rt-rust's println! macro into scope */
use rt_rust::println;
use core::ffi::{c_char, CStr};
#[unsafe(no_mangle)]
#[no_mangle]
pub extern "C" fn rust_mylib_println(s: *const c_char) {
if s.is_null() {
println!("");
Expand All @@ -24,7 +24,7 @@ pub extern "C" fn rust_mylib_println(s: *const c_char) {
}
}

#[unsafe(no_mangle)]
#[no_mangle]
pub extern "C" fn rust_mylib_add(a: usize, b: usize) -> usize {
a + b
}
}