Function Report

Linux Kernel (v4.4)

Source File:include\linux\sched.h Create Date:2016-01-14 09:13:47
Last Modify:2016-01-11 07:01:32 Copyright©Brick
home page Tree
Annotate the kernelChinese

Function Name:signal_pending

Function:static inline int signal_pending(struct task_struct *p)

Return Type:static inline int

Parameter:

Type Parameter NameRemarks
struct task_struct * p

Function description:

2900  Returning Value for the false possibility is greater at compile time
Caller
Function NameFunction description
fatal_signal_pending
signal_pending_state
do_read
copy_processCreate a new process
do_wait
ptrace_peek_siginfo
wants_signalTest if P wants to take SIG. After we've checked all threads with this,
retarget_shared_pendingIt could be that complete_signal() picked us to notify about the group-wide signal. Other threads should be notified now to take the shared signals in@which since we will not.
exit_signals
__set_task_blocked
sys_pause
__rt_mutex_slowlock Perform the wait-wake-try-to-take loop
rcu_tasks_kthreadRCU-tasks kthread that detects grace periods and invokes callbacks.
rcu_torture_cbfloodRCU torture callback-flood kthread. Repeatedly induces bursts of calls to call_rcu() or analogous, increasing the probability of occurrence of callback-overflow corner cases.
rcu_gp_kthreadBody of kthread that handles grace periods.
msleep_interruptible sleep waiting for signals
do_nanosleep
do_cpu_nanosleep
alarmtimer_do_nsleep Internal alarmtimer nsleep implementation
futex_wait
handle_early_requeue_pi_wakeup Detect early wakeup on the initial futex
ring_buffer_wait wait for input to the ring buffer
uprobe_deny_signalIf we are singlestepping, then ensure this thread is not connected to non-fatal signals until completion of singlestep
mm_take_all_locksThis operation locks against the VM for all pte/vma/mm related operations that could ever happen on a certain mm. This includes vmtruncate, try_to_unmap, and all page faults.
try_to_unuseWe completely avoid races by reading each swap page in advance, and then search for the process using it. All the necessary page table adjustments can then be made atomically.
set_max_huge_pages
unmerge_ksm_pagesThough it's very tempting to unmerge rmap_items from stable tree rather than check every pte of a given vma, the locking doesn't quite work for that- an rmap_item is assigned to the stable tree after inserting ksm page and upping mmap_sem
mem_cgroup_resize_limit
mem_cgroup_resize_memsw_limit
mem_cgroup_force_emptyReclaims as many pages from the given memcg as possible and moves the rest to the parent.
scan_should_stopMemory scanning is a long process and it needs to be interruptable. This function checks whether such interrupt condition occurred.
do_msgsnd
do_msgrcv
SYSC_semtimedop
wq_sleepPuts current task to sleep. Caller must hold queue lock. After return lock isn't held. sr: SEND or RECV
pipe_read
pipe_write
wait_for_partner
do_select
core_sys_selectWe can actually return ERESTARTSYS instead of EINTR, but I'd like to be certain this leads to no problems. So I return EINTR just for safety.
do_poll
splice_to_pipe fill passed data into a pipe
splice_from_pipe_next wait for some data to splice from
ipipe_prepMake sure there's data to read. Wait for input if we can, otherwise return an appropriate error.
opipe_prepMake sure there's writeable room. Wait for room if we can, otherwise return an appropriate error.
inotify_read
fanotify_read
ep_poll Retrieves ready events, and delivers them to the caller supplied event buffer.
signalfd_dequeue
eventfd_ctx_read Reads the eventfd counter or wait if it is zero.
eventfd_write
handle_userfaultThe locking rules involved in returning VM_FAULT_RETRY depending on FAULT_FLAG_ALLOW_RETRY, FAULT_FLAG_RETRY_NOWAIT and FAULT_FLAG_KILLABLE are not straightforward. The"Caution" recommendation in __lock_page_or_retry is not an understatement.
userfaultfd_ctx_read
read_events
compat_core_sys_selectWe can actually return ERESTARTSYS instead of EINTR, but I'd like to be certain this leads to no problems. So I return EINTR just for safety.
dump_interrupted