Compare commits

..

No commits in common. "c8e3356a1d50b83176505e7e834017f66b90d33d" and "5a3fa8f6af4d92cbed50dd103add8d990809f070" have entirely different histories.

2 changed files with 0 additions and 23 deletions

View file

@ -6,9 +6,6 @@ struct stat;
/** /**
* System calls * System calls
*
* Note that none of these calls are implemented in C. They are implemented in assembly in [usys.S](./usys.S). This file
* is in turn generated by the [usys.py](./usys.py) script during the build.
*/ */
/** Create a child process */ /** Create a child process */

View file

@ -42,26 +42,6 @@ assembly = "\n\n".join(map(genstub, syscalls))
# TODO: Perhaps do some more specific assertions on the code here # TODO: Perhaps do some more specific assertions on the code here
assert len(assembly) > 0, "No assembly code generated. Something is fishy" assert len(assembly) > 0, "No assembly code generated. Something is fishy"
with open("kernel/syscall.h", "r") as sfile:
lines = list(filter(lambda x: x.startswith("#define"), sfile.readlines()))
header_calls = set([line.split()[1] for line in lines])
calls = set(["SYS_" + call for call in syscalls])
if header_calls == calls:
print("#All items match in both sets.")
else:
missing_in_calls = header_calls - calls
missing_in_header_calls = calls - header_calls
if missing_in_calls:
print("#These items are in header_calls but not in calls:", missing_in_calls)
if missing_in_header_calls:
print(
"#These items are in calls but not in header_calls:",
missing_in_header_calls,
)
print("# generated by usys.py - do not edit\n") print("# generated by usys.py - do not edit\n")
print('#include "kernel/syscall.h"\n') print('#include "kernel/syscall.h"\n')
print(assembly) print(assembly)