27.2. C
Programs under userland/c/ are examples of ANSI C programming:
-
main
and environment-
userland/c/command_line_arguments.c: print one command line argument per line using
argc
andargv
.Good sanity check for user mode: QEMU user mode getting started
-
Standard library
-
assert.h
-
stdlib.h
-
exit
-
-
stdio.h
-
File IO
-
-
userland/c/cat.c: a quick and dirty
cat
implementation for interactive User mode simulation tests
-
-
userland/linux/open_o_tmpfile.c: https://stackoverflow.com/questions/4508998/what-is-an-anonymous-inode-in-linux/44388030#44388030
-
-
time.h
-
userland/c/timespec_get.c
timespec_get
is a C11 forclock_gettime
http://stackoverflow.com/questions/361363/how-to-measure-time-in-milliseconds-using-ansi-c/36095407#36095407
-
-
-
Fun