Tizen RT Libs&Environment
v1.1 D4
|
Provides APIs for Standard Library{. More...
![]() |
Macros | |
#define | atoi(nptr) strtol((nptr), NULL, 10) |
convert a string to an integer More... | |
#define | atol(nptr) strtol((nptr), NULL, 10) |
convert a string to a long integer More... | |
#define | atoll(nptr) strtoll((nptr), NULL, 10) |
convert a string to a long integer More... | |
#define | atof(nptr) strtod((nptr), NULL) |
convert a string to a double-precision number More... | |
Functions | |
void | srand (unsigned int seed) |
initialize random number generator More... | |
int | rand (void) |
pseudo-random number generator More... | |
FAR char * | get_environ_ptr (size_t *envsize) |
Return a pointer to the thread specific environ variable. More... | |
FAR char * | getenv (FAR const char *name) |
get value of an environment variable More... | |
int | putenv (FAR const char *string) |
change or add a value to an environment More... | |
int | clearenv (void) |
clears the environment of all name-value pairs and sets the value of the external variable environ to NULL More... | |
int | setenv (const char *name, const char *value, int overwrite) |
add or change environment variable More... | |
int | unsetenv (const char *name) |
remove an environment variable More... | |
void | exit (int status) noreturn_function |
terminate a process More... | |
void | abort (void) noreturn_function |
generate an abnormal process abort More... | |
int | atexit (CODE void(*func)(void)) |
register a function to run at process termination More... | |
int | on_exit (CODE void(*func)(int, FAR void *), FAR void *arg) |
register a function to be called at program exit More... | |
long | strtol (const char *, char **, int) |
convert a string to a long integer More... | |
unsigned long | strtoul (const char *, char **, int) |
convert a string to an unsigned long More... | |
long long | strtoll (const char *, char **, int) |
convert a string to a long integer More... | |
unsigned long long | strtoull (const char *, char **, int) |
convert a string to an unsigned long More... | |
double_t | strtod (const char *, char **) |
convert a string to a double-precision number More... | |
char * | itoa (int value, char *str, int base) |
convert integer to string More... | |
FAR void * | malloc (size_t) |
a memory allocator More... | |
void | free (FAR void *) |
free allocated memory More... | |
FAR void * | realloc (FAR void *, size_t) |
memory reallocator More... | |
FAR void * | memalign (size_t, size_t) |
allocates size bytes and returns a pointer to the allocated memory More... | |
FAR void * | zalloc (size_t) |
Allocate and zero memory from the user heap. More... | |
FAR void * | calloc (size_t, size_t) |
a memory allocator More... | |
int | abs (int j) |
return an integer absolute value More... | |
long int | labs (long int j) |
return a long integer absolute value More... | |
long long int | llabs (long long int j) |
return a long integer absolute value More... | |
div_t | div (int numer, int denom) |
compute the quotient and remainder of an integer division More... | |
void | qsort (void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)) |
sort a table of data More... | |
FAR void * | bsearch (FAR const void *key, FAR const void *base, size_t nel, size_t width, CODE int(*compar)(FAR const void *, FAR const void *)) |
binary search a sorted table More... | |
struct mallinfo | mallinfo (void) |
returns a copy of updated current heap information for the user heap More... | |
int | access (FAR const char *path, int amode) |
determine accessibility of a file descriptor More... | |
Provides APIs for Standard Library
{.
#define atof | ( | nptr | ) | strtod((nptr), NULL) |
convert a string to a double-precision number
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
#define atoi | ( | nptr | ) | strtol((nptr), NULL, 10) |
convert a string to an integer
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
#define atol | ( | nptr | ) | strtol((nptr), NULL, 10) |
convert a string to a long integer
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
#define atoll | ( | nptr | ) | strtoll((nptr), NULL, 10) |
convert a string to a long integer
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
void abort | ( | void | ) |
generate an abnormal process abort
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int abs | ( | int | j | ) |
return an integer absolute value
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int access | ( | FAR const char * | path, |
int | amode | ||
) |
determine accessibility of a file descriptor
#include <unistd.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int atexit | ( | CODE void(*)(void) | func | ) |
register a function to run at process termination
#include <stdlib.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR void* bsearch | ( | FAR const void * | key, |
FAR const void * | base, | ||
size_t | nel, | ||
size_t | width, | ||
CODE int(*)(FAR const void *, FAR const void *) | compar | ||
) |
binary search a sorted table
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR void* calloc | ( | size_t | , |
size_t | |||
) |
a memory allocator
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int clearenv | ( | void | ) |
clears the environment of all name-value pairs and sets the value of the external variable environ to NULL
#include <stdlib.h>
SYSTEM CALL API
div_t div | ( | int | numer, |
int | denom | ||
) |
compute the quotient and remainder of an integer division
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
void exit | ( | int | status | ) |
terminate a process
#include <stdlib.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
void free | ( | FAR void * | ) |
free allocated memory
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR char* get_environ_ptr | ( | size_t * | envsize | ) |
Return a pointer to the thread specific environ variable.
#include <stdlib.h>
This API is not a standard API. But another APIs which are related to ENV are in Stdlib, so this API is in Stdlib for ease.
[in] | envsize | A pointer to notify a size of environ variable |
FAR char* getenv | ( | FAR const char * | name | ) |
get value of an environment variable
#include <stdlib.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
char* itoa | ( | int | value, |
char * | str, | ||
int | base | ||
) |
convert integer to string
#include <stdlib.h>
[in] | value | Integer value |
[out] | str | String where store the result |
[in] | base | Numerical base |
long int labs | ( | long int | j | ) |
return a long integer absolute value
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
long long int llabs | ( | long long int | j | ) |
return a long integer absolute value
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
returns a copy of updated current heap information for the user heap
#include <stdlib.h>
FAR void* malloc | ( | size_t | ) |
a memory allocator
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR void* memalign | ( | size_t | , |
size_t | |||
) |
allocates size bytes and returns a pointer to the allocated memory
#include <stdlib.h>
[in] | alignment | A power of two |
[in] | size | Allocated memory size |
int on_exit | ( | CODE void(*)(int, FAR void *) | func, |
FAR void * | arg | ||
) |
register a function to be called at program exit
#include <stdlib.h>
SYSTEM CALL API
[in] | func | A pointer to the function to be called when the task exits. |
[in] | arg | An argument that will be provided to the on_exit() function when the task exits. |
int putenv | ( | FAR const char * | string | ) |
change or add a value to an environment
#include <stdlib.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
void qsort | ( | void * | base, |
size_t | nmemb, | ||
size_t | size, | ||
int(*)(const void *, const void *) | compar | ||
) |
sort a table of data
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int rand | ( | void | ) |
pseudo-random number generator
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR void* realloc | ( | FAR void * | , |
size_t | |||
) |
memory reallocator
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int setenv | ( | const char * | name, |
const char * | value, | ||
int | overwrite | ||
) |
add or change environment variable
#include <stdlib.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
void srand | ( | unsigned int | seed | ) |
initialize random number generator
#include <stdlib.h>
[in] | seed | An integer value to be used as seed |
double_t strtod | ( | const char * | , |
char ** | |||
) |
convert a string to a double-precision number
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
long strtol | ( | const char * | , |
char ** | , | ||
int | |||
) |
convert a string to a long integer
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
long long strtoll | ( | const char * | , |
char ** | , | ||
int | |||
) |
convert a string to a long integer
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
unsigned long strtoul | ( | const char * | , |
char ** | , | ||
int | |||
) |
convert a string to an unsigned long
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
unsigned long long strtoull | ( | const char * | , |
char ** | , | ||
int | |||
) |
convert a string to an unsigned long
#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int unsetenv | ( | const char * | name | ) |
remove an environment variable
#include <stdlib.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
FAR void* zalloc | ( | size_t | ) |
Allocate and zero memory from the user heap.
#include <stdlib.h>
[in] | size | Size (in bytes) of the memory region to be allocated. |