唯客微技术杂谈
Linux驱动开发杂记(0x1B) - 内核链表数据结构的实现 Linux驱动开发杂记(0x1B) - 内核链表数据结构的实现
Linux驱动开发杂记(0x1B) - 内核链表数据结构的实现 1. Linux内核双链表 链表的基础知识在这里就不在赘述了。Linux 内核提供了一种双链表的实现方式,实际上,通常它都组织成双循环链表。 链表数据结构的定义很简单
Linux驱动开发杂记(0x1A) - 内核中的原子操作 Linux驱动开发杂记(0x1A) - 内核中的原子操作
Linux驱动开发杂记(0x1A) - 内核中的原子操作 具体的接口API函数整理如下: 接口函数 描述 atomic_inc 原子变量的值加一 atomic_inc_ret
Linux驱动开发杂记(0x19) - 内核中的引用计数器kref Linux驱动开发杂记(0x19) - 内核中的引用计数器kref
Linux驱动开发杂记(0x19) - 内核中的引用计数器kref kref是一个引用计数器,它被嵌套进其它的结构中,记录所嵌套结构的引用计数,并在计数清零时调用相应的清理函数。kref的头文件在include/linux/kref.h
Linux驱动开发杂记(0x18) - 内核tty接口各版本的变化(二)之tty_driver.h Linux驱动开发杂记(0x18) - 内核tty接口各版本的变化(二)之tty_driver.h
Linux驱动开发杂记(0x18) - 内核tty接口各版本的变化(二)之tty_driver.h 2.6.17 - 2.6.18 删除 struct tty_driver { const char *devfs
Linux驱动开发杂记(0x17) - 内核tty接口各版本的变化(一)之tty_flip.h Linux驱动开发杂记(0x17) - 内核tty接口各版本的变化(一)之tty_flip.h
Linux驱动开发杂记(0x17) - 内核tty接口各版本的变化(一)之tty_flip.h 2.6.15 - 2.6.16 添加 extern int tty_buffer_request_room(struct tty_stru
Linux驱动开发杂记(0x16) - 内核定时器接口各版本的变化 Linux驱动开发杂记(0x16) - 内核定时器接口各版本的变化
2.6.13 - 2.6.14 添加 #define DEFINE_TIMER(_name, _function, _expires, _data) ## 2.6.14 - 2.6.15 添加 static inline void set
Linux驱动开发杂记(0x15) - tasklet Linux驱动开发杂记(0x15) - tasklet
  为了提高系统的响应能力和并发能力,Linux将中断处理分了上半部和下半部。当一个中断产生,调用该中断对应的处理程序(上半部),然后告诉系统,对应的后半部可以执行了,中断处理程序立即返回,下半部会在合适的时机由操作系统调用。这样一来就大大
Linux驱动开发杂记(0x14) - 环形缓冲区circ_buf Linux驱动开发杂记(0x14) - 环形缓冲区circ_buf
/* * 在内核<linux/circ_buf.h>中定义了关于环形缓冲区的相关变量。 * 其中缓冲区的大小size必须定义成2的n次方,这样可以将取余运算转换成位与运算, * 提高计算机的处理速度。例如:x % size =
Linux驱动开发杂记(0x13) - 串口UART驱动API Linux驱动开发杂记(0x13) - 串口UART驱动API
串口驱动API ## 1、uart_register_driver /* 功能: uart_register_driver用于将串口驱动uart_driver注册到内核(串口核心层)中,通常在模块初始化函数调用该函数。 * 参数
Linux驱动开发杂记(0x12) - uart_ops结构体 Linux驱动开发杂记(0x12) - uart_ops结构体
/* * This structure describes all the operations that can be * done on the physical hardware. */ struct uart_ops &
Linux驱动开发杂记(0x11) - uart_port结构体 Linux驱动开发杂记(0x11) - uart_port结构体
struct uart_port { spinlock_t lock; /* 串口端口锁 */ unsigned int iobase;
Linux驱动开发杂记(0x10) - uart_driver结构体 Linux驱动开发杂记(0x10) - uart_driver结构体
struct uart_driver { struct module *owner; /* 拥有该uart_driver的模块,一般为THIS_MODULE */ const char
1 / 3