摘要: 以fork()为例 int main() { fork(); } fork()是一个对系统调用fork的封装,可用下列宏来定义 _syscall0(pit_t, fork); _syscall0是一个宏函数,i386版本定义如下: #define _syscall0(type, name) \ ty 阅读全文
posted @ 2021-11-20 23:42 平安1111 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 最“小”的Hello world C程序 阅读全文
posted @ 2021-11-15 00:01 平安1111 阅读(110) 评论(1) 推荐(0) 编辑
摘要: c/c++ 调用python程序实例(QT) 阅读全文
posted @ 2021-10-07 23:37 平安1111 阅读(189) 评论(0) 推荐(0) 编辑
摘要: QT 快捷键 阅读全文
posted @ 2021-10-01 11:53 平安1111 阅读(267) 评论(0) 推荐(0) 编辑
摘要: gdb调试遇到 “Address already in use” 处理: netstat -napt 查看对应的端口号的pid,然后 kill -9 pid #include <stdio.h>#include <sys/types.h>#include <stdlib.h>#include <un 阅读全文
posted @ 2021-08-15 12:32 平安1111 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 1、调试带参数的程序: list 打印代码 b linenumber 设置断点 gdb xxx(程序名) (gdb) set args a b c(gdb) run或者(gdb) run a bc也可以的 n 执行下一步, s 执行下一步进入函数,c continue; p 变量, 查看变量值 多个 阅读全文
posted @ 2021-08-15 12:30 平安1111 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 彩色shell提示符: ubuntu: vim ~/.bashrc将#force_color_prompt=yes改为force_color_prompt=yes Linux登录过程中加载配置文件顺序: /etc/profile → /etc/profile.d/*.sh → ~/.bash_pro 阅读全文
posted @ 2021-08-03 00:29 平安1111 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 修改步骤:a)Edit /usr/share/initramfs-tools/scripts/functionsChange necessary lines (marked with blue) Exact commands:sudo vim /usr/share/initramfs-tools/s 阅读全文
posted @ 2021-08-03 00:28 平安1111 阅读(442) 评论(0) 推荐(0) 编辑
摘要: https://walkccc.me/CLRS/Chap02/2.2/ https://www.bilibili.com/video/BV135411h7wJ?p=13 红黑树原理 新增,删除,打印: https://www.cnblogs.com/hongdada/p/12165636.html 阅读全文
posted @ 2021-08-03 00:27 平安1111 阅读(251) 评论(0) 推荐(0) 编辑
摘要: linux kernel(内核)代码理解 几个记录(属性、内联汇编、__builtin()、 likely()等) 阅读全文
posted @ 2021-07-19 01:57 平安1111 阅读(173) 评论(0) 推荐(0) 编辑