Skip to content

Commit 2cc4925

Browse files
tylerwhalltomtom5152
authored andcommitted
zephyr: add basic string/mem functions
1 parent ef7c089 commit 2cc4925

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/zephyr/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,15 @@ cfg_if! {
5454
}
5555
}
5656
}
57+
58+
extern {
59+
pub fn strlen(cs: *const c_char) -> size_t;
60+
61+
pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void;
62+
pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int;
63+
pub fn memcpy(dest: *mut c_void, src: *const c_void,
64+
n: size_t) -> *mut c_void;
65+
pub fn memmove(dest: *mut c_void, src: *const c_void,
66+
n: size_t) -> *mut c_void;
67+
pub fn memset(dest: *mut c_void, c: c_int, n: size_t) -> *mut c_void;
68+
}

0 commit comments

Comments
 (0)