LCOV - code coverage report
Current view: top level - include/linux - signalfd.h (source / functions) Hit Total Coverage
Test: landlock.info Lines: 4 4 100.0 %
Date: 2021-04-22 12:43:58 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /* SPDX-License-Identifier: GPL-2.0 */
       2             : /*
       3             :  *  include/linux/signalfd.h
       4             :  *
       5             :  *  Copyright (C) 2007  Davide Libenzi <davidel@xmailserver.org>
       6             :  *
       7             :  */
       8             : #ifndef _LINUX_SIGNALFD_H
       9             : #define _LINUX_SIGNALFD_H
      10             : 
      11             : #include <uapi/linux/signalfd.h>
      12             : #include <linux/sched/signal.h>
      13             : 
      14             : #ifdef CONFIG_SIGNALFD
      15             : 
      16             : /*
      17             :  * Deliver the signal to listening signalfd.
      18             :  */
      19         540 : static inline void signalfd_notify(struct task_struct *tsk, int sig)
      20             : {
      21         540 :         if (unlikely(waitqueue_active(&tsk->sighand->signalfd_wqh)))
      22          50 :                 wake_up(&tsk->sighand->signalfd_wqh);
      23         540 : }
      24             : 
      25             : extern void signalfd_cleanup(struct sighand_struct *sighand);
      26             : 
      27             : #else /* CONFIG_SIGNALFD */
      28             : 
      29             : static inline void signalfd_notify(struct task_struct *tsk, int sig) { }
      30             : 
      31             : static inline void signalfd_cleanup(struct sighand_struct *sighand) { }
      32             : 
      33             : #endif /* CONFIG_SIGNALFD */
      34             : 
      35             : #endif /* _LINUX_SIGNALFD_H */

Generated by: LCOV version 1.14