Tizen RT Libs&Environment  v1.1 D4

Provides APIs for Standard Library{. More...

Collaboration diagram for STDLIB:

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...
 

Detailed Description

Provides APIs for Standard Library

{.

Macro Definition Documentation

◆ atof

#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/)

Since
Tizen RT v1.0

Definition at line 384 of file stdlib.h.

◆ atoi

#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/)

Since
Tizen RT v1.0

Definition at line 358 of file stdlib.h.

◆ atol

#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/)

Since
Tizen RT v1.0

Definition at line 366 of file stdlib.h.

◆ atoll

#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/)

Since
Tizen RT v1.0

Definition at line 375 of file stdlib.h.

Function Documentation

◆ abort()

void abort ( void  )

generate an abnormal process abort

#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ abs()

int abs ( int  j)

return an integer absolute value

#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ access()

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/)

Since
Tizen RT v1.1

◆ atexit()

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/)

Since
Tizen RT v1.0

◆ bsearch()

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/)

Since
Tizen RT v1.1

◆ calloc()

FAR void* calloc ( size_t  ,
size_t   
)

a memory allocator

#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ clearenv()

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

Since
Tizen RT v1.0

◆ div()

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/)

Since
Tizen RT v1.1

◆ exit()

void exit ( int  status)

terminate a process

#include <stdlib.h>
SYSTEM CALL API
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ free()

void free ( FAR void *  )

free allocated memory

#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ get_environ_ptr()

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.

Parameters
[in]envsizeA pointer to notify a size of environ variable
Returns
A pointer to the current thread environ variable
Since
Tizen RT v1.0

◆ getenv()

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/)

Since
Tizen RT v1.0

◆ itoa()

char* itoa ( int  value,
char *  str,
int  base 
)

convert integer to string

#include <stdlib.h>

Parameters
[in]valueInteger value
[out]strString where store the result
[in]baseNumerical base
Returns
A pointer to the resulting null-terminated string, same as parameter str.
Since
Tizen RT v1.0

◆ labs()

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/)

Since
Tizen RT v1.0

◆ llabs()

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/)

Since
Tizen RT v1.0

◆ mallinfo()

struct mallinfo mallinfo ( void  )

returns a copy of updated current heap information for the user heap

#include <stdlib.h>

Returns
Current mallinfo structure returned.
Since
Tizen RT v1.0

◆ malloc()

FAR void* malloc ( size_t  )

a memory allocator

#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ memalign()

FAR void* memalign ( size_t  ,
size_t   
)

allocates size bytes and returns a pointer to the allocated memory

#include <stdlib.h>

Parameters
[in]alignmentA power of two
[in]sizeAllocated memory size
Returns
On success, A pointer to the allocated memory is returned. On failure, NULL is returned.
Since
Tizen RT v1.0

◆ on_exit()

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

Parameters
[in]funcA pointer to the function to be called when the task exits.
[in]argAn argument that will be provided to the on_exit() function when the task exits.
Returns
On success, 0 is returned. On failure, none-zero is returned.
Since
Tizen RT v1.0

◆ putenv()

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/)

Since
Tizen RT v1.0

◆ qsort()

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/)

Since
Tizen RT v1.0

◆ rand()

int rand ( void  )

pseudo-random number generator

#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ realloc()

FAR void* realloc ( FAR void *  ,
size_t   
)

memory reallocator

#include <stdlib.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ setenv()

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/)

Since
Tizen RT v1.0

◆ srand()

void srand ( unsigned int  seed)

initialize random number generator

#include <stdlib.h>

Parameters
[in]seedAn integer value to be used as seed
Returns
none
Since
Tizen RT v1.0

◆ strtod()

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/)

Since
Tizen RT v1.0

◆ strtol()

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/)

Since
Tizen RT v1.0

◆ strtoll()

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/)

Since
Tizen RT v1.0

◆ strtoul()

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/)

Since
Tizen RT v1.0

◆ strtoull()

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/)

Since
Tizen RT v1.0

◆ unsetenv()

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/)

Since
Tizen RT v1.0

◆ zalloc()

FAR void* zalloc ( size_t  )

Allocate and zero memory from the user heap.

#include <stdlib.h>

Parameters
[in]sizeSize (in bytes) of the memory region to be allocated.
Returns
On success, A pointer to the allocated memory is returned. On failure, NULL is returned.
Since
Tizen RT v1.0