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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jit.c

?? ldd源碼
?? C
字號:
/* * jit.c -- the just-in-time module * * Copyright (C) 2001,2003 Alessandro Rubini and Jonathan Corbet * Copyright (C) 2001,2003 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: jit.c,v 1.16 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/time.h>#include <linux/timer.h>#include <linux/kernel.h>#include <linux/proc_fs.h>#include <linux/types.h>#include <linux/spinlock.h>#include <linux/interrupt.h>#include <asm/hardirq.h>/* * This module is a silly one: it only embeds short code fragments * that show how time delays can be handled in the kernel. */int delay = HZ; /* the default delay, expressed in jiffies */module_param(delay, int, 0);MODULE_AUTHOR("Alessandro Rubini");MODULE_LICENSE("Dual BSD/GPL");/* use these as data pointers, to implement four files in one function */enum jit_files {	JIT_BUSY,	JIT_SCHED,	JIT_QUEUE,	JIT_SCHEDTO};/* * This function prints one line of data, after sleeping one second. * It can sleep in different ways, according to the data pointer */int jit_fn(char *buf, char **start, off_t offset,	      int len, int *eof, void *data){	unsigned long j0, j1; /* jiffies */	wait_queue_head_t wait;	init_waitqueue_head (&wait);	j0 = jiffies;	j1 = j0 + delay;	switch((long)data) {		case JIT_BUSY:			while (time_before(jiffies, j1))				cpu_relax();			break;		case JIT_SCHED:			while (time_before(jiffies, j1)) {				schedule();			}			break;		case JIT_QUEUE:			wait_event_interruptible_timeout(wait, 0, delay);			break;		case JIT_SCHEDTO:			set_current_state(TASK_INTERRUPTIBLE);			schedule_timeout (delay);			break;	}	j1 = jiffies; /* actual value after we delayed */	len = sprintf(buf, "%9li %9li\n", j0, j1);	*start = buf;	return len;}/* * This file, on the other hand, returns the current time forever */int jit_currentime(char *buf, char **start, off_t offset,                   int len, int *eof, void *data){	struct timeval tv1;	struct timespec tv2;	unsigned long j1;	u64 j2;	/* get them four */	j1 = jiffies;	j2 = get_jiffies_64();	do_gettimeofday(&tv1);	tv2 = current_kernel_time();	/* print */	len=0;	len += sprintf(buf,"0x%08lx 0x%016Lx %10i.%06i\n"		       "%40i.%09i\n",		       j1, j2,		       (int) tv1.tv_sec, (int) tv1.tv_usec,		       (int) tv2.tv_sec, (int) tv2.tv_nsec);	*start = buf;	return len;}/* * The timer example follows */int tdelay = 10;module_param(tdelay, int, 0);/* This data structure used as "data" for the timer and tasklet functions */struct jit_data {	struct timer_list timer;	struct tasklet_struct tlet;	int hi; /* tasklet or tasklet_hi */	wait_queue_head_t wait;	unsigned long prevjiffies;	unsigned char *buf;	int loops;};#define JIT_ASYNC_LOOPS 5void jit_timer_fn(unsigned long arg){	struct jit_data *data = (struct jit_data *)arg;	unsigned long j = jiffies;	data->buf += sprintf(data->buf, "%9li  %3li     %i    %6i   %i   %s\n",			     j, j - data->prevjiffies, in_interrupt() ? 1 : 0,			     current->pid, smp_processor_id(), current->comm);	if (--data->loops) {		data->timer.expires += tdelay;		data->prevjiffies = j;		add_timer(&data->timer);	} else {		wake_up_interruptible(&data->wait);	}}/* the /proc function: allocate everything to allow concurrency */int jit_timer(char *buf, char **start, off_t offset,	      int len, int *eof, void *unused_data){	struct jit_data *data;	char *buf2 = buf;	unsigned long j = jiffies;	data = kmalloc(sizeof(*data), GFP_KERNEL);	if (!data)		return -ENOMEM;	init_timer(&data->timer);	init_waitqueue_head (&data->wait);	/* write the first lines in the buffer */	buf2 += sprintf(buf2, "   time   delta  inirq    pid   cpu command\n");	buf2 += sprintf(buf2, "%9li  %3li     %i    %6i   %i   %s\n",			j, 0L, in_interrupt() ? 1 : 0,			current->pid, smp_processor_id(), current->comm);	/* fill the data for our timer function */	data->prevjiffies = j;	data->buf = buf2;	data->loops = JIT_ASYNC_LOOPS;		/* register the timer */	data->timer.data = (unsigned long)data;	data->timer.function = jit_timer_fn;	data->timer.expires = j + tdelay; /* parameter */	add_timer(&data->timer);	/* wait for the buffer to fill */	wait_event_interruptible(data->wait, !data->loops);	if (signal_pending(current))		return -ERESTARTSYS;	buf2 = data->buf;	kfree(data);	*eof = 1;	return buf2 - buf;}void jit_tasklet_fn(unsigned long arg){	struct jit_data *data = (struct jit_data *)arg;	unsigned long j = jiffies;	data->buf += sprintf(data->buf, "%9li  %3li     %i    %6i   %i   %s\n",			     j, j - data->prevjiffies, in_interrupt() ? 1 : 0,			     current->pid, smp_processor_id(), current->comm);	if (--data->loops) {		data->prevjiffies = j;		if (data->hi)			tasklet_hi_schedule(&data->tlet);		else			tasklet_schedule(&data->tlet);	} else {		wake_up_interruptible(&data->wait);	}}/* the /proc function: allocate everything to allow concurrency */int jit_tasklet(char *buf, char **start, off_t offset,	      int len, int *eof, void *arg){	struct jit_data *data;	char *buf2 = buf;	unsigned long j = jiffies;	long hi = (long)arg;	data = kmalloc(sizeof(*data), GFP_KERNEL);	if (!data)		return -ENOMEM;	init_waitqueue_head (&data->wait);	/* write the first lines in the buffer */	buf2 += sprintf(buf2, "   time   delta  inirq    pid   cpu command\n");	buf2 += sprintf(buf2, "%9li  %3li     %i    %6i   %i   %s\n",			j, 0L, in_interrupt() ? 1 : 0,			current->pid, smp_processor_id(), current->comm);	/* fill the data for our tasklet function */	data->prevjiffies = j;	data->buf = buf2;	data->loops = JIT_ASYNC_LOOPS;		/* register the tasklet */	tasklet_init(&data->tlet, jit_tasklet_fn, (unsigned long)data);	data->hi = hi;	if (hi)		tasklet_hi_schedule(&data->tlet);	else		tasklet_schedule(&data->tlet);	/* wait for the buffer to fill */	wait_event_interruptible(data->wait, !data->loops);	if (signal_pending(current))		return -ERESTARTSYS;	buf2 = data->buf;	kfree(data);	*eof = 1;	return buf2 - buf;}int __init jit_init(void){	create_proc_read_entry("currentime", 0, NULL, jit_currentime, NULL);	create_proc_read_entry("jitbusy", 0, NULL, jit_fn, (void *)JIT_BUSY);	create_proc_read_entry("jitsched",0, NULL, jit_fn, (void *)JIT_SCHED);	create_proc_read_entry("jitqueue",0, NULL, jit_fn, (void *)JIT_QUEUE);	create_proc_read_entry("jitschedto", 0, NULL, jit_fn, (void *)JIT_SCHEDTO);	create_proc_read_entry("jitimer", 0, NULL, jit_timer, NULL);	create_proc_read_entry("jitasklet", 0, NULL, jit_tasklet, NULL);	create_proc_read_entry("jitasklethi", 0, NULL, jit_tasklet, (void *)1);	return 0; /* success */}void __exit jit_cleanup(void){	remove_proc_entry("currentime", NULL);	remove_proc_entry("jitbusy", NULL);	remove_proc_entry("jitsched", NULL);	remove_proc_entry("jitqueue", NULL);	remove_proc_entry("jitschedto", NULL);	remove_proc_entry("jitimer", NULL);	remove_proc_entry("jitasklet", NULL);	remove_proc_entry("jitasklethi", NULL);}module_init(jit_init);module_exit(jit_cleanup);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区播放| 亚洲成a人v欧美综合天堂下载| 久久99国内精品| 国产精品美女视频| 欧美亚洲国产一卡| 国产成人av一区二区三区在线| 亚洲欧美自拍偷拍色图| 欧美大片在线观看| 99视频在线精品| 日本不卡不码高清免费观看| 亚洲精品国产无套在线观| 精品国产乱码久久久久久久| 色综合视频在线观看| 国产又黄又大久久| 丝袜美腿亚洲综合| 亚洲国产va精品久久久不卡综合| 日韩美女在线视频| 中文在线资源观看网站视频免费不卡| 国产精品久久久久久户外露出| 狠狠色综合日日| 国产欧美一区二区精品性色超碰 | 亚洲第一激情av| 国产精品一区二区久久精品爱涩| 欧美日韩亚洲综合在线| 青青青爽久久午夜综合久久午夜| 国产一区二区在线电影| 色综合天天综合| 久久久综合精品| 一区二区三区不卡视频在线观看 | 91在线无精精品入口| 国产99久久久国产精品免费看| 在线观看免费一区| 欧美中文字幕不卡| 丁香亚洲综合激情啪啪综合| 麻豆国产欧美一区二区三区| 亚洲一区二区三区在线看| 国产精品每日更新| 亚洲国产精品成人综合色在线婷婷| 欧美日韩国产一级二级| 欧美羞羞免费网站| 欧美一区二区三区视频在线 | 在线亚洲免费视频| 欧美三级日韩三级国产三级| 一本色道久久综合狠狠躁的推荐| 99久久精品国产精品久久| 91蜜桃免费观看视频| 91碰在线视频| 日韩一区二区三区在线观看| 日韩你懂的在线播放| 国产女人aaa级久久久级 | 综合分类小说区另类春色亚洲小说欧美 | 国产suv精品一区二区三区| 国产一区二区三区日韩| 99精品视频中文字幕| 欧美一级片在线观看| 欧美激情中文不卡| 亚洲在线视频一区| 天堂成人免费av电影一区| 777奇米四色成人影色区| 久久青草欧美一区二区三区| 日本麻豆一区二区三区视频| 欧美挠脚心视频网站| 日韩电影在线观看一区| 欧美三级欧美一级| 亚洲同性同志一二三专区| 国产精品911| 国产精品久久久久一区| av资源网一区| 国产精品久久二区二区| 99久久99久久精品国产片果冻| 最新日韩在线视频| 欧美日韩一级二级| 亚洲123区在线观看| 在线综合视频播放| 日本中文一区二区三区| 91精品国产综合久久精品麻豆| 亚洲一区二区三区精品在线| 99精品视频免费在线观看| 一区二区欧美视频| 国产亚洲精品福利| 欧美日韩免费在线视频| 理论电影国产精品| 亚洲女女做受ⅹxx高潮| xnxx国产精品| 欧美人伦禁忌dvd放荡欲情| 韩国视频一区二区| 亚洲风情在线资源站| 国产欧美一区二区在线| 欧美性受xxxx黑人xyx性爽| 国产麻豆欧美日韩一区| 曰韩精品一区二区| 国产精品国产精品国产专区不片| 欧美三级电影在线观看| 日韩中文字幕av电影| 成人免费一区二区三区在线观看| 日韩一级大片在线| 欧美性xxxxx极品少妇| 成人成人成人在线视频| 激情综合色播激情啊| 免费一级欧美片在线观看| 一二三四社区欧美黄| 亚洲小少妇裸体bbw| 亚洲欧美另类在线| 亚洲不卡av一区二区三区| 一区二区三区四区精品在线视频| 亚洲视频一区在线观看| 国产精品91xxx| 国产亚洲va综合人人澡精品| 久久久国际精品| 亚洲无人区一区| 国产成人精品一区二| 欧美色图一区二区三区| 欧美经典一区二区| 日韩精品亚洲专区| 欧美色精品在线视频| 中文字幕五月欧美| 国产精品自在欧美一区| 制服丝袜日韩国产| 亚洲综合免费观看高清在线观看| 国产精品夜夜爽| 精品视频资源站| 国产精品视频一二三区| 亚洲一区二区不卡免费| 成人在线一区二区三区| 欧美日韩一区二区三区四区| 2021久久国产精品不只是精品| 一区二区在线观看不卡| 精品在线播放免费| 欧美日韩dvd在线观看| 国产精品久久毛片a| 国产一区二区三区不卡在线观看| 欧美色手机在线观看| 国产精品国产自产拍高清av| 亚洲一区二区三区激情| 91麻豆6部合集magnet| 中文字幕国产一区| 国产剧情av麻豆香蕉精品| 欧美一区二区三区在线观看视频 | 久久久99久久精品欧美| 国产精品乡下勾搭老头1| 日韩精品在线看片z| 日本最新不卡在线| 日韩欧美国产综合一区| 蜜臀av一区二区在线观看| 3d动漫精品啪啪1区2区免费| 日韩成人精品在线| 欧美性视频一区二区三区| 亚洲综合色在线| 制服丝袜亚洲精品中文字幕| 美女脱光内衣内裤视频久久网站| 日韩一区二区三区四区| 福利视频网站一区二区三区| 国产拍欧美日韩视频二区| 成人毛片老司机大片| 洋洋成人永久网站入口| 欧美一卡二卡在线观看| 成人性生交大片免费看视频在线 | 国产成人日日夜夜| 一区二区三区视频在线看| 5858s免费视频成人| 波多野结衣视频一区| 亚洲第一在线综合网站| 国产欧美久久久精品影院| 欧美日韩一区二区三区视频| 麻豆91在线播放| 石原莉奈在线亚洲二区| 欧美mv日韩mv亚洲| 91视频在线观看免费| 国产精品亚洲午夜一区二区三区| 国产午夜亚洲精品不卡| 欧美三级日韩三级国产三级| 国产成人av电影在线播放| 亚洲高清免费观看| 国产偷国产偷精品高清尤物 | 99久久久免费精品国产一区二区| 亚洲精品成人精品456| 欧美精品一区二区三区高清aⅴ| 91女神在线视频| 国产一区二区视频在线| 麻豆精品在线观看| 午夜精品久久久久久久久久| 欧美xxxx老人做受| 精品国产一区二区三区四区四| 欧美在线观看一区二区| 国产成人午夜99999| 美美哒免费高清在线观看视频一区二区 | 亚洲精品成人悠悠色影视| 国产片一区二区| 久久久不卡网国产精品二区| 久久综合九色综合久久久精品综合 | 国产一区二区三区综合| 蜜臀久久99精品久久久久宅男| 亚洲一区二区偷拍精品| 丝袜美腿成人在线| 精品综合免费视频观看| 日韩在线播放一区二区| 国产中文字幕一区| 99久久精品国产观看| 成人深夜在线观看| 欧美日韩高清一区|