intime的脚印

Be an Artist rather than a Coder!

原创 内核里面屏蔽信号的方法收藏

新一篇: 内核中调用用户程序的接口



    spin_lock_irqsave(&current->sigmask_lock, flags);
    oldset = current->blocked;
    sigfillset(&current->blocked);
    recalc_sigpending(current);   //  重新计算current->sigpending
    spin_unlock_irqrestore(&current->sigmask_lock, flags);

/*
    屏蔽信号的部分
*/

    spin_lock_irqsave(&current->sigmask_lock, flags);
    current->blocked = oldset;
    recalc_sigpending(current);
    spin_unlock_irqrestore(&current->sigmask_lock, flags);

发表于 @ 2006年12月30日 10:50:00|评论(loading...)|编辑

旧一篇: google开源软件职位笔试面试题

评论:没有评论。

发表评论  


当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
Csdn Blog version 3.1a
Copyright © intime