BionicApi 学习笔记

1、内存管理
malloc, realloc, free
new, delete
2、文件输入操作
fopen, fwrite, fputs, fputc, fprintf, fflush
fread, fgets, fgetc, fscanf, feof
fseek, ferror, fclose

3、字符串操作
4、数学
5、日期和时间
6、进程控制
执行shell命令:
system <stdlib.h>
与子进程交互:
popen,pclose <stdio.h>
#include <stdio.h>
FILE *stream;

stream = popen("ls", "r");
if (NULL == stream)
{
// unable to execute the command.
}else
{
char buffer[1024];
int status;
while(NULL != fgets(buffer, 1024, stream))
{
// read buffer
}
status = pclose(stream);

}
7、信号处理
8、网络套接字
9、多线程
10、用户和组
<unistd.h>
getuid, getgid, getlogin,
11、系统配置
<sys/system_properties.h>
__system_property_get, __system_property_find, __system_property_read

12、命名服务切换

参考:《Android C++高级编程》 6、Bionic API 入门

原文地址:https://www.cnblogs.com/fog2012/p/5853142.html