diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2020-01-24 09:15:46 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2020-01-24 09:15:46 -0500 |
commit | a5892b35233748b2fcff1f726314c9a8df749f9c (patch) | |
tree | a666f7f73b8926b2518b578b9416209395908a6e /src/crt | |
parent | 998b3ac86e3b3f926d81e768f1200815e9e3d148 (diff) |
Reviewed stmos, made small format/doc fixes
Diffstat (limited to 'src/crt')
-rw-r--r-- | src/crt/crt0.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/crt/crt0.c b/src/crt/crt0.c index ccdb2eb..35c3fa9 100644 --- a/src/crt/crt0.c +++ b/src/crt/crt0.c @@ -25,12 +25,20 @@ extern int main(int, char **); static void stdio_init(void); +/** + * Entry point for userland programs. + * Sets up stdio, then enters the program's main() before exiting with main()'s + * return code. + */ void _start(void) { stdio_init(); exit(main(0, 0)); } +/** + * Initializes file handles for stdout, stdin, and stderr. + */ void stdio_init(void) { stderr = calloc(1, sizeof(FILE)); |