linux-kernel-programming

所属分类:驱动编程
开发工具:C
文件大小:0KB
下载次数:0
上传日期:2024-03-08 08:08:37
上 传 者sh-1993
说明:  linux内核编程
(linux kernel programming)

文件列表:
Makefile
mp1.c
mp1_given.h
userapp.c
userapp.h

# mp1-sarahjie mp1-sarahjie created by GitHub Classroom
**Brief Implementation Explanation**

proc_read: copy the information to the user buffer, update the offset, return bytes read. Return negative if failed

proc_write: take information from user buffer, update the offset, return bytes written. Return negative if failed

linux kernel linked list: for each process add the node to the tail of the linked list. Each node contains the pid and time information.

timer: set up timer and time interval upon module initialization; the timer reset itself inside the workqueue scheduler. The timer is deleted upon module exit

workqueue: upon module initialization, create a single thread work queue, which will be executed by a single worker. schedule the function into the workqueue, and name it as mp1_proc. Upon module exit, flush all unfinished work, and then destroy the work queue


近期下载者

相关文件


收藏者