Skip to content

Commit acfa4cc

Browse files
committed
remove: cbindgen
1 parent 26a7b99 commit acfa4cc

File tree

3 files changed

+1
-39
lines changed

3 files changed

+1
-39
lines changed

Diff for: kernel/build.rs

-28
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,6 @@ fn main() {
1515
println!("cargo:rerun-if-changed=src");
1616
println!("cargo:rerun-if-changed=build.rs");
1717

18-
let crate_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
19-
20-
let mut config: cbindgen::Config = Default::default();
21-
22-
config.no_includes = true;
23-
config.includes = vec![
24-
"stdint.h".to_string(),
25-
"stdbool.h".to_string(),
26-
"stdarg.h".to_string(),
27-
];
28-
config.layout = LayoutConfig {
29-
packed: Some("__attribute__((packed))".to_string()),
30-
..Default::default()
31-
};
32-
33-
let bindings = cbindgen::Builder::new()
34-
.with_crate(crate_dir)
35-
.with_config(config)
36-
.with_language(cbindgen::Language::C)
37-
.with_include_guard("KERNEL_H")
38-
.generate();
39-
40-
match bindings {
41-
Ok(bindings) => bindings.write_to_file("include/kernel/lib.h"),
42-
Err(cbindgen::Error::ParseSyntaxError { .. }) => return, // ignore in favor of cargo's syntax check
43-
Err(err) => panic!("{:?}", err),
44-
};
45-
4618
generate_syscall_map("src").expect("Failed to generate syscall map.");
4719
}
4820

Diff for: kernel/include/kernel/lib.h

-10
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,4 @@ typedef struct BootInfo {
5959
*/
6060
void kernel_init(const struct BootInfo *boot_info);
6161

62-
void syscall_dummy(const void *svc_args);
63-
64-
/**
65-
* Syscall handler: reschedule.
66-
* This syscall is used to request a reschedule.
67-
*
68-
* No arguments are passed to this syscall.
69-
*/
70-
void syscall_reschedule(const void *_svc_args);
71-
7262
#endif /* KERNEL_H */

0 commit comments

Comments
 (0)