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

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

?? user.c~

?? The main purpose of this project is to add a new scheduling algorithm to GeekOS and to implement a s
?? C~
字號:
/* * Common user mode functions * Copyright (c) 2001,2003,2004 David H. Hovemeyer <daveho@cs.umd.edu> * $Revision: 1.50 $ *  * This is free software.  You are permitted to use, * redistribute, and modify it as specified in the file "COPYING". */#include <geekos/errno.h>#include <geekos/ktypes.h>#include <geekos/kassert.h>#include <geekos/int.h>#include <geekos/mem.h>#include <geekos/malloc.h>#include <geekos/kthread.h>#include <geekos/vfs.h>#include <geekos/tss.h>#include <geekos/user.h>/* * This module contains common functions for implementation of user * mode processes. *//* * Associate the given user context with a kernel thread. * This makes the thread a user process. */void Attach_User_Context(struct Kernel_Thread* kthread, struct User_Context* context){    KASSERT(context != 0);    kthread->userContext = context;    Disable_Interrupts();    /*     * We don't actually allow multiple threads     * to share a user context (yet)     */    KASSERT(context->refCount == 0);    ++context->refCount;    Enable_Interrupts();}/* * If the given thread has a user context, detach it * and destroy it.  This is called when a thread is * being destroyed. */void Detach_User_Context(struct Kernel_Thread* kthread){    struct User_Context* old = kthread->userContext;    kthread->userContext = 0;    if (old != 0) {	int refCount;	Disable_Interrupts();        --old->refCount;	refCount = old->refCount;	Enable_Interrupts();	/*Print("User context refcount == %d\n", refCount);*/        if (refCount == 0)            Destroy_User_Context(old);    }}/* * Spawn a user process. * Params: *   program - the full path of the program executable file *   command - the command, including name of program and arguments *   pThread - reference to Kernel_Thread pointer where a pointer to *     the newly created user mode thread (process) should be *     stored * Returns: *   The process id (pid) of the new process, or an error code *   if the process couldn't be created.  Note that this function *   should return ENOTFOUND if the reason for failure is that *   the executable file doesn't exist. */////////////////////////////////int Spawn(const char *program, const char *command, struct Kernel_Thread **pThread){ 	int result;	char *exeFileData = 0;	ulong_t exeFileLength;	struct User_Context *UserContext = 0;	struct Exe_Format exeFormat;	struct Kernel_Thread * thread;	Print("there is here\n");		if ((result = Read_Fully(program,(void **) &exeFileData, &exeFileLength)) != 0)	{		Print("Failed to read file %s\n", program);		goto fail;	}		if ((result = Parse_ELF_Executable(exeFileData, exeFileLength, &exeFormat)) != 0)	{		Print("Failed to parse ELF file \n");		goto fail;	}	if ((result = Load_User_Program(exeFileData, exeFileLength, &exeFormat, command, &UserContext)) != 0)	{		Print("Failed to Load User Program\n");		goto fail;	}	Free(exeFileData);	exeFileData = 0;	thread = Start_User_Thread(UserContext, false);	if (thread != 0)	{		*pThread = thread;		result = thread->pid;	}	else 	{		result = ENOMEM;	}	return result;fail:	if (exeFileData != 0)	{		Print("free(exeFileData)\n");		Free(exeFileData);	}	if (UserContext != 0)	{		Print("Destroy_User_Context(UserContext);\n");		Destroy_User_Context(UserContext);	}	return result;}/* * If the given thread has a User_Context, * switch to its memory space. * * Params: *   kthread - the thread that is about to execute *   state - saved processor registers describing the state when *      the thread was interrupted */void Switch_To_User_Context(struct Kernel_Thread* kthread, struct Interrupt_State* state){    /*     * Hint: Before executing in user mode, you will need to call     * the Set_Kernel_Stack_Pointer() and Switch_To_Address_Space()     * functions.     */	struct User_Context * UserContext = kthread->userContext;	if (UserContext == 0)	{		return ;	}	Switch_To_Address_Space(UserContext);	Set_Kernel_Stack_Pointer((ulong_t)(kthread->stackPage + PAGE_SIZE));	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91丝袜在线播放0| 国产精品小仙女| 国产欧美日韩另类一区| 91久久久免费一区二区| 另类小说视频一区二区| 中文字幕一区二区三区乱码在线 | 91免费在线看| 天天色图综合网| 中文成人综合网| 欧美三级欧美一级| 国内精品不卡在线| 一二三四社区欧美黄| 精品福利av导航| 91美女片黄在线| 老司机免费视频一区二区三区| 国产精品视频你懂的| 欧美人牲a欧美精品| 国产精品69毛片高清亚洲| 亚洲成人一区二区| 国产精品视频第一区| 日韩午夜在线观看视频| 91在线观看地址| 国产美女精品一区二区三区| 亚洲mv在线观看| 国产精品午夜久久| 欧美tickle裸体挠脚心vk| 欧洲av在线精品| 国产大陆精品国产| 奇米精品一区二区三区四区| 亚洲六月丁香色婷婷综合久久 | 91麻豆精品国产| 不卡av在线免费观看| 免费成人深夜小野草| 亚洲国产精品久久不卡毛片| 欧美国产日韩精品免费观看| 日韩欧美国产电影| 欧美网站一区二区| 91丝袜呻吟高潮美腿白嫩在线观看| 国内一区二区在线| 日韩成人一区二区| 亚洲一区二区在线免费看| 国产精品丝袜91| 国产婷婷精品av在线| www日韩大片| 日韩一卡二卡三卡四卡| 欧美日韩国产首页在线观看| 91视频观看视频| 成人av动漫在线| 国产精品一级二级三级| 黑人精品欧美一区二区蜜桃| 免费欧美日韩国产三级电影| 五月婷婷激情综合| 亚洲成人一区在线| 午夜激情综合网| 亚洲一区二区高清| 亚洲黄色尤物视频| 依依成人综合视频| 一区二区在线观看av| 一区二区三区欧美在线观看| 国产精品久久久久久久午夜片| 国产午夜三级一区二区三| 精品精品国产高清a毛片牛牛| 欧美精品久久天天躁| 欧美欧美欧美欧美首页| 91.麻豆视频| 欧美一区二区在线免费观看| 日韩欧美一区二区三区在线| 日韩视频免费直播| 精品国产免费一区二区三区四区| 欧美成人精品高清在线播放| 精品毛片乱码1区2区3区| 精品国产乱码久久久久久久久| 欧美精品一区二区三区蜜臀| 久久这里只有精品6| 中文字幕av不卡| 亚洲色欲色欲www| 性感美女极品91精品| 日产国产高清一区二区三区| 久久99精品久久只有精品| 粉嫩嫩av羞羞动漫久久久| 不卡av免费在线观看| 欧美三级在线视频| 欧美在线一二三四区| 日韩一卡二卡三卡| 精品日韩av一区二区| xvideos.蜜桃一区二区| 亚洲国产高清不卡| 欧美国产激情一区二区三区蜜月 | 777午夜精品视频在线播放| 欧美一区二区三区白人| 国产日韩欧美亚洲| 一区二区三区产品免费精品久久75| 亚洲va欧美va人人爽| 国内精品第一页| 色综合 综合色| 欧美一卡二卡三卡| 国产精品麻豆99久久久久久| 亚洲一区二区三区四区在线| 麻豆91在线播放| 99久久99久久久精品齐齐| 日韩视频一区在线观看| 国产精品白丝在线| 日本欧美加勒比视频| av资源网一区| 日韩视频一区二区| 一区二区三区免费观看| 极品美女销魂一区二区三区| 色婷婷久久综合| 久久这里只有精品6| 亚洲国产成人av| 成人免费观看视频| 精品少妇一区二区三区在线播放| 国产精品麻豆网站| 日韩av电影天堂| 91免费看`日韩一区二区| 国产亚洲综合av| 免费一级欧美片在线观看| 日本精品视频一区二区| 国产视频在线观看一区二区三区| 日产国产欧美视频一区精品| 9久草视频在线视频精品| 欧美变态凌虐bdsm| 亚洲精品成人悠悠色影视| 福利一区福利二区| 欧美mv日韩mv| 日本成人在线不卡视频| 91精品福利在线| 国产精品国产三级国产a| 久久精品国产免费看久久精品| 欧美午夜片在线观看| 国产精品日韩成人| 国产一区二区三区香蕉| 欧美一区二区三区四区在线观看 | 亚洲一区在线免费观看| 国产高清精品在线| 欧美sm极限捆绑bd| 日韩成人免费看| 欧美图区在线视频| 一区二区在线观看视频| 色综合天天性综合| 精品剧情在线观看| 日韩一区精品视频| 日韩一级视频免费观看在线| 日本伊人色综合网| 欧美日韩大陆一区二区| 亚洲一区二区三区视频在线播放| 91小视频在线免费看| 成人欧美一区二区三区白人| 丁香婷婷综合激情五月色| 国产亚洲欧美日韩俺去了| 国产制服丝袜一区| 精品国产网站在线观看| 极品销魂美女一区二区三区| 精品久久久久久久久久久久久久久久久| 丝袜诱惑亚洲看片| 91精品综合久久久久久| 日本aⅴ精品一区二区三区| 欧美色综合影院| 一区二区三区国产精品| 91女神在线视频| 国产日韩影视精品| 不卡av电影在线播放| 亚洲另类中文字| 欧美日韩中文字幕一区二区| 午夜a成v人精品| 欧美成人女星排名| 国产精品亚洲专一区二区三区 | 午夜精品视频一区| 欧美乱妇一区二区三区不卡视频| 午夜成人免费视频| 亚洲精品一线二线三线无人区| 国产激情视频一区二区三区欧美 | 国产精品欧美经典| 99视频精品全部免费在线| 国产精品久久久久aaaa樱花 | 99re在线视频这里只有精品| 亚洲三级在线播放| 7777精品伊人久久久大香线蕉的 | 国产精品色噜噜| 91啪亚洲精品| 日本午夜精品视频在线观看 | 91麻豆精品国产91久久久使用方法| 日本不卡视频在线| 国产日韩精品一区二区三区| 成人毛片老司机大片| 亚洲国产wwwccc36天堂| 日韩欧美国产一区在线观看| 国产成人精品三级| 亚洲一区二区高清| 久久综合色鬼综合色| 波多野结衣中文字幕一区| 午夜精品影院在线观看| 久久一区二区视频| 91久久精品国产91性色tv| 精品一区二区三区免费观看| 国产精品伦一区| 欧美精品在线视频| 成人av在线播放网站| 日韩不卡在线观看日韩不卡视频| 久久精品人人做人人综合|