-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/bin/sh | ||
cmake -P geninittbl.cmake && \ | ||
../_warp/bin/warp-cc -c -g -I ../include -I ../include/uapi -I ../arch/lkl/include -I ../arch/lkl/include/generated -I ../arch/lkl/include/generated/uapi -o initschedclasses.o initschedclasses.c && \ | ||
../_warp/bin/warp-cc -g -nostdlib -Wl,--no-entry -Wl,--export=init -Wl,--error-limit=0 \ | ||
-Wl,--Map=lin.map -o lin.wasm -I ../arch/lkl/include ../lib/lib.a ../vmlinux.a hostwasm_main.c hostwasm_lklops.c initsyms.gen.c && wasm2c -o lin.c lin.wasm | ||
-Wl,--Map=lin.map -o lin.wasm -I ../arch/lkl/include ../lib/lib.a ../vmlinux.a initschedclasses.o hostwasm_main.c hostwasm_lklops.c initsyms.gen.c && wasm2c -o lin.c lin.wasm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//FIMXE: Try to follow ABI.. | ||
//#include "../kernel/sched/sched.h" | ||
|
||
#include <stddef.h> | ||
void *memcpy(void *dest, const void *src, size_t n); | ||
|
||
/* FIXME: Pray the frontend emits struct in this order... */ | ||
|
||
struct sched_class { | ||
char __dummy_method[64]; | ||
}; | ||
|
||
struct sched_class dl_sched_class; | ||
struct sched_class rt_sched_class; | ||
struct sched_class fair_sched_class; | ||
struct sched_class idle_sched_class; | ||
struct sched_class __dummy_sched_class; | ||
|
||
extern struct sched_class dl_sched_class_temp; | ||
extern struct sched_class rt_sched_class_temp; | ||
extern struct sched_class fair_sched_class_temp; | ||
extern struct sched_class idle_sched_class_temp; | ||
|
||
void | ||
host_lkl_initschedclasses(void){ | ||
struct sched_class temp; | ||
memcpy(&dl_sched_class, &dl_sched_class_temp, sizeof(struct sched_class)); | ||
memcpy(&rt_sched_class, &rt_sched_class_temp, sizeof(struct sched_class)); | ||
memcpy(&fair_sched_class, &fair_sched_class_temp, sizeof(struct sched_class)); | ||
memcpy(&idle_sched_class, &idle_sched_class_temp, sizeof(struct sched_class)); | ||
memcpy(&__dummy_sched_class, &idle_sched_class_temp, sizeof(struct sched_class)); | ||
} | ||
|
||
extern struct sched_class __attribute__((alias ("dl_sched_class"))) __sched_class_highest; | ||
extern struct sched_class __attribute__((alias ("__dummy_sched_class"))) __sched_class_lowest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters