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

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

?? signal.c

?? linux-2.4.29操作系統的源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* *  linux/arch/cris/kernel/signal.c * *  Based on arch/i386/kernel/signal.c by *     Copyright (C) 1991, 1992  Linus Torvalds *     1997-11-28  Modified for POSIX.1b signals by Richard Henderson * * *  Ideas also taken from arch/arm. * *  Copyright (C) 2000, 2001, 2002 Axis Communications AB * *  Authors:  Bjorn Wesen (bjornw@axis.com) * */#include <linux/sched.h>#include <linux/mm.h>#include <linux/smp.h>#include <linux/smp_lock.h>#include <linux/kernel.h>#include <linux/signal.h>#include <linux/errno.h>#include <linux/wait.h>#include <linux/ptrace.h>#include <linux/unistd.h>#include <linux/stddef.h>#include <asm/processor.h>#include <asm/ucontext.h>#include <asm/uaccess.h>#define DEBUG_SIG 0#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))/* a syscall in Linux/CRIS is a break 13 instruction which is 2 bytes *//* manipulate regs so that upon return, it will be re-executed *//* We rely on that pc points to the instruction after "break 13", so the * library must never do strange things like putting it in a delay slot. */#define RESTART_CRIS_SYS(regs) regs->r10 = regs->orig_r10; regs->irp -= 2;int do_signal(int canrestart, sigset_t *oldset, struct pt_regs *regs);int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from){	if (!access_ok (VERIFY_WRITE, to, sizeof(siginfo_t)))		return -EFAULT;	if (from->si_code < 0)		return __copy_to_user(to, from, sizeof(siginfo_t));	else {		int err;		/* If you change siginfo_t structure, please be sure		   this code is fixed accordingly.		   It should never copy any pad contained in the structure		   to avoid security leaks, but must copy the generic		   3 ints plus the relevant union member.  */		err = __put_user(from->si_signo, &to->si_signo);		err |= __put_user(from->si_errno, &to->si_errno);		err |= __put_user((short)from->si_code, &to->si_code);		/* First 32bits of unions are always present.  */		err |= __put_user(from->si_pid, &to->si_pid);		switch (from->si_code >> 16) {		case __SI_FAULT >> 16:                        err |= __put_user(from->si_addr, &to->si_addr);			break;		case __SI_CHLD >> 16:			err |= __put_user(from->si_utime, &to->si_utime);			err |= __put_user(from->si_stime, &to->si_stime);			err |= __put_user(from->si_status, &to->si_status);		default:			err |= __put_user(from->si_uid, &to->si_uid);			break;		/* case __SI_RT: This is not generated by the kernel as of now.  */		}		return err;	}}/* * Atomically swap in the new signal mask, and wait for a signal.  Define  * dummy arguments to be able to reach the regs argument.  (Note that this * arrangement relies on old_sigset_t occupying one register.) */intsys_sigsuspend(old_sigset_t mask, long r11, long r12, long r13, long mof,                long srp, struct pt_regs *regs){	sigset_t saveset;	mask &= _BLOCKABLE;	spin_lock_irq(&current->sigmask_lock);	saveset = current->blocked;	siginitset(&current->blocked, mask);	recalc_sigpending(current);	spin_unlock_irq(&current->sigmask_lock);	regs->r10 = -EINTR;	while (1) {		current->state = TASK_INTERRUPTIBLE;		schedule();		if (do_signal(0, &saveset, regs))			/* We will get here twice: once to call the signal			   handler, then again to return from the			   sigsuspend system call.  When calling the			   signal handler, R10 holds the signal number as			   set through do_signal.  The sigsuspend call			   will return with the restored value set above;			   always -EINTR.  */			return regs->r10;	}}/* Define dummy arguments to be able to reach the regs argument.  (Note that * this arrangement relies on size_t occupying one register.) */intsys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, long r12, long r13,                   long mof, long srp, struct pt_regs *regs){	sigset_t saveset, newset;	/* XXX: Don't preclude handling different sized sigset_t's.  */	if (sigsetsize != sizeof(sigset_t))		return -EINVAL;	if (copy_from_user(&newset, unewset, sizeof(newset)))		return -EFAULT;	sigdelsetmask(&newset, ~_BLOCKABLE);	spin_lock_irq(&current->sigmask_lock);	saveset = current->blocked;	current->blocked = newset;	recalc_sigpending(current);	spin_unlock_irq(&current->sigmask_lock);	regs->r10 = -EINTR;	while (1) {		current->state = TASK_INTERRUPTIBLE;		schedule();		if (do_signal(0, &saveset, regs))			/* We will get here twice: once to call the signal			   handler, then again to return from the			   sigsuspend system call.  When calling the			   signal handler, R10 holds the signal number as			   set through do_signal.  The sigsuspend call			   will return with the restored value set above;			   always -EINTR.  */			return regs->r10;	}}int sys_sigaction(int sig, const struct old_sigaction *act,	      struct old_sigaction *oact){	struct k_sigaction new_ka, old_ka;	int ret;	if (act) {		old_sigset_t mask;		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))			return -EFAULT;		__get_user(new_ka.sa.sa_flags, &act->sa_flags);		__get_user(mask, &act->sa_mask);		siginitset(&new_ka.sa.sa_mask, mask);	}	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);	if (!ret && oact) {		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))			return -EFAULT;		__put_user(old_ka.sa.sa_flags, &oact->sa_flags);		__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);	}	return ret;}intsys_sigaltstack(const stack_t *uss, stack_t *uoss){	return do_sigaltstack(uss, uoss, rdusp());}/* * Do a signal return; undo the signal stack. */struct sigframe {	struct sigcontext sc;	unsigned long extramask[_NSIG_WORDS-1];	unsigned char retcode[8];  /* trampoline code */};struct rt_sigframe {	struct siginfo *pinfo;	void *puc;	struct siginfo info;	struct ucontext uc;	unsigned char retcode[8];  /* trampoline code */};static intrestore_sigcontext(struct pt_regs *regs, struct sigcontext *sc){	unsigned int err = 0;	unsigned long old_usp;	/* restore the regs from &sc->regs (same as sc, since regs is first)	 * (sc is already checked for VERIFY_READ since the sigframe was	 *  checked in sys_sigreturn previously)	 */	if (__copy_from_user(regs, sc, sizeof(struct pt_regs)))                goto badframe;	/* make sure the U-flag is set so user-mode cannot fool us */	regs->dccr |= 1 << 8;	/* restore the old USP as it was before we stacked the sc etc.	 * (we cannot just pop the sigcontext since we aligned the sp and	 *  stuff after pushing it)	 */	err |= __get_user(old_usp, &sc->usp);	wrusp(old_usp);	/* TODO: the other ports use regs->orig_XX to disable syscall checks	 * after this completes, but we don't use that mechanism. maybe we can	 * use it now ? 	 */	return err;badframe:	return 1;}/* Define dummy arguments to be able to reach the regs argument.  */asmlinkage int sys_sigreturn(long r10, long r11, long r12, long r13, long mof,                              long srp, struct pt_regs *regs){	struct sigframe *frame = (struct sigframe *)rdusp();	sigset_t set;        /*         * Since we stacked the signal on a dword boundary,         * then frame should be dword aligned here.  If it's         * not, then the user is trying to mess with us.         */        if (((long)frame) & 3)                goto badframe;	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))		goto badframe;	if (__get_user(set.sig[0], &frame->sc.oldmask)	    || (_NSIG_WORDS > 1		&& __copy_from_user(&set.sig[1], &frame->extramask,				    sizeof(frame->extramask))))		goto badframe;	sigdelsetmask(&set, ~_BLOCKABLE);	spin_lock_irq(&current->sigmask_lock);	current->blocked = set;	recalc_sigpending(current);	spin_unlock_irq(&current->sigmask_lock);		if (restore_sigcontext(regs, &frame->sc))		goto badframe;	/* TODO: SIGTRAP when single-stepping as in arm ? */	return regs->r10;badframe:	force_sig(SIGSEGV, current);	return 0;}	/* Define dummy arguments to be able to reach the regs argument.  */asmlinkage int sys_rt_sigreturn(long r10, long r11, long r12, long r13,                                 long mof, long srp, struct pt_regs *regs){	struct rt_sigframe *frame = (struct rt_sigframe *)rdusp();	sigset_t set;	stack_t st;        /*         * Since we stacked the signal on a dword boundary,         * then frame should be dword aligned here.  If it's         * not, then the user is trying to mess with us.         */        if (((long)frame) & 3)                goto badframe;	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))		goto badframe;	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))		goto badframe;	sigdelsetmask(&set, ~_BLOCKABLE);	spin_lock_irq(&current->sigmask_lock);	current->blocked = set;	recalc_sigpending(current);	spin_unlock_irq(&current->sigmask_lock);		if (restore_sigcontext(regs, &frame->uc.uc_mcontext))		goto badframe;	if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st)))		goto badframe;	/* It is more difficult to avoid calling this function than to	   call it and ignore errors.  */	do_sigaltstack(&st, NULL, rdusp());	return regs->r10;badframe:	force_sig(SIGSEGV, current);	return 0;}	/* * Set up a signal frame. */static intsetup_sigcontext(struct sigcontext *sc, struct pt_regs *regs, unsigned long mask){	int err = 0;	unsigned long usp = rdusp();	/* copy the regs. they are first in sc so we can use sc directly */	err |= __copy_to_user(sc, regs, sizeof(struct pt_regs));        /* Set the frametype to CRIS_FRAME_NORMAL for the execution of           the signal handler. The frametype will be restored to its previous

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成av人片在线| 色噜噜狠狠色综合中国| 成人高清伦理免费影院在线观看| 91社区在线播放| 精品国产成人系列| 日韩中文字幕亚洲一区二区va在线| 色88888久久久久久影院按摩| 欧美成人一区二区三区片免费| 亚洲欧洲精品成人久久奇米网| 日韩高清在线观看| 91传媒视频在线播放| 国产三级欧美三级日产三级99| 亚洲国产精品一区二区www| 成人国产电影网| 国产欧美一区二区精品仙草咪| 亚洲va欧美va人人爽| 色综合久久久久综合| 国产亚洲va综合人人澡精品| 蜜桃一区二区三区在线观看| 欧美视频中文字幕| 日韩毛片精品高清免费| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 久久久精品日韩欧美| 婷婷丁香久久五月婷婷| 欧洲一区二区三区免费视频| 亚洲少妇中出一区| 北条麻妃一区二区三区| 欧美国产精品劲爆| 粉嫩嫩av羞羞动漫久久久 | 日韩午夜激情免费电影| 舔着乳尖日韩一区| 欧美日韩国产在线观看| 亚洲香蕉伊在人在线观| 欧美日韩一区二区欧美激情| 亚洲国产sm捆绑调教视频| 91成人在线免费观看| 亚洲自拍都市欧美小说| 欧美人牲a欧美精品| 五月天国产精品| 日韩精品专区在线影院观看| 久久99精品国产91久久来源| 久久久久免费观看| 91在线免费看| 污片在线观看一区二区| 日韩欧美国产综合| 国产一区二区三区免费播放| 久久久99精品久久| av午夜一区麻豆| 亚洲一区二区三区美女| 91精品在线观看入口| 日本午夜一区二区| 久久理论电影网| 91社区在线播放| 无码av中文一区二区三区桃花岛| 精品少妇一区二区| 成人综合在线观看| 亚洲国产va精品久久久不卡综合| 日韩亚洲欧美中文三级| 成人网男人的天堂| 亚洲成av人片一区二区梦乃| 精品国产亚洲在线| 99久久亚洲一区二区三区青草| 亚洲图片欧美色图| 久久精品夜夜夜夜久久| 91国偷自产一区二区开放时间| 欧美第一区第二区| 精彩视频一区二区三区| 91精品国产色综合久久ai换脸| 日本麻豆一区二区三区视频| 亚洲精品高清视频在线观看| 欧美日韩国产123区| 99久久精品免费看国产免费软件| 亚洲欧美激情在线| 国产九九视频一区二区三区| 国产在线一区二区| 国产一区二区三区美女| 国产一区二区三区精品欧美日韩一区二区三区 | 精品电影一区二区三区| 欧美成人精品3d动漫h| 欧美精品日日鲁夜夜添| 欧美日韩一区二区不卡| 欧美肥妇毛茸茸| 7777精品久久久大香线蕉| 欧美一二三四在线| 精品久久一区二区三区| 欧美精品一区二区三区高清aⅴ| 26uuu亚洲综合色欧美| 久久久国产精品麻豆| 国产日韩欧美精品综合| 国产精品不卡在线| 一区二区三区在线视频播放| 亚洲国产精品欧美一二99 | 久国产精品韩国三级视频| 韩国精品免费视频| 成人国产免费视频| 在线观看三级视频欧美| 91精品国产高清一区二区三区| 欧美一级片免费看| 久久综合九色综合97婷婷| 国产欧美1区2区3区| 亚洲欧美激情小说另类| 亚洲高清免费观看高清完整版在线观看| 日一区二区三区| 国产成人精品免费看| 色婷婷av一区二区三区软件| 欧美高清视频不卡网| 欧美精品一区二| 亚洲人成网站色在线观看| 午夜视频一区二区| 蜜芽一区二区三区| 粉嫩av一区二区三区| 欧美日韩情趣电影| 久久久久久夜精品精品免费| 亚洲美女屁股眼交| 麻豆免费精品视频| 成人高清av在线| 91精品婷婷国产综合久久竹菊| 国产日韩成人精品| 无码av免费一区二区三区试看| 高清免费成人av| 欧美精品日韩一区| 最近日韩中文字幕| 美国毛片一区二区三区| 97se亚洲国产综合自在线 | 国产精品18久久久久久久久| 在线亚洲免费视频| 国产亚洲精品aa| 亚洲大片精品永久免费| 国产91精品一区二区麻豆网站| 欧美三级中文字幕在线观看| 亚洲国产精华液网站w | 亚洲一区中文在线| 国产精品一区二区不卡| 亚洲视频 欧洲视频| 精品一区二区三区日韩| 欧美手机在线视频| 亚洲日本成人在线观看| 国产福利一区二区三区| 6080日韩午夜伦伦午夜伦| 亚洲三级免费观看| 国产成人在线视频网址| 欧美一区二区久久| 亚洲一区二区三区小说| 91老师片黄在线观看| 国产午夜亚洲精品不卡| 麻豆精品视频在线| 欧美老女人第四色| 亚洲一区国产视频| 99精品视频在线观看| 欧美国产日韩精品免费观看| 久99久精品视频免费观看| 欧美日韩中文字幕一区二区| 一区二区三区欧美在线观看| 99久久99久久精品免费观看| 国产欧美综合色| 国产一区二区三区| 亚洲精品一区二区三区香蕉| 青娱乐精品视频在线| 欧美群妇大交群中文字幕| 亚洲一区二区三区四区五区黄| 91日韩精品一区| 亚洲欧美另类综合偷拍| 不卡的av中国片| 国产精品久久久久久久久久免费看| 国产成人精品免费| 中文无字幕一区二区三区| 成人自拍视频在线| 国产精品二三区| 91视视频在线观看入口直接观看www | 一区二区三区在线免费视频| 91麻豆6部合集magnet| 亚洲欧美日韩国产综合在线 | 亚洲国产综合91精品麻豆| 欧美三级在线看| 日韩黄色片在线观看| 91精品国产综合久久久久久| 日韩高清不卡一区二区| 日韩欧美aaaaaa| 国产一区二区三区香蕉 | 国产三级三级三级精品8ⅰ区| 国产99久久久精品| 中文字幕亚洲电影| 日本道精品一区二区三区| 天天av天天翘天天综合网| 日韩一区二区在线看| 国产精品亚洲专一区二区三区| 国产精品色在线| 在线观看一区不卡| 久久66热re国产| 18欧美乱大交hd1984| 7777精品伊人久久久大香线蕉的 | 欧美日韩高清影院| 久久国产人妖系列| 中文字幕中文乱码欧美一区二区| 99re在线视频这里只有精品| 午夜精品福利久久久| 久久综合999| 一本大道av一区二区在线播放| 视频一区二区国产| 国产午夜精品一区二区|