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

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

?? sched.c,v

?? linux-0.10 對(duì)于想了解linux內(nèi)核,而又不想花太多精力的人,最好就是這種低版本,而具有核心價(jià)值的程序
?? C,V
字號(hào):
head     1.2;branch   ;access   ;symbols  ;locks    ; strict;comment  @ * @;1.2date     91.12.01.09.21.22;  author tytso;  state Exp;branches ;next     1.1;1.1date     91.11.21.08.47.30;  author tytso;  state Exp;branches ;next     ;desc@@1.2log@Patches sent to linus@text@/* *  linux/kernel/sched.c * *  (C) 1991  Linus Torvalds *//* * 'sched.c' is the main kernel file. It contains scheduling primitives * (sleep_on, wakeup, schedule etc) as well as a number of simple system * call functions (type getpid(), which just extracts a field from * current-task */#include <linux/sched.h>#include <linux/kernel.h>#include <linux/sys.h>#include <linux/fdreg.h>#include <asm/system.h>#include <asm/io.h>#include <asm/segment.h>#include <signal.h>#define _S(nr) (1<<((nr)-1))#define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))void show_task(int nr,struct task_struct * p){	printk("%d: pid=%d, state=%d, ",nr,p->pid,p->state);	printk("eip=%04x:%08x\n\r",p->tss.cs&0xffff,p->tss.eip);}void show_stat(void){	int i;	for (i=0;i<NR_TASKS;i++)		if (task[i])			show_task(i,task[i]);}#define LATCH (1193180/HZ)extern void mem_use(void);extern int timer_interrupt(void);extern int system_call(void);union task_union {	struct task_struct task;	char stack[PAGE_SIZE];};static union task_union init_task = {INIT_TASK,};long volatile jiffies=0;long startup_time=0;struct task_struct *current = &(init_task.task);struct task_struct *last_task_used_math = NULL;struct task_struct * task[NR_TASKS] = {&(init_task.task), };long user_stack [ PAGE_SIZE>>2 ] ;struct {	long * a;	short b;	} stack_start = { & user_stack [PAGE_SIZE>>2] , 0x10 };/* *  'math_state_restore()' saves the current math information in the * old math state array, and gets the new ones from the current task */void math_state_restore(){	if (last_task_used_math == current)		return;	if (last_task_used_math) {		__asm__("fnsave %0"::"m" (last_task_used_math->tss.i387));	}	if (current->used_math) {		__asm__("frstor %0"::"m" (current->tss.i387));	} else {		__asm__("fninit"::);		current->used_math=1;	}	last_task_used_math=current;}/* *  'schedule()' is the scheduler function. This is GOOD CODE! There * probably won't be any reason to change this, as it should work well * in all circumstances (ie gives IO-bound processes good response etc). * The one thing you might take a look at is the signal-handler code here. * *   NOTE!!  Task 0 is the 'idle' task, which gets called when no other * tasks can run. It can not be killed, and it cannot sleep. The 'state' * information in task[0] is never used. */void schedule(void){	int i,next,c;	struct task_struct ** p;/* check alarm, wake up any interruptible tasks that have got a signal */	for(p = &LAST_TASK ; p > &FIRST_TASK ; --p)		if (*p) {			if ((*p)->alarm && (*p)->alarm < jiffies) {					(*p)->signal |= (1<<(SIGALRM-1));					(*p)->alarm = 0;				}			if (((*p)->signal & ~(_BLOCKABLE & (*p)->blocked)) &&			(*p)->state==TASK_INTERRUPTIBLE)				(*p)->state=TASK_RUNNING;		}/* this is the scheduler proper: */	while (1) {		c = -1;		next = 0;		i = NR_TASKS;		p = &task[NR_TASKS];		while (--i) {			if (!*--p)				continue;			if ((*p)->state == TASK_RUNNING && (*p)->counter > c)				c = (*p)->counter, next = i;		}		if (c) break;		for(p = &LAST_TASK ; p > &FIRST_TASK ; --p)			if (*p)				(*p)->counter = ((*p)->counter >> 1) +						(*p)->priority;	}	switch_to(next);}int sys_pause(void){	current->state = TASK_INTERRUPTIBLE;	schedule();	return 0;}void sleep_on(struct task_struct **p){	struct task_struct *tmp;	if (!p)		return;	if (current == &(init_task.task))		panic("task[0] trying to sleep");	tmp = *p;	*p = current;	current->state = TASK_UNINTERRUPTIBLE;	schedule();	if (tmp)		tmp->state=0;}void interruptible_sleep_on(struct task_struct **p){	struct task_struct *tmp;	if (!p)		return;	if (current == &(init_task.task))		panic("task[0] trying to sleep");	tmp=*p;	*p=current;repeat:	current->state = TASK_INTERRUPTIBLE;	schedule();	if (*p && *p != current) {		(**p).state=0;		goto repeat;	}	*p=NULL;	if (tmp)		tmp->state=0;}void wake_up(struct task_struct **p){	if (p && *p) {		(**p).state=0;		*p=NULL;	}}/* * OK, here are some floppy things that shouldn't be in the kernel * proper. They are here because the floppy needs a timer, and this * was the easiest way of doing it. */static struct task_struct * wait_motor[4] = {NULL,NULL,NULL,NULL};static int  mon_timer[4]={0,0,0,0};static int moff_timer[4]={0,0,0,0};unsigned char current_DOR = 0x0C;unsigned char selected = 0;struct task_struct * wait_on_floppy_select = NULL;void floppy_select(unsigned int nr){	if (nr>3)		printk("floppy_select: nr>3\n\r");	cli();	while (selected)		sleep_on(&wait_on_floppy_select);	current_DOR &= 0xFC;	current_DOR |= nr;	outb(current_DOR,FD_DOR);	sti();}void floppy_deselect(unsigned int nr){	if (nr != (current_DOR & 3))		printk("floppy_deselect: drive not selected\n\r");	selected = 0;	wake_up(&wait_on_floppy_select);}int ticks_to_floppy_on(unsigned int nr){	unsigned char mask = 1<<(nr+4);	if (nr>3)		panic("floppy_on: nr>3");	moff_timer[nr]=10000;		/* 100 s = very big :-) */	cli();				/* use floppy_off to turn it off */	if (!(mask & current_DOR)) {		current_DOR |= mask;		if (!selected) {			current_DOR &= 0xFC;			current_DOR |= nr;		}		outb(current_DOR,FD_DOR);		mon_timer[nr] = HZ;	}	sti();	return mon_timer[nr];}void floppy_on(unsigned int nr){	cli();	while (ticks_to_floppy_on(nr))		sleep_on(nr+wait_motor);	sti();}void floppy_off(unsigned int nr){	moff_timer[nr]=3*HZ;}void do_floppy_timer(void){	int i;	unsigned char mask = 0x10;	for (i=0 ; i<4 ; i++,mask <<= 1) {		if (!(mask & current_DOR))			continue;		if (mon_timer[i]) {			if (!--mon_timer[i])				wake_up(i+wait_motor);		} else if (!moff_timer[i]) {			current_DOR &= ~mask;			outb(current_DOR,FD_DOR);		} else			moff_timer[i]--;	}}#define TIME_REQUESTS 64static struct timer_list {	long jiffies;	void (*fn)();	struct timer_list * next;} timer_list[TIME_REQUESTS], * next_timer = NULL;void add_timer(long jiffies, void (*fn)(void)){	struct timer_list * p;	if (!fn)		return;	cli();	if (jiffies <= 0)		(fn)();	else {		for (p = timer_list ; p < timer_list + TIME_REQUESTS ; p++)			if (!p->fn)				break;		if (p >= timer_list + TIME_REQUESTS)			panic("No more time requests free");		p->fn = fn;		p->jiffies = jiffies;		p->next = next_timer;		next_timer = p;		while (p->next && p->next->jiffies < p->jiffies) {			p->jiffies -= p->next->jiffies;			fn = p->fn;			p->fn = p->next->fn;			p->next->fn = fn;			jiffies = p->jiffies;			p->jiffies = p->next->jiffies;			p->next->jiffies = jiffies;			p = p->next;		}	}	sti();}void do_timer(long cpl){	if (cpl)		current->utime++;	else		current->stime++;	if (next_timer) {		next_timer->jiffies--;		while (next_timer && next_timer->jiffies <= 0) {			void (*fn)(void);						fn = next_timer->fn;			next_timer->fn = NULL;			next_timer = next_timer->next;			(fn)();		}	}	if (current_DOR & 0xf0)		do_floppy_timer();	if ((--current->counter)>0) return;	current->counter=0;	if (!cpl) return;	schedule();}int sys_alarm(long seconds){	int old = current->alarm;	if (old)		old = (old - jiffies) / HZ;	current->alarm = (seconds>0)?(jiffies+HZ*seconds):0;	return (old);}int sys_getpid(void){	return current->pid;}int sys_getppid(void){	return current->father;}int sys_getuid(void){	return current->uid;}int sys_geteuid(void){	return current->euid;}int sys_getgid(void){	return current->gid;}int sys_getegid(void){	return current->egid;}int sys_nice(long increment){	if (current->priority-increment>0)		current->priority -= increment;	return 0;}void sched_init(void){	int i;	struct desc_struct * p;	if (sizeof(struct sigaction) != 16)		panic("Struct sigaction MUST be 16 bytes");	set_tss_desc(gdt+FIRST_TSS_ENTRY,&(init_task.task.tss));	set_ldt_desc(gdt+FIRST_LDT_ENTRY,&(init_task.task.ldt));	p = gdt+2+FIRST_TSS_ENTRY;	for(i=1;i<NR_TASKS;i++) {		task[i] = NULL;		p->a=p->b=0;		p++;		p->a=p->b=0;		p++;	}	ltr(0);	lldt(0);	outb_p(0x36,0x43);		/* binary, mode 3, LSB/MSB, ch 0 */	outb_p(LATCH & 0xff , 0x40);	/* LSB */	outb(LATCH >> 8 , 0x40);	/* MSB */	set_intr_gate(0x20,&timer_interrupt);	outb(inb_p(0x21)&~0x01,0x21);	set_system_gate(0x80,&system_call);}@1.1log@Initial revision@text@d344 4d349 1a349 1	return seconds;@

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品自产自拍| 久久99精品国产麻豆婷婷 | 91麻豆高清视频| 97成人超碰视| 一本色道综合亚洲| 成人网在线播放| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲欧美电影院| 精品国产一区二区三区不卡| 欧美在线高清视频| 色悠悠亚洲一区二区| 国产欧美精品一区二区色综合朱莉| 紧缚捆绑精品一区二区| 亚洲v精品v日韩v欧美v专区| 欧美国产综合一区二区| 91精品国产乱| 亚洲综合av网| 亚洲国产精品人人做人人爽| 91麻豆精品国产自产在线观看一区 | 亚洲女子a中天字幕| 欧美一区二区私人影院日本| 欧美性色黄大片手机版| 成熟亚洲日本毛茸茸凸凹| 国产精品资源网| 欧美日韩中文另类| 久久嫩草精品久久久精品| 最新欧美精品一区二区三区| 天堂一区二区在线| 99国产精品国产精品久久| 亚洲欧美激情插| 日本午夜精品一区二区三区电影| 国产美女精品在线| 欧美岛国在线观看| 久久99精品网久久| 欧美v日韩v国产v| 色综合久久99| 国产成人小视频| 久久久久久久久蜜桃| 午夜日韩在线电影| 欧美日韩一区高清| 亚洲三级小视频| 91精品国产综合久久精品图片| 国产不卡视频在线播放| 久久久久久97三级| 极品美女销魂一区二区三区| 欧美群妇大交群中文字幕| 极品销魂美女一区二区三区| 亚洲va欧美va人人爽| 亚洲精品美腿丝袜| 亚洲国产激情av| 制服视频三区第一页精品| 性做久久久久久| 欧美成人国产一区二区| 国产一区二区三区电影在线观看| 日韩一级大片在线| 99久久er热在这里只有精品66| 亚洲福利一二三区| 欧美男女性生活在线直播观看| 午夜精品影院在线观看| 欧美一级在线视频| 午夜视频在线观看一区二区 | 91成人国产精品| 午夜激情综合网| 久久久久久久久久久黄色| 91农村精品一区二区在线| 日韩和欧美的一区| 亚洲视频香蕉人妖| 精品国产91乱码一区二区三区| 韩国女主播成人在线观看| 一区二区成人在线| 国产欧美va欧美不卡在线| 中文字幕巨乱亚洲| 国产精品456| 奇米影视在线99精品| 麻豆国产欧美日韩综合精品二区| 精品系列免费在线观看| 成人少妇影院yyyy| 欧美在线不卡视频| 久久久国产一区二区三区四区小说| 国产视频一区在线观看| 1000精品久久久久久久久| 日本三级韩国三级欧美三级| 久久99国产精品久久99果冻传媒| 成人一区二区视频| 在线播放欧美女士性生活| 国产香蕉久久精品综合网| 国产偷国产偷亚洲高清人白洁| 久久久久九九视频| av在线综合网| 不卡的看片网站| 91九色最新地址| 欧美日韩国产精品成人| 欧美日韩国产系列| 日韩精品一区二区在线观看| 欧美mv日韩mv国产网站app| 久久久噜噜噜久久中文字幕色伊伊| 久久久不卡影院| 亚洲综合视频网| 激情av综合网| 欧美日韩一本到| 久久久综合精品| 香蕉久久夜色精品国产使用方法| 蜜臀国产一区二区三区在线播放| 狠狠色综合日日| 91麻豆免费观看| 精品1区2区在线观看| 亚洲色图色小说| 精品午夜一区二区三区在线观看| 成人国产精品免费观看| 日韩精品在线网站| 亚洲午夜国产一区99re久久| 久久国产精品露脸对白| 欧美日韩精品一区二区三区四区| 国产亚洲综合在线| 男男视频亚洲欧美| 欧美精品aⅴ在线视频| 亚洲婷婷综合久久一本伊一区| 免费xxxx性欧美18vr| 欧美性受xxxx| 一区二区三区日韩欧美| 国产精品一区免费在线观看| 5858s免费视频成人| 一区二区不卡在线视频 午夜欧美不卡在| 日韩精品欧美成人高清一区二区| 国产成人在线视频网址| www国产成人| 日本欧美在线看| 欧美精品一二三| 久久se这里有精品| 日韩女优毛片在线| 六月丁香综合在线视频| 日韩欧美国产精品一区| 精品一区中文字幕| 欧美精品一区二区在线观看| 九九视频精品免费| 久久久久久久久久看片| 成人ar影院免费观看视频| 国产精品日产欧美久久久久| 成人av网址在线| 亚洲午夜成aⅴ人片| 精品欧美一区二区在线观看| 国精产品一区一区三区mba桃花| 久久蜜桃av一区二区天堂| 99久久精品情趣| 美腿丝袜亚洲综合| 日韩一区在线免费观看| 555夜色666亚洲国产免| 国产精品香蕉一区二区三区| 亚洲免费观看在线视频| 欧美一区二区三区在| 成人的网站免费观看| 一区二区三区蜜桃| 精品日韩欧美一区二区| 91成人免费在线视频| 福利一区在线观看| 蜜桃视频一区二区| 一区二区三区欧美日韩| 2020国产精品自拍| 欧美日韩国产精品成人| 色综合天天在线| 国产高清久久久| 精品写真视频在线观看| 日韩精品1区2区3区| 亚洲视频综合在线| 久久精品在这里| 日韩欧美电影一区| 欧美丰满嫩嫩电影| 7777精品伊人久久久大香线蕉的 | 91精品国产乱码| 欧美巨大另类极品videosbest | 2023国产精华国产精品| 欧美一区二区三区色| 在线观看91精品国产入口| 99在线精品免费| 97精品国产97久久久久久久久久久久| 日韩va欧美va亚洲va久久| 亚洲大片免费看| 日韩精品福利网| 午夜私人影院久久久久| 麻豆精品久久精品色综合| 精品中文字幕一区二区| 激情综合一区二区三区| 国产一级精品在线| av电影天堂一区二区在线 | 亚洲精品午夜久久久| 亚洲黄色性网站| 日韩二区在线观看| 国产精品自拍网站| 色一情一乱一乱一91av| 欧美亚一区二区| 久久精品视频在线免费观看| 中文字幕一区视频| av一本久道久久综合久久鬼色| 成人免费视频caoporn| 欧美综合天天夜夜久久| 欧美男男青年gay1069videost| 日韩美女一区二区三区| 亚洲精品一二三| 黄网站免费久久| 日韩一级免费一区|