• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ do_signal函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中do_signal函数的典型用法代码示例。如果您正苦于以下问题:C++ do_signal函数的具体用法?C++ do_signal怎么用?C++ do_signal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了do_signal函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: do_notify_resume

asmlinkage void do_notify_resume(struct pt_regs *regs,
		unsigned int thread_flags, int syscall)
{
	if (thread_flags & _TIF_SIGPENDING)
		do_signal(regs, syscall);

	if (thread_flags & _TIF_NOTIFY_RESUME) {
		clear_thread_flag(TIF_NOTIFY_RESUME);
		tracehook_notify_resume(regs);
	}
}
开发者ID:AdrianHuang,项目名称:linux-3.8.13,代码行数:11,代码来源:signal.c


示例2: do_notify_resume

void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long thread_info_flags)
{
	user_exit();
	if (thread_info_flags & _TIF_SIGPENDING)
		do_signal(regs, orig_i0);
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
		clear_thread_flag(TIF_NOTIFY_RESUME);
		tracehook_notify_resume(regs);
	}
	user_enter();
}
开发者ID:1314cc,项目名称:linux,代码行数:11,代码来源:signal_64.c


示例3: fatal_sigsegv

void fatal_sigsegv(void)
{
	force_sigsegv(SIGSEGV, current);
	do_signal();
	/*
	 * This is to tell gcc that we're not returning - do_signal
	 * can, in general, return, but in this case, it's not, since
	 * we just got a fatal SIGSEGV queued.
	 */
	os_dump_core();
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:11,代码来源:trap.c


示例4: do_notify_resume

/*
 * notification of userspace execution resumption
 * - triggered by the TIF_WORK_MASK flags
 */
asmlinkage void do_notify_resume(__u32 thread_info_flags)
{
	/* pending single-step? */
	if (thread_info_flags & _TIF_SINGLESTEP)
		clear_thread_flag(TIF_SINGLESTEP);

	/* deal with pending signal delivery */
	if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
		do_signal();

} /* end do_notify_resume() */
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:15,代码来源:signal.c


示例5: do_notify_resume

void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, unsigned long thread_info_flags)
{
	if (thread_info_flags & _TIF_SIGPENDING)
		do_signal(regs, orig_i0);
	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
		clear_thread_flag(TIF_NOTIFY_RESUME);
		tracehook_notify_resume(regs);
		if (current->replacement_session_keyring)
			key_replace_session_keyring();
	}
}
开发者ID:1N4148,项目名称:android_kernel_samsung_golden,代码行数:11,代码来源:signal_64.c


示例6: do_notify_resume

asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int in_syscall,
	unsigned int thread_flags)
{
	local_irq_enable();

	if (thread_flags & _TIF_SIGPENDING) {
		do_signal(regs, in_syscall);
	} else {
		clear_thread_flag(TIF_NOTIFY_RESUME);
		tracehook_notify_resume(regs);
	}
}
开发者ID:linuxbest,项目名称:linux-milkymist,代码行数:12,代码来源:signal.c


示例7: p_creep_fail

static Int 
p_creep_fail( USES_REGS1 )
{
  Atom            at;
  PredEntry      *pred;

  at = AtomCreep;
  pred = RepPredProp(PredPropByFunc(Yap_MkFunctor(at, 1),0));
  CreepCode = pred;
  do_signal(YAP_CREEP_SIGNAL PASS_REGS);
  return FALSE;
}
开发者ID:xicoVale,项目名称:yap-6.3,代码行数:12,代码来源:signals.c


示例8: do_notify_resume

asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0,
				 unsigned long thread_info_flags)
{
	/* deal with pending signal delivery */
	if (thread_info_flags & _TIF_SIGPENDING)
		do_signal(regs, save_r0);

	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
		clear_thread_flag(TIF_NOTIFY_RESUME);
		tracehook_notify_resume(regs);
	}
}
开发者ID:moddingg33k,项目名称:deprecated_android_kernel_synopsis,代码行数:12,代码来源:signal_32.c


示例9: do_notify_resume

/*
 * notification of userspace execution resumption
 */
asmlinkage void do_notify_resume(struct pt_regs *regs)
{
	if (test_thread_flag(TIF_SIGPENDING) || test_thread_flag(TIF_RESTORE_SIGMASK))
		do_signal(regs);

	if (test_thread_flag(TIF_NOTIFY_RESUME)) {
		clear_thread_flag(TIF_NOTIFY_RESUME);
		tracehook_notify_resume(regs);
		if (current->replacement_session_keyring)
			key_replace_session_keyring();
	}
}
开发者ID:Korn1699,项目名称:linux,代码行数:15,代码来源:signal.c


示例10: do_notify_resume

/*
 * notification of userspace execution resumption
 * - triggered by current->work.notify_resume
 */
asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags,
				 int syscall)
{
	/* deal with pending signal delivery */
	if (thread_info_flags & (1 << TIF_SIGPENDING))
		do_signal(regs, syscall);

	if (thread_info_flags & (1 << TIF_NOTIFY_RESUME)) {
		clear_thread_flag(TIF_NOTIFY_RESUME);
		tracehook_notify_resume(regs);
	}
}
开发者ID:01org,项目名称:KVMGT-kernel,代码行数:16,代码来源:signal.c


示例11: do_notify_resume

/*
 * notification of userspace execution resumption
 * - triggered by the _TIF_WORK_MASK flags
 */
asmlinkage void do_notify_resume(struct pt_regs *regs,
	unsigned long thread_info_flags)
{
	/* Handle pending signal delivery */
	if (thread_info_flags & _TIF_SIGPENDING) {
		do_signal(regs);
	}

	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
		clear_thread_flag(TIF_NOTIFY_RESUME);
		tracehook_notify_resume(regs);
	}
}
开发者ID:8l,项目名称:riscv-linux,代码行数:17,代码来源:signal.c


示例12: do_notify_resume

/*
 * notification of userspace execution resumption
 * - triggered by current->work.notify_resume
 */
void do_notify_resume(struct pt_regs *regs, sigset_t *oldset,
		      __u32 thread_info_flags)
{
	/* Pending single-step? */
	if (thread_info_flags & _TIF_SINGLESTEP)
		clear_thread_flag(TIF_SINGLESTEP);

	/* deal with pending signal delivery */
	if (thread_info_flags & _TIF_SIGPENDING)
		do_signal(regs,oldset);

	clear_thread_flag(TIF_IRET);
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:17,代码来源:signal.c


示例13: do_notify_resume

void do_notify_resume(struct pt_regs *regs, void *unused,
		      __u32 thread_info_flags)
{
#ifdef CONFIG_X86_MCE
	/* notify userspace of pending MCEs */
	if (thread_info_flags & _TIF_MCE_NOTIFY)
		mce_notify_user();
#endif /* CONFIG_X86_MCE */

	/* deal with pending signal delivery */
	if (thread_info_flags & _TIF_SIGPENDING)
		do_signal(regs);
}
开发者ID:LouZiffer,项目名称:m900_kernel_cupcake-SDX,代码行数:13,代码来源:signal_64.c


示例14: do_work_pending

asmlinkage int
do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
{
	do {
		if (likely(thread_flags & _TIF_NEED_RESCHED)) {
			schedule();
		} else {
			if (unlikely(!user_mode(regs)))
				return 0;
			local_irq_enable();
			if (thread_flags & _TIF_SIGPENDING) {
#ifdef CONFIG_OWL_DEBUG_IRQ_STACK
				int restart;
				owl_debug_check_irqstack(regs);
				restart = do_signal(regs, syscall);
				owl_debug_save_irqstack(regs);
#else
				int restart = do_signal(regs, syscall);
#endif
				if (unlikely(restart)) {
					/*
					 * Restart without handlers.
					 * Deal with it without leaving
					 * the kernel space.
					 */
					return restart;
				}
				syscall = 0;
			} else {
				clear_thread_flag(TIF_NOTIFY_RESUME);
				tracehook_notify_resume(regs);
			}
		}
		local_irq_disable();
		thread_flags = current_thread_info()->flags;
	} while (thread_flags & _TIF_WORK_MASK);
	return 0;
}
开发者ID:alsandeep,项目名称:kernel-4.x,代码行数:38,代码来源:signal.c


示例15: signal_keys

static int signal_keys(struct wdgt *w, int key)
{
        int signal = 0;
	
	if(!(key&KBD_CTRL)) return KEY_SKIPPED;
	key &= KBD_MASK;
	switch(key) {
	case 'K': signal = 9; break;
	case 'U': signal = 1; break;
	case 'T': signal = 15; break;
	}
	if(signal) do_signal(w, signal, crsr_pid(w->crsr));
	return KEY_HANDLED;
}	
开发者ID:mtsuszycki,项目名称:whowatch,代码行数:14,代码来源:plist.c


示例16: do_sigsuspend

/*
 * atomically swap in the new signal mask, and wait for a signal.
 */
asmlinkage int do_sigsuspend(struct pt_regs *regs)
{
	unsigned long oldmask = current->blocked;
	unsigned long newmask = regs->d3;

	current->blocked = newmask & _BLOCKABLE;
	regs->d0 = -EINTR;
	while (1) {
		current->state = TASK_INTERRUPTIBLE;
		schedule();
		if (do_signal(oldmask, regs))
			return -EINTR;
	}
}
开发者ID:carlobar,项目名称:uclinux_leon3_UD,代码行数:17,代码来源:signal.c


示例17: do_notify_resume

void do_notify_resume(int canrestart, struct pt_regs *regs,
		      __u32 thread_info_flags)
{
	
	if (thread_info_flags & _TIF_SIGPENDING)
		do_signal(canrestart,regs);

	if (thread_info_flags & _TIF_NOTIFY_RESUME) {
		clear_thread_flag(TIF_NOTIFY_RESUME);
		tracehook_notify_resume(regs);
		if (current->replacement_session_keyring)
			key_replace_session_keyring();
	}
}
开发者ID:Blackburn29,项目名称:PsycoKernel,代码行数:14,代码来源:ptrace.c


示例18: prepare_exit_to_usermode

/* Called with IRQs disabled. */
__visible void prepare_exit_to_usermode(struct pt_regs *regs)
{
    if (WARN_ON(!irqs_disabled()))
        local_irq_disable();

    /*
     * In order to return to user mode, we need to have IRQs off with
     * none of _TIF_SIGPENDING, _TIF_NOTIFY_RESUME, _TIF_USER_RETURN_NOTIFY,
     * _TIF_UPROBE, or _TIF_NEED_RESCHED set.  Several of these flags
     * can be set at any time on preemptable kernels if we have IRQs on,
     * so we need to loop.  Disabling preemption wouldn't help: doing the
     * work to clear some of the flags can sleep.
     */
    while (true) {
        u32 cached_flags =
            READ_ONCE(pt_regs_to_thread_info(regs)->flags);

        if (!(cached_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_RESUME |
                              _TIF_UPROBE | _TIF_NEED_RESCHED |
                              _TIF_USER_RETURN_NOTIFY)))
            break;

        /* We have work to do. */
        local_irq_enable();

        if (cached_flags & _TIF_NEED_RESCHED)
            schedule();

        if (cached_flags & _TIF_UPROBE)
            uprobe_notify_resume(regs);

        /* deal with pending signal delivery */
        if (cached_flags & _TIF_SIGPENDING)
            do_signal(regs);

        if (cached_flags & _TIF_NOTIFY_RESUME) {
            clear_thread_flag(TIF_NOTIFY_RESUME);
            tracehook_notify_resume(regs);
        }

        if (cached_flags & _TIF_USER_RETURN_NOTIFY)
            fire_user_return_notifiers();

        /* Disable IRQs and retry */
        local_irq_disable();
    }

    user_enter();
}
开发者ID:michas2,项目名称:l4re-snapshot,代码行数:50,代码来源:common.c


示例19: do_rt_sigsuspend

asmlinkage void do_rt_sigsuspend(sigset_t *uset, size_t sigsetsize, struct pt_regs *regs)
{
	sigset_t oldset, set;
        
	/* XXX: Don't preclude handling different sized sigset_t's.  */
	if (sigsetsize != sizeof(sigset_t)) {
		regs->tstate |= (TSTATE_ICARRY|TSTATE_XCARRY);
		regs->u_regs[UREG_I0] = EINVAL;
		return;
	}
	if (copy_from_user(&set, uset, sizeof(set))) {
		regs->tstate |= (TSTATE_ICARRY|TSTATE_XCARRY);
		regs->u_regs[UREG_I0] = EFAULT;
		return;
	}
                                                                
	sigdelsetmask(&set, ~_BLOCKABLE);
	spin_lock_irq(&current->sigmask_lock);
	oldset = current->blocked;
	current->blocked = set;
	recalc_sigpending(current);
	spin_unlock_irq(&current->sigmask_lock);
	
	if ((current->thread.flags & SPARC_FLAG_32BIT) != 0) {
		regs->tpc = (regs->tnpc & 0xffffffff);
		regs->tnpc = (regs->tnpc + 4) & 0xffffffff;
	} else {
		regs->tpc = regs->tnpc;
		regs->tnpc += 4;
	}

	/* Condition codes and return value where set here for sigpause,
	 * and so got used by setup_frame, which again causes sigreturn()
	 * to return -EINTR.
	 */
	while (1) {
		current->state = TASK_INTERRUPTIBLE;
		schedule();
		/*
		 * Return -EINTR and set condition code here,
		 * so the interrupted system call actually returns
		 * these.
		 */
		regs->tstate |= (TSTATE_ICARRY|TSTATE_XCARRY);
		regs->u_regs[UREG_I0] = EINTR;
		if (do_signal(&oldset, regs, 0, 0))
			return;
	}
}
开发者ID:romanalexander,项目名称:Trickles,代码行数:49,代码来源:signal.c


示例20: do_notify_resume

/*
 * notification of userspace execution resumption
 * - triggered by current->work.notify_resume
 */
asmlinkage void do_notify_resume(struct pt_regs *regs, u32 thread_info_flags,
				 int syscall)
{
	/* deal with pending signal delivery */
	if (thread_info_flags & ((1 << TIF_SIGPENDING) |
				 (1 << TIF_RESTORE_SIGMASK)))
		do_signal(regs, syscall);

	if (thread_info_flags & (1 << TIF_NOTIFY_RESUME)) {
		clear_thread_flag(TIF_NOTIFY_RESUME);
		tracehook_notify_resume(regs);
		if (current->replacement_session_keyring)
			key_replace_session_keyring();
	}
}
开发者ID:33d,项目名称:linux-2.6.21-hh20,代码行数:19,代码来源:signal.c



注:本文中的do_signal函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ do_sleep函数代码示例发布时间:2022-05-30
下一篇:
C++ do_sigaltstack函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap