stdlib.h header reference
[C library module]
The source code of this header can be browsed online.
Members [link]
Types [link]
- typedef [...] div_t
- typedef [...] ldiv_t
- typedef int_fast8_t (qsort_compar_t)(const void *, const void *)
Functions [link]
- void abort(void )
- error_t atexit(void (*function)() )
- int_fast16_t ato_intl16(const char *nptr)
- int_fast32_t ato_intl32(const char *nptr)
- int_fast64_t ato_intl64(const char *nptr)
- float atof(const char *f)
- void * bsearch(const void *key, const void *base, size_t nel, size_t width, __compiler_sint_t (*compar)(const void *,const void *) )
- void * calloc(size_t nmemb, size_t size)
- div_t div(__compiler_sint_t number, __compiler_sint_t denom)
- void exit(uint_fast8_t status)
- void free(void *ptr)
- uint32_t gcd32(uint32_t a, uint32_t b)
- uint64_t gcd64(uint64_t a, uint64_t b)
- char * getenv(const char *key)
- ldiv_t ldiv(__compiler_slong_t number, __compiler_slong_t denom)
- void * malloc(size_t size)
- void qsort(void *base, size_t nel, size_t width, qsort_compar_t *compar)
- __compiler_sint_t rand(void )
- uint32_t rand_64(void )
- void rand_64_merge(const void *data, size_t size)
- uint32_t rand_64_r(uint64_t *s)
- uint32_t rand_64_range(uint32_t min, uint32_t max)
- uint32_t rand_64_range_r(uint64_t *s, uint32_t min, uint32_t max)
- __compiler_sint_t rand_r(__compiler_uint_t *seedp)
- __compiler_slong_t random(void )
- void * realloc(void *ptr, size_t size)
- void srand(__compiler_uint_t seed)
- void srandom(__compiler_uint_t seed)
- int_fast16_t strto_intl16(const char *nptr, char **endptr, int_fast8_t base)
- int_fast32_t strto_intl32(const char *nptr, char **endptr, int_fast8_t base)
- int_fast64_t strto_intl64(const char *nptr, char **endptr, int_fast8_t base)
- uint_fast16_t strto_uintl16(const char *nptr, char **endptr, int_fast8_t base)
- uint_fast32_t strto_uintl32(const char *nptr, char **endptr, int_fast8_t base)
- uint_fast64_t strto_uintl64(const char *nptr, char **endptr, int_fast8_t base)
- double strtod(const char *d, const char **ret)
- error_t system(const char *cmd)
- uint32_t __rand_r32(__compiler_uint_t *seedp)
Variable [link]
- __compiler_uint_t __rand_seed
Macros [link]
Members detail [link]
struct <anonymous> [link]
struct <anonymous> [link]
#define EXIT_FAILURE [link]
#define EXIT_SUCCESS [link]
#define RAND_MAX 0x7fffffff [link]
This macro is declared in stdlib.h source file, line 140.
This macro specifies the maximum value returned by the rand and random functions.
#define STDLIB_H_ [link]
#define _STRTOINT_(a, b) [link]
#define _STRTOINT__(a, b) [link]
#define __ABS(n) [link]
This macro is declared in stdlib.h source file, line 237.
Compute the absolute value of an integer. This generic macro adapts to the integer type width.
See also abs.
#define __MAX(a, b) [link]
#define __MIN(a, b) [link]
void abort(void ) [link]
#define abs(x) [link]
error_t atexit(void (*function)() ) [link]
int_fast16_t ato_intl16(const char *nptr) [link]
int_fast32_t ato_intl32(const char *nptr) [link]
int_fast64_t ato_intl64(const char *nptr) [link]
float atof(const char *f) [link]
#define atoi [link]
#define atol [link]
#define atoll [link]
void * bsearch(const void *key, const void *base, size_t nel, size_t width, __compiler_sint_t (*compar)(const void *,const void *) ) [link]
void * calloc(size_t nmemb, size_t size) [link]
This function is declared in stdlib.h source file, line 45.
This is available when CONFIG_MUTEK_MEMALLOC is defined.
typedef struct <anonymous> div_t [link]
void exit(uint_fast8_t status) [link]
void free(void *ptr) [link]
This function is declared in stdlib.h source file, line 55.
This is available when CONFIG_MUTEK_MEMALLOC is defined.
uint32_t gcd32(uint32_t a, uint32_t b) [link]
uint64_t gcd64(uint64_t a, uint64_t b) [link]
char * getenv(const char *key) [link]
#define labs(x) [link]
typedef struct <anonymous> ldiv_t [link]
#define llabs(x) [link]
void * malloc(size_t size) [link]
This function is declared in stdlib.h source file, line 50.
This is available when CONFIG_MUTEK_MEMALLOC is defined.
void qsort(void *base, size_t nel, size_t width, qsort_compar_t *compar) [link]
This function is declared in stdlib.h source file, line 127.
this function sorts the nel-element long array pointed by base containing elements of size width. Using compar as the comparaison function.
Parameter list:
- base: Base pointer of the array
- nel: Element count in the array
- width: sizeof(element)
- compar: comparaison fuction
typedef int_fast8_t (qsort_compar_t)(const void *, const void *) [link]
This typedef is declared in stdlib.h source file, line 115.
this typedef defines the function prototype used for comparaison in qsort.
__compiler_sint_t rand(void ) [link]
This function is declared in stdlib.h source file, line 152.
This function returns a value in the range [0, RAND_MAX].
uint32_t rand_64(void ) [link]
This function is declared in stdlib.h source file, line 189.
This function returns an unsigned 32 bits pseudo random value. The internal state is 64 bits wide and can not be assigned directly.
See also rand_64_merge and rand_64_r.
void rand_64_merge(const void *data, size_t size) [link]
This function is declared in stdlib.h source file, line 206.
This function contributes entropy to the internal state which is used by the rand_64 function. Note that this does not just assign a new value to the internal state which still depends on the previous state.
uint32_t rand_64_r(uint64_t *s) [link]
This function is declared in stdlib.h source file, line 197.
This function returns an unsigned 32 bits pseudo random value and update the user provided seed.
uint32_t rand_64_range(uint32_t min, uint32_t max) [link]
This function is declared in stdlib.h source file, line 193.
This function returns an unsigned 32 bits pseudo random value uniformly distributed over the specified range [min, max].
See also rand_64.
uint32_t rand_64_range_r(uint64_t *s, uint32_t min, uint32_t max) [link]
This function is declared in stdlib.h source file, line 200.
See also rand_64_r and rand_64_range.
__compiler_sint_t rand_r(__compiler_uint_t *seedp) [link]
This function is declared in stdlib.h source file, line 159.
This function returns a value in the range [0, RAND_MAX] and update the user provided seed.
__compiler_slong_t random(void ) [link]
void * realloc(void *ptr, size_t size) [link]
This function is declared in stdlib.h source file, line 60.
This is available when CONFIG_MUTEK_MEMALLOC_SMART is defined.
void srand(__compiler_uint_t seed) [link]
This function is declared in stdlib.h source file, line 169.
This function sets the seed used by the rand and random functions. Because the seed is used system-wide, different software componenents may update the seed, resulting in unexpected behavior.
void srandom(__compiler_uint_t seed) [link]
int_fast16_t strto_intl16(const char *nptr, char **endptr, int_fast8_t base) [link]
int_fast32_t strto_intl32(const char *nptr, char **endptr, int_fast8_t base) [link]
int_fast64_t strto_intl64(const char *nptr, char **endptr, int_fast8_t base) [link]
uint_fast16_t strto_uintl16(const char *nptr, char **endptr, int_fast8_t base) [link]
uint_fast32_t strto_uintl32(const char *nptr, char **endptr, int_fast8_t base) [link]
uint_fast64_t strto_uintl64(const char *nptr, char **endptr, int_fast8_t base) [link]
double strtod(const char *d, const char **ret) [link]
#define strtol [link]
#define strtoll [link]
#define strtoptr [link]
#define strtoul [link]
#define strtoull [link]
error_t system(const char *cmd) [link]
uint32_t __rand_r32(__compiler_uint_t *seedp) [link]
This function is declared in stdlib.h source file, line 148.
pseudo random generator backend for standard functions, relies on a 32 bits lfsr.
This function is for internal use only.