上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 69 下一页

2023年12月16日

Linux 进程状态

摘要: 进程状态 top里面S列表示进程状态。 R 正在运行或者等待运行(Running或Runnable),进程在CPU的就绪队列中。 D 硬件交互导致的不可中断睡眠状态(Uninterruptible Sleep),进程正在与硬件交互。 Z 僵尸进程(Zombie),虽然进程已经结束,但是父进程没有回收 阅读全文

posted @ 2023-12-16 11:00 王景迁 阅读(75) 评论(0) 推荐(0)

2023年12月14日

C语言 避免重复定义宏

摘要: #ifndef _A_ #define _A_ 1 #endif 阅读全文

posted @ 2023-12-14 13:15 王景迁 阅读(57) 评论(0) 推荐(0)

2023年12月13日

C语言 init和exit

摘要: #include <stdio.h> #define __init __attribute__((constructor)) #define __exit __attribute__((destructor)) // 文件加载时初始化 void __init my_init(void) { prin 阅读全文

posted @ 2023-12-13 08:58 王景迁 阅读(34) 评论(0) 推荐(0)

2023年12月12日

C语言 实现双向链表

摘要: #include <stdio.h> #define LIST_HEAD_INIT(name) { &(name), &(name) } #define list_for_each_entry(obj, head, list) for (obj = (typeof(*obj) *)((char *) 阅读全文

posted @ 2023-12-12 22:13 王景迁 阅读(30) 评论(0) 推荐(0)

dpip增加ip

摘要: dpip addr add 10.11.12.13/24 dev dpdk0 src/inetaddr.cifa_entry_add函数 判断dpdk0上是否已经存在该ip param->addr是10.11.12.13 dpdk0上不存在该ip后,大页内存上分配 添加路由到链表 添加地址到链表 0 阅读全文

posted @ 2023-12-12 09:07 王景迁 阅读(35) 评论(0) 推荐(0)

2023年12月11日

C语言 使用bool

摘要: 方法一:引入stdbool.h #include <stdio.h> #include <stdbool.h> int main() { bool f = false; if (!f) { printf("f is false\n"); } return 0; } 输出结果是f is false 相 阅读全文

posted @ 2023-12-11 22:02 王景迁 阅读(123) 评论(0) 推荐(0)

验证controller处理事件时不因对象变化而变化

摘要: crd_controller走到断点后更新或者删除fruit,从Lister里面取到的对象内容保持不变。 阅读全文

posted @ 2023-12-11 09:05 王景迁 阅读(20) 评论(0) 推荐(0)

实现k8s自定义controller

摘要: controller通过cluster ip:443 + https(非grpc)访问kube-apiserver。kube-apiserver通过127.0.0.1:2379 + grpc访问etcd。无论是kube-scheduler,还是kube-controller-manager,都是通过 阅读全文

posted @ 2023-12-11 08:50 王景迁 阅读(163) 评论(0) 推荐(0)

2023年12月9日

C语言 命令行接收参数

摘要: #include <stdio.h> int main(int argc, char* argv[]) { int i; while (argc-- > 0) { printf("%s\n", *argv++); } return 0; } 阅读全文

posted @ 2023-12-09 15:20 王景迁 阅读(35) 评论(0) 推荐(0)

2023年11月29日

C语言 主机字节序和网络字节序互换

摘要: #include <stdio.h> #include <arpa/inet.h> int main() { // 10.11.12.13 uint32_t host_ip = 168496141; uint32_t network_ip = htonl(168496141); // 13.12.1 阅读全文

posted @ 2023-11-29 21:18 王景迁 阅读(47) 评论(0) 推荐(0)

上一页 1 ··· 40 41 42 43 44 45 46 47 48 ··· 69 下一页

导航