更新日期: 2022/06/01 来源: https://gitee.com/weharmony/kernel_liteos_a_note
stdlib.c 文件参考

浏览源代码.

函数

char * getenv (const char *name)
 
void srand (unsigned s)
 初始化随机数生成器 更多...
 
int rand (void)
 生成伪随机数 更多...
 
void _exit (int status)
 
void exit (int status)
 
void abort (void)
 中止线程执行 更多...
 

函数说明

◆ _exit()

void _exit ( int  status)

在文件 stdlib.c53 行定义.

54{
55 PRINT_ERR("%s NOT SUPPORT\n", __FUNCTION__);
56 errno = ENOSYS;
57 while (1);
58}

◆ abort()

void abort ( void  )

中止线程执行

在文件 stdlib.c67 行定义.

68{
69 LOS_Panic("System was being aborted\n");
70 while (1);
71}
NORETURN VOID LOS_Panic(const CHAR *fmt,...)
Kernel panic function.
函数调用图:

◆ exit()

void exit ( int  status)

在文件 stdlib.c60 行定义.

61{
62 PRINT_ERR("%s NOT SUPPORT\n", __FUNCTION__);
63 errno = ENOSYS;
64 while (1);
65}
这是这个函数的调用关系图:

◆ getenv()

char * getenv ( const char *  name)

在文件 stdlib.c38 行定义.

39{
40 return NULL;
41}

◆ rand()

int rand ( void  )

生成伪随机数

在文件 stdlib.c48 行定义.

49{
50 return random();
51}

◆ srand()

void srand ( unsigned  s)

初始化随机数生成器

在文件 stdlib.c43 行定义.

44{
45 return srandom(s);
46}
这是这个函数的调用关系图: