亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? jiq.c

?? linux設(shè)備驅(qū)動(第二版) 附帶源碼 經(jīng)典linux驅(qū)動圖書
?? C
字號:
/* * jiq.c -- the just-in-queue module * * Copyright (C) 2001 Alessandro Rubini and Jonathan Corbet * Copyright (C) 2001 O'Reilly & Associates * * The source code in this file can be freely used, adapted, * and redistributed in source or binary form, so long as an * acknowledgment appears in derived source files.  The citation * should list that the code comes from the book "Linux Device * Drivers" by Alessandro Rubini and Jonathan Corbet, published * by O'Reilly & Associates.   No warranty is attached; * we cannot take responsibility for errors or fitness for use. * * $Id: jiq.c,v 1.7 2004/09/26 07:02:43 gregkh Exp $ */ #include <linux/config.h>#include <linux/module.h>#include <linux/moduleparam.h>#include <linux/init.h>#include <linux/sched.h>#include <linux/kernel.h>#include <linux/fs.h>     /* everything... */#include <linux/proc_fs.h>#include <linux/errno.h>  /* error codes */#include <linux/workqueue.h>#include <linux/preempt.h>#include <linux/interrupt.h> /* tasklets */MODULE_LICENSE("Dual BSD/GPL");/* * The delay for the delayed workqueue timer file. */static long delay = 1;module_param(delay, long, 0);/* * This module is a silly one: it only embeds short code fragments * that show how enqueued tasks `feel' the environment */#define LIMIT	(PAGE_SIZE-128)	/* don't print any more after this size *//* * Print information about the current environment. This is called from * within the task queues. If the limit is reched, awake the reading * process. */static DECLARE_WAIT_QUEUE_HEAD (jiq_wait);static struct work_struct jiq_work;/* * Keep track of info we need between task queue runs. */static struct clientdata {	int len;	char *buf;	unsigned long jiffies;	long delay;} jiq_data;#define SCHEDULER_QUEUE ((task_queue *) 1)static void jiq_print_tasklet(unsigned long);static DECLARE_TASKLET(jiq_tasklet, jiq_print_tasklet, (unsigned long)&jiq_data);/* * Do the printing; return non-zero if the task should be rescheduled. */static int jiq_print(void *ptr){	struct clientdata *data = ptr;	int len = data->len;	char *buf = data->buf;	unsigned long j = jiffies;	if (len > LIMIT) { 		wake_up_interruptible(&jiq_wait);		return 0;	}	if (len == 0)		len = sprintf(buf,"    time  delta preempt   pid cpu command\n");	else		len =0;  	/* intr_count is only exported since 1.3.5, but 1.99.4 is needed anyways */	len += sprintf(buf+len, "%9li  %4li     %3i %5i %3i %s\n",			j, j - data->jiffies,			preempt_count(), current->pid, smp_processor_id(),			current->comm);	data->len += len;	data->buf += len;	data->jiffies = j;	return 1;}/* * Call jiq_print from a work queue */static void jiq_print_wq(void *ptr){	struct clientdata *data = (struct clientdata *) ptr;    	if (! jiq_print (ptr))		return;    	if (data->delay)		schedule_delayed_work(&jiq_work, data->delay);	else		schedule_work(&jiq_work);}static int jiq_read_wq(char *buf, char **start, off_t offset,                   int len, int *eof, void *data){	DEFINE_WAIT(wait);		jiq_data.len = 0;                /* nothing printed, yet */	jiq_data.buf = buf;              /* print in this place */	jiq_data.jiffies = jiffies;      /* initial time */	jiq_data.delay = 0;    	prepare_to_wait(&jiq_wait, &wait, TASK_INTERRUPTIBLE);	schedule_work(&jiq_work);	schedule();	finish_wait(&jiq_wait, &wait);	*eof = 1;	return jiq_data.len;}static int jiq_read_wq_delayed(char *buf, char **start, off_t offset,                   int len, int *eof, void *data){	DEFINE_WAIT(wait);		jiq_data.len = 0;                /* nothing printed, yet */	jiq_data.buf = buf;              /* print in this place */	jiq_data.jiffies = jiffies;      /* initial time */	jiq_data.delay = delay;    	prepare_to_wait(&jiq_wait, &wait, TASK_INTERRUPTIBLE);	schedule_delayed_work(&jiq_work, delay);	schedule();	finish_wait(&jiq_wait, &wait);	*eof = 1;	return jiq_data.len;}/* * Call jiq_print from a tasklet */static void jiq_print_tasklet(unsigned long ptr){	if (jiq_print ((void *) ptr))		tasklet_schedule (&jiq_tasklet);}static int jiq_read_tasklet(char *buf, char **start, off_t offset, int len,                int *eof, void *data){	jiq_data.len = 0;                /* nothing printed, yet */	jiq_data.buf = buf;              /* print in this place */	jiq_data.jiffies = jiffies;      /* initial time */	tasklet_schedule(&jiq_tasklet);	interruptible_sleep_on(&jiq_wait);    /* sleep till completion */	*eof = 1;	return jiq_data.len;}/* * This one, instead, tests out the timers. */static struct timer_list jiq_timer;static void jiq_timedout(unsigned long ptr){	jiq_print((void *)ptr);            /* print a line */	wake_up_interruptible(&jiq_wait);  /* awake the process */}static int jiq_read_run_timer(char *buf, char **start, off_t offset,                   int len, int *eof, void *data){	jiq_data.len = 0;           /* prepare the argument for jiq_print() */	jiq_data.buf = buf;	jiq_data.jiffies = jiffies;	init_timer(&jiq_timer);              /* init the timer structure */	jiq_timer.function = jiq_timedout;	jiq_timer.data = (unsigned long)&jiq_data;	jiq_timer.expires = jiffies + HZ; /* one second */	jiq_print(&jiq_data);   /* print and go to sleep */	add_timer(&jiq_timer);	interruptible_sleep_on(&jiq_wait);  /* RACE */	del_timer_sync(&jiq_timer);  /* in case a signal woke us up */    	*eof = 1;	return jiq_data.len;}/* * the init/clean material */static int jiq_init(void){	/* this line is in jiq_init() */	INIT_WORK(&jiq_work, jiq_print_wq, &jiq_data);	create_proc_read_entry("jiqwq", 0, NULL, jiq_read_wq, NULL);	create_proc_read_entry("jiqwqdelay", 0, NULL, jiq_read_wq_delayed, NULL);	create_proc_read_entry("jitimer", 0, NULL, jiq_read_run_timer, NULL);	create_proc_read_entry("jiqtasklet", 0, NULL, jiq_read_tasklet, NULL);	return 0; /* succeed */}static void jiq_cleanup(void){	remove_proc_entry("jiqwq", NULL);	remove_proc_entry("jiqwqdelay", NULL);	remove_proc_entry("jitimer", NULL);	remove_proc_entry("jiqtasklet", NULL);}module_init(jiq_init);module_exit(jiq_cleanup);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜影院在线观看欧美| 亚洲欧美国产毛片在线| 激情av综合网| 久久免费电影网| 成人a级免费电影| 亚洲另类色综合网站| 欧美日韩精品一区二区三区蜜桃| 偷拍一区二区三区四区| 欧美精品一区二区三区视频 | 91.xcao| 蜜桃av噜噜一区| 国产午夜精品理论片a级大结局| 国产成人激情av| 亚洲精品成人悠悠色影视| 欧美日韩一区二区三区在线看 | 欧美aaaaaa午夜精品| 久久综合九色综合97婷婷| 91色综合久久久久婷婷| 亚洲bt欧美bt精品| 欧美激情一区三区| 欧美日韩视频在线第一区| 国产精品一区二区视频| 亚洲综合在线视频| 精品人在线二区三区| 色偷偷成人一区二区三区91| 久久精品理论片| 亚洲女同一区二区| 精品动漫一区二区三区在线观看| 91在线精品一区二区| 日韩av网站在线观看| 亚洲国产精品精华液ab| 欧美精品在线视频| 成人午夜精品在线| 蜜臀久久99精品久久久画质超高清| 中文字幕一区二区视频| 日韩丝袜情趣美女图片| 一本色道久久综合亚洲91| 狠狠色狠狠色综合| 婷婷开心久久网| 国产精品每日更新在线播放网址| 日韩一区二区精品在线观看| 97精品超碰一区二区三区| 精品一区二区三区免费| 亚洲一区中文在线| 国产精品久久久久久久久免费桃花| 欧美精品aⅴ在线视频| 99九九99九九九视频精品| 精品在线观看视频| 婷婷成人综合网| 亚洲一区免费观看| 国产精品久久久久久久久快鸭| 精品国产不卡一区二区三区| 欧美麻豆精品久久久久久| aa级大片欧美| 成人精品视频一区| 国产成人高清视频| 国产主播一区二区三区| 日本视频一区二区三区| 亚洲地区一二三色| 一区二区三区高清| 亚洲欧美日韩人成在线播放| 国产日韩影视精品| 久久久电影一区二区三区| 精品少妇一区二区三区免费观看| 欧美日韩精品专区| 欧美日韩三级在线| 欧美视频一区二区三区四区| 91国偷自产一区二区三区观看| 99久久久国产精品免费蜜臀| 国产sm精品调教视频网站| 国产综合一区二区| 国产一区二区三区香蕉| 国产一区二区三区免费观看| 国内精品国产成人国产三级粉色| 久久精品国产一区二区| 久久99国产精品免费| 美腿丝袜亚洲三区| 久久66热re国产| 韩国成人精品a∨在线观看| 国产一区二区视频在线播放| 国产精品一二三四| 成人午夜视频在线| 91免费看视频| 欧美日韩视频不卡| 欧美一级高清片| 久久夜色精品国产噜噜av| 久久久精品一品道一区| 欧美激情综合在线| 亚洲精品欧美在线| 日韩经典一区二区| 国产专区综合网| www..com久久爱| 一本大道综合伊人精品热热| 欧美三级电影精品| 亚洲精品一线二线三线无人区| 国产人伦精品一区二区| 一区二区视频在线看| 亚洲成av人**亚洲成av**| 美国三级日本三级久久99| 国内精品国产成人| 91麻豆成人久久精品二区三区| 欧美性生活久久| 精品国产凹凸成av人网站| 亚洲欧洲国产日韩| 亚洲成年人网站在线观看| 国产一区中文字幕| 色8久久人人97超碰香蕉987| 69成人精品免费视频| 国产亚洲精品aa| 亚洲一本大道在线| 国精品**一区二区三区在线蜜桃| 99re这里都是精品| 欧美一卡二卡三卡| 国产精品久久午夜夜伦鲁鲁| 天天综合色天天综合色h| 国产乱码精品一品二品| 欧美做爰猛烈大尺度电影无法无天| 日韩西西人体444www| 国产精品久久午夜夜伦鲁鲁| 免费在线看一区| 色综合久久久久| 久久九九久久九九| 午夜欧美一区二区三区在线播放| 国产精品综合在线视频| 欧美色综合天天久久综合精品| 26uuuu精品一区二区| 亚洲一区二区欧美| 成人免费观看视频| 日韩欧美国产成人一区二区| 亚洲色图清纯唯美| 国产精品1区2区| 91精品国产综合久久精品麻豆| 国产精品美女久久久久高潮| 美女在线一区二区| 欧美三级中文字幕在线观看| 国产精品久久久久毛片软件| 九色综合国产一区二区三区| 欧美综合视频在线观看| 国产欧美一区二区在线| 久久99久久99小草精品免视看| 欧美日韩高清一区二区三区| 中文字幕一区二区三区四区不卡 | 欧美一区二区三区在线视频| 亚洲天堂成人在线观看| 国产美女在线精品| 日韩欧美色电影| 日韩国产欧美在线视频| 色哟哟日韩精品| 亚洲欧美中日韩| 成人一道本在线| 国产女人aaa级久久久级| 久久99精品久久久久婷婷| 欧美一级淫片007| 日韩精彩视频在线观看| 欧美美女网站色| 亚洲成人一区在线| 欧美日韩一区三区| 亚洲制服丝袜一区| 欧美三级电影在线观看| 亚洲一二三四区| 欧美视频在线一区二区三区| 亚洲自拍偷拍九九九| 在线视频一区二区三区| 一区二区欧美国产| 欧美在线小视频| 亚洲在线一区二区三区| 欧美三级电影网站| 天堂av在线一区| 欧美一区二区美女| 美国精品在线观看| 精品国产精品网麻豆系列| 国产在线不卡视频| 国产日韩欧美不卡| 波多野结衣在线一区| 亚洲欧美日韩国产综合在线| 91久久精品日日躁夜夜躁欧美| 一区二区理论电影在线观看| 欧美日本一区二区三区四区| 五月天激情综合| 欧美精品一区二区三区高清aⅴ| 另类小说图片综合网| 久久视频一区二区| 不卡区在线中文字幕| 亚洲精品第一国产综合野| 欧美亚洲动漫精品| 日本不卡中文字幕| 久久免费视频一区| 91麻豆免费视频| 天堂蜜桃91精品| 久久日韩粉嫩一区二区三区| 成年人网站91| 石原莉奈在线亚洲二区| 久久免费国产精品| 91九色最新地址| 精品亚洲免费视频| 国产精品美女久久久久久久久 | 亚洲毛片av在线| 91精品国产综合久久久久久| 国产寡妇亲子伦一区二区| 一区二区高清在线|