随笔分类 - 3.7.├─. linux c组件
收录linux下的各种组件
摘要:2022-02-21 11:27:11 星期一 linux如何让一个程序崩溃后自动重启 watchdog.sh #!/bin/bash while true do ps -ef | grep "程序名" | grep -v "grep" if [ "$?" -eq 1 ] then ./run.sh
阅读全文
摘要:代码原理基于内核kfifo的原理移植 rkfifo.c #include "rkfifo.h" #define is_power_of_2(x) ((x) != 0 && (((x) & ((x) - 1)) == 0)) static uint32_t CLZ_32(uint32_t n) { i
阅读全文
摘要:hashtable.h /** * License GPLv3+ * @file hashtable.h * @brief a simple hash table implementation * @author Ankur Shrivastava */ #ifndef _HASHTABLE_H #
阅读全文
摘要:c语言编写分级别打印的日志系统 log.h /** log.h **/ #ifndef __LOG_H__ #define __LOG_H__ #include "stdio.h" #include "string.h" #include "stdlib.h" #include "time.h" #
阅读全文
摘要:将内核list.h移植到用户空间 解决c语言用户态链表使用麻烦的问题 list.h /* * @file list.h * @author xxx * @date xxx * * port from linux kernel list.h: https://github.com/torvalds/l
阅读全文

浙公网安备 33010602011771号