BionicApi 学习笔记

本文介绍了Bionic C库中常用API的功能与用法,包括内存管理、文件输入输出操作、字符串处理、数学运算、日期时间处理等。特别关注了进程控制、信号处理、网络套接字、多线程及系统配置方面的API,为开发者提供了实用的编程参考。

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值