|
tape-kernel 1.0
a modular modern independent kernel
|

Go to the source code of this file.
Functions | |
| int | abs (int x) |
| int | strlen (const char *s) |
| int | strcmp (const char *a, const char *b) |
| void | strcpy (char *dest, const char *src) |
| void | strcat (char *dest, const char *src) |
| void | itoa (int num, char *str) |
| itoa converts an integer to a decimal string | |
| int | atoi (const char *str) |
| atoi converts a decimal string to an integer | |
| void | srand (uint32_t seed) |
| srand seeds the random number generator | |
| uint32_t | rand (void) |
| rand returns a pseudo-random 32 bit integer | |
| int | pargs (char *line, char *args[]) |
| pargs parses a command line into an argument array | |
Variables | |
| static uint32_t | rng_state = 123456789 |
| int atoi | ( | const char * | str | ) |
atoi converts a decimal string to an integer
atoi is a function that parses a string of digit characters and returns the corresponding integer value
| str,the | null-terminated decimal string to parse |
using atoi is done with
Definition at line 118 of file utils.c.
Referenced by __shell().
| void itoa | ( | int | num, |
| char * | str ) |
itoa converts an integer to a decimal string
itoa is a function that converts a signed integer into a null-terminated decimal string representation
| num,the | integer to convert |
| str,the | output buffer for the resulting string |
using itoa is done with
Definition at line 49 of file utils.c.
Referenced by __getcpu(), and __prtd().
| int pargs | ( | char * | line, |
| char * | args[] ) |
pargs parses a command line into an argument array
pargs is a function that splits a string into an argv-style array of null-terminated arguments, supporting quoted strings and skipping leading '/' characters
| line,the | input line to parse (modified in-place) |
| args,the | output array of string pointers |
using pargs is done with
Definition at line 189 of file utils.c.
References MAX_ARGS.
Referenced by __shell().
| uint32_t rand | ( | void | ) |
| void srand | ( | uint32_t | seed | ) |
srand seeds the random number generator
srand is a function that initializes the xor-shift rng state with a given seed value
| seed,the | initial seed value for the rng |
using srand is done with
Definition at line 144 of file utils.c.
References rng_state.
| void strcat | ( | char * | dest, |
| const char * | src ) |
Definition at line 26 of file utils.c.
Referenced by __getcpu().
| int strcmp | ( | const char * | a, |
| const char * | b ) |
Definition at line 15 of file utils.c.
Referenced by ___init(), __fsdelete(), __fsfind(), and __shell().
| void strcpy | ( | char * | dest, |
| const char * | src ) |
Definition at line 21 of file utils.c.
Referenced by __fsadd(), and __getcpu().