mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 11:11:35 +01:00
userland: move getchar from cpp-cheat
This commit is contained in:
19
README.adoc
19
README.adoc
@@ -3785,6 +3785,25 @@ Simulated exit code not 0! Exit code is 1
|
||||
|
||||
which we parse in link:run[] and then exit with the correct result ourselves...
|
||||
|
||||
==== gem5 syscall emulation mode program stdin
|
||||
|
||||
gem5 shows its own stdout to terminal, and does not allow you to type stdin to programs.
|
||||
|
||||
Instead, you must pass stdin non-interactively with the through a file with the `--se.py --input` option, e.g.:
|
||||
|
||||
....
|
||||
printf a > f
|
||||
./run --emulator gem5 --userland userland/c/getchar.c --static -- --input f
|
||||
....
|
||||
|
||||
leads to gem5 output:
|
||||
|
||||
....
|
||||
enter a character: you entered: a
|
||||
....
|
||||
|
||||
Source: link:userland/c/getchar.c[]
|
||||
|
||||
==== User mode vs full system benchmark
|
||||
|
||||
Let's see if user mode runs considerably faster than full system or not.
|
||||
|
||||
Reference in New Issue
Block a user