摘要: 格式化输出 基本语法 print("{}".format(123)) format不用指明打印参数的类型,使用起来及其方便 格式化字符串中包含大括号{}: 使用大括号再包裹一层 对齐: input print("[{:<10s}]".format("1")) //> 左对齐 print("[{:>1 阅读全文
posted @ 2022-06-02 23:34 whilewell 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 概述 内核有一个include/linux/list.h头文件是一个经典简单的双向连表实现,在内核使用及其广泛。 list使用方式: 将list结构体list_head定义在私有结构体的任意位置 struct rapl_pmu { raw_spinlock_t lock; int n_active; 阅读全文
posted @ 2022-06-02 23:16 whilewell 阅读(194) 评论(0) 推荐(0) 编辑