📄 tid_signal.c
字号:
/*********************************************************************** * * (C) Copyright 2000 * Jean-Jacques Germond, Fr閐閞ic Soulier, Christian Batt; Alcatel * C/O jjg@sxb.bsf.alcatel.fr * * All rights reserved. * * This code is free software; you can redistribute it and/or * modify it under the terms of the GNU *Library* General Public License * as published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This code is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * *Library* General Public License for more details. * * You should have received a copy of the GNU *Library* General Public * License along with this program (see file COPYING.LIB); if not, * write to the Free Software Foundation, Inc., 675 Mass Ave, * Cambridge, MA 02139, USA. * ***********************************************************************//* Some problems with the max number of signals being now 64 * rather than 32 in AR examples. * So encapsulate this code. * * Most probably, should use the kernel function recalc_sigpending * but I am not sure about the needed locks and possible * side effect. * */ /* See AR pg:21 */# define __NO_VERSION__#include "tid_def.h"#include "asm/signal.h"#if _NSIG_WORDS != 2#error "NON PORTABLE tid_caughtSignal function"#endif inttid_caughtSignal(){ unsigned long flags; int result; save_flags(flags); /* Not sure that this is needed */ cli(); result = (current->signal.sig[1] & ~(current->blocked.sig[1])) || (current->signal.sig[0] & ~(current->blocked.sig[0])); restore_flags(flags); return result;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -