- 博客(8)
- 资源 (4)
- 收藏
- 关注
原创 linux socket poll io处理-udp
文章目录udp_poll读io事件唤醒linux socket中定义了多种io事件,io事件发生时会调用它们处理函数。struct sock { //sock wait queue and async head struct socket_wq __rcu *sk_wq; // socket等待事件队列,用于io事件异步通知 atomic_t sk_wmem_alloc; void (*sk_state_change)(struct sock *sk);//callback
2020-10-18 22:58:13 796 1
原创 linux select io处理
先看一下select机制select需要驱动程序的支持,驱动程序实现fops内的poll函数。select通过每个设备文件对应的poll函数提供的信息判断当前是否有资源可用(如可读或写),如果有的话则返回可用资源的文件描述符个数,没有的话则睡眠,等待有资源变为可用时再被唤醒继续执行。select系统调用int select(int maxfdp, fd_set *readset, fd_set *writeset, fd_set *exceptset,struct timeval *timeout);
2020-10-18 21:13:10 243
原创 linux socket-recvfrom系统调用
recvfrom库函数应用程序调用recv或recvfrom库函数接收数据。recv和recvfrom主要区别是是否设置socket地址。__socketcall ssize_t recvfrom(int, void*, size_t, int, const struct sockaddr*, socklen_t*);ssize_t recv(int, void*, size_t, int);ssize_t recv(int socket, void *buf, size_t len, int f
2020-10-11 21:39:23 2406
原创 linux kernel/ubuntu等资源国内镜像
清华:https://mirror.tuna.tsinghua.edu.cn/kernel/v5.x/https://mirror.tuna.tsinghua.edu.cn/网易:http://mirrors.163.com/ubuntu-releaseshttp://mirrors.163.com/阿里:https://developer.aliyun.com/mirror/https://mirrors.aliyun.com/linux-kernel/?spm=a2c6h.1365110
2020-10-08 16:38:44 1810
原创 Ubuntu20.04 添加右键新建文件
1,在主文件夹–模板目录下创建一个文件,如下指令ubuntu@ubuntu:~/Templates$ sudo gedit2,创建了文件后,直接点击保存即可3,这时在其他目录下点击右键就可以看到新建文档
2020-10-08 12:55:42 8072 4
原创 Ubuntu20.04 linux core dump设置
root@ubuntu:/proc/sys/kernel# echo /usr/share/apport/core-%p-%e > core_patternroot@ubuntu:echo 1 > core_uses_pidroot用户下运行su转为root改core文件大小root@ubuntu:/home/ubuntu/study# ulimit -c 1024测试程序root@ubuntu:/home/ubuntu/study# ./core_dump...
2020-10-08 01:01:43 2398
原创 linux内核网络框架
SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol){ int retval; struct socket *sock; int flags; /* Check the SOCK_* constants for consistency. */ BUILD_BUG_ON(SOCK_CLOEXEC != O_CLOEXEC); BUILD_BUG_ON((SOCK_MAX | SOCK_TYPE_MASK) != SOCK
2020-10-07 22:27:16 765
原创 gitee加速下载github项目
1,登录gitee2,找到如下+位置,选择从github导入仓库3,把github中git地址复制到gitee。
2020-10-07 11:29:56 1159
android-arm平台ndk交叉编译python
2020-09-30
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人