include/linux/sched/signal.h
Source file repositories/reference/linux-study-clean/include/linux/sched/signal.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/sched/signal.h- Extension
.h- Size
- 21953 bytes
- Lines
- 781
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/rculist.hlinux/signal.hlinux/sched.hlinux/sched/jobctl.hlinux/sched/task.hlinux/cred.hlinux/refcount.hlinux/pid.hlinux/posix-timers.hlinux/mm_types.hasm/ptrace.h
Detected Declarations
struct sighand_structstruct pacct_structstruct cpu_itimerstruct task_cputime_atomicstruct thread_group_cputimerstruct multiprocess_signalsstruct core_threadstruct core_statestruct signal_structfunction signal_set_stop_flagsfunction kernel_dequeue_signalfunction kernel_signal_stopfunction clear_notify_signalfunction __set_notify_signalfunction exit_to_user_mode_loopfunction restart_syscallfunction task_sigpendingfunction signal_pendingfunction __fatal_signal_pendingfunction fatal_signal_pendingfunction signal_pending_statefunction fault_signal_pendingfunction signal_wake_upfunction ptrace_signal_wake_upfunction set_restore_sigmaskfunction clear_tsk_restore_sigmaskfunction clear_restore_sigmaskfunction test_tsk_restore_sigmaskfunction test_restore_sigmaskfunction test_and_clear_restore_sigmaskfunction set_restore_sigmaskfunction clear_tsk_restore_sigmaskfunction clear_restore_sigmaskfunction test_restore_sigmaskfunction test_tsk_restore_sigmaskfunction test_and_clear_restore_sigmaskfunction restore_saved_sigmaskfunction restore_saved_sigmask_unlessfunction kill_cad_pidfunction __on_sig_stackfunction on_sig_stackfunction sas_ss_flagsfunction sas_ss_resetfunction sigspfunction get_nr_threadsfunction thread_group_leaderfunction same_thread_groupfunction thread_group_empty
Annotated Snippet
struct sighand_struct {
spinlock_t siglock;
refcount_t count;
wait_queue_head_t signalfd_wqh;
struct k_sigaction action[_NSIG];
};
/*
* Per-process accounting stats:
*/
struct pacct_struct {
int ac_flag;
long ac_exitcode;
unsigned long ac_mem;
u64 ac_utime, ac_stime;
unsigned long ac_minflt, ac_majflt;
};
struct cpu_itimer {
u64 expires;
u64 incr;
};
/*
* This is the atomic variant of task_cputime, which can be used for
* storing and updating task_cputime statistics without locking.
*/
struct task_cputime_atomic {
atomic64_t utime;
atomic64_t stime;
atomic64_t sum_exec_runtime;
};
#define INIT_CPUTIME_ATOMIC \
(struct task_cputime_atomic) { \
.utime = ATOMIC64_INIT(0), \
.stime = ATOMIC64_INIT(0), \
.sum_exec_runtime = ATOMIC64_INIT(0), \
}
/**
* struct thread_group_cputimer - thread group interval timer counts
* @cputime_atomic: atomic thread group interval timers.
*
* This structure contains the version of task_cputime, above, that is
* used for thread group CPU timer calculations.
*/
struct thread_group_cputimer {
struct task_cputime_atomic cputime_atomic;
};
struct multiprocess_signals {
sigset_t signal;
struct hlist_node node;
};
struct core_thread {
struct task_struct *task;
struct core_thread *next;
};
struct core_state {
atomic_t nr_threads;
struct core_thread dumper;
struct completion startup;
};
/*
* NOTE! "signal_struct" does not have its own
* locking, because a shared signal_struct always
* implies a shared sighand_struct, so locking
* sighand_struct is always a proper superset of
* the locking of signal_struct.
*/
struct signal_struct {
refcount_t sigcnt;
atomic_t live;
int nr_threads;
int quick_threads;
struct list_head thread_head;
wait_queue_head_t wait_chldexit; /* for wait4() */
/* current thread group signal load-balancing target: */
struct task_struct *curr_target;
/* shared signal handling: */
struct sigpending shared_pending;
/* For collecting multiprocess signals during fork */
struct hlist_head multiprocess;
Annotation
- Immediate include surface: `linux/rculist.h`, `linux/signal.h`, `linux/sched.h`, `linux/sched/jobctl.h`, `linux/sched/task.h`, `linux/cred.h`, `linux/refcount.h`, `linux/pid.h`.
- Detected declarations: `struct sighand_struct`, `struct pacct_struct`, `struct cpu_itimer`, `struct task_cputime_atomic`, `struct thread_group_cputimer`, `struct multiprocess_signals`, `struct core_thread`, `struct core_state`, `struct signal_struct`, `function signal_set_stop_flags`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.