导航

2021年4月20日 #

container_of

摘要: container_of(ptr,type,member) 我现在用这个函数就没有计算过。 ptr为给出的一个指针。 type为一个结构体类型。 member是结构体的一个成员。 ptr的值是该成员的地址。 container_of的返回值是指向该结构体的指针。 没看懂吧,我自己都不想看第二遍。 s 阅读全文

posted @ 2021-04-20 14:38 toughcactus 阅读(84) 评论(0) 推荐(0) 编辑

window上VirtualBox扩容虚拟机

摘要: 1.到vobxmanage目录,如C:\Program Files\Oracle\VirtualBox 2.执行命令如:vboxmanage modifyhd "D:\VirtualBox VMs\ubuntu\vbox-disk1.vdi" --resize 20480 即扩容到20G 自己做好备 阅读全文

posted @ 2021-04-20 14:15 toughcactus 阅读(75) 评论(0) 推荐(0) 编辑

inotify

摘要: 现在的使用是用于程序和脚本的通信。 头文件 #include <sys/inotify.h> 初始化函数 int inotify_init1(int flags) 支持flag,可设置为IN_NONBLOCK,代码简化 返回为fd 监听使能,监听的文件必须存在 int inotify_add_wat 阅读全文

posted @ 2021-04-20 09:19 toughcactus 阅读(129) 评论(0) 推荐(0) 编辑