FreeBSD kernel kern code
kern_thread.c File Reference
#include "opt_witness.h"
#include "opt_hwpmc_hooks.h"
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/msan.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/bitstring.h>
#include <sys/epoch.h>
#include <sys/rangelock.h>
#include <sys/resourcevar.h>
#include <sys/sdt.h>
#include <sys/smp.h>
#include <sys/sched.h>
#include <sys/sleepqueue.h>
#include <sys/selinfo.h>
#include <sys/syscallsubr.h>
#include <sys/dtrace_bsd.h>
#include <sys/sysent.h>
#include <sys/turnstile.h>
#include <sys/taskqueue.h>
#include <sys/ktr.h>
#include <sys/rwlock.h>
#include <sys/umtxvar.h>
#include <sys/vmmeter.h>
#include <sys/cpuset.h>
#include <sys/priv.h>
#include <security/audit/audit.h>
#include <vm/pmap.h>
#include <vm/vm.h>
#include <vm/vm_extern.h>
#include <vm/uma.h>
#include <vm/vm_phys.h>
#include <sys/eventhandler.h>
Include dependency graph for kern_thread.c:

Go to the source code of this file.

Data Structures

struct  thread_domain_data
 
struct  tidbatch
 

Macros

#define TIDHASH(tid)   (&tidhashtbl[(tid) & tidhash])
 
#define TIDHASHLOCK(tid)   (&tidhashtbl_lock[(tid) & tidhashlock])
 
#define RUN_THRESH   16
 

Functions

 __FBSDID ("$FreeBSD$")
 
 SDT_PROVIDER_DECLARE (proc)
 
 SDT_PROBE_DEFINE (proc,,, lwp__exit)
 
struct thread_domain_data __aligned (CACHE_LINE_SIZE)
 
static void thread_zombie (struct thread *)
 
static void thread_reap (void)
 
static void thread_reap_all (void)
 
static void thread_reap_task_cb (void *, int)
 
static void thread_reap_callout_cb (void *)
 
static int thread_unsuspend_one (struct thread *td, struct proc *p, bool boundary)
 
static void thread_free_batched (struct thread *td)
 
static MALLOC_DEFINE (M_TIDHASH, "tidhash", "thread hash")
 
 SYSCTL_INT (_kern, OID_AUTO, maxthread, CTLFLAG_RDTUN, &maxthread, 0, "Maximum number of threads")
 
static LIST_HEAD (tidhashhead, thread)
 
static bool thread_count_inc (void)
 
static void thread_count_sub (int n)
 
static void thread_count_dec (void)
 
static lwpid_t tid_alloc (void)
 
static void tid_free_locked (lwpid_t rtid)
 
static void tid_free (lwpid_t rtid)
 
static void tid_free_batch (lwpid_t *batch, int n)
 
static void tidbatch_prep (struct tidbatch *tb)
 
static void tidbatch_add (struct tidbatch *tb, struct thread *td)
 
static void tidbatch_process (struct tidbatch *tb)
 
static void tidbatch_final (struct tidbatch *tb)
 
static int thread_ctor (void *mem, int size, void *arg, int flags)
 
static void thread_dtor (void *mem, int size, void *arg)
 
static int thread_init (void *mem, int size, int flags)
 
static void thread_fini (void *mem, int size)
 
void proc_linkup0 (struct proc *p, struct thread *td)
 
void proc_linkup (struct proc *p, struct thread *td)
 
void threadinit (void)
 
void thread_stash (struct thread *td)
 
static void thread_reap_domain (struct thread_domain_data *tdd)
 
static void thread_reap_task_cb (void *arg __unused, int pending __unused)
 
static void thread_reap_callout_cb (void *arg __unused)
 
void thread_reap_barrier (void)
 
struct thread * thread_alloc (int pages)
 
int thread_alloc_stack (struct thread *td, int pages)
 
void thread_free (struct thread *td)
 
void thread_cow_get_proc (struct thread *newtd, struct proc *p)
 
void thread_cow_get (struct thread *newtd, struct thread *td)
 
void thread_cow_free (struct thread *td)
 
void thread_cow_update (struct thread *td)
 
void thread_cow_synced (struct thread *td)
 
void thread_exit (void)
 
void thread_wait (struct proc *p)
 
void thread_link (struct thread *td, struct proc *p)
 
void thread_unlink (struct thread *td)
 
static int calc_remaining (struct proc *p, int mode)
 
static int remain_for_mode (int mode)
 
static int weed_inhib (int mode, struct thread *td2, struct proc *p)
 
int thread_single (struct proc *p, int mode)
 
bool thread_suspend_check_needed (void)
 
int thread_suspend_check (int return_instead)
 
int thread_check_susp (struct thread *td, bool sleep)
 
void thread_suspend_switch (struct thread *td, struct proc *p)
 
void thread_suspend_one (struct thread *td)
 
void thread_run_flash (struct thread *td)
 
void thread_unsuspend (struct proc *p)
 
void thread_single_end (struct proc *p, int mode)
 
static bool tdfind_hash (lwpid_t tid, pid_t pid, struct proc **pp, struct thread **tdp)
 
struct thread * tdfind (lwpid_t tid, pid_t pid)
 
void tidhash_add (struct thread *td)
 
void tidhash_remove (struct thread *td)
 

Variables

static uma_zone_t thread_zone
 
struct thread * tdd_zombies
 
int tdd_reapticks
 
static struct thread_domain_data thread_domain_data [MAXMEMDOM]
 
static struct task thread_reap_task
 
static struct callout thread_reap_callout
 
static __exclusive_cache_line struct mtx tid_lock
 
static bitstr_t * tid_bitmap
 
static int maxthread
 
static __exclusive_cache_line int nthreads
 
struct tidbatch __aligned
 
int max_threads_per_proc
 

Macro Definition Documentation

◆ RUN_THRESH

#define RUN_THRESH   16

◆ TIDHASH

#define TIDHASH (   tid)    (&tidhashtbl[(tid) & tidhash])

◆ TIDHASHLOCK

#define TIDHASHLOCK (   tid)    (&tidhashtbl_lock[(tid) & tidhashlock])

Function Documentation

◆ __aligned()

struct thread_domain_data __aligned ( CACHE_LINE_SIZE  )

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ calc_remaining()

static int calc_remaining ( struct proc *  p,
int  mode 
)
static

Definition at line 1077 of file kern_thread.c.

References mode, and panic().

Referenced by thread_single().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LIST_HEAD()

static LIST_HEAD ( tidhashhead  ,
thread   
)
static

Definition at line 166 of file kern_thread.c.

◆ MALLOC_DEFINE()

static MALLOC_DEFINE ( M_TIDHASH  ,
"tidhash"  ,
"thread hash"   
)
static

◆ proc_linkup()

void proc_linkup ( struct proc *  p,
struct thread *  td 
)

Definition at line 468 of file kern_thread.c.

References ksiginfo_alloc(), sigqueue_init(), and thread_link().

Referenced by fork1(), and proc_linkup0().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ proc_linkup0()

void proc_linkup0 ( struct proc *  p,
struct thread *  td 
)

Definition at line 461 of file kern_thread.c.

References proc_linkup().

Here is the call graph for this function:

◆ remain_for_mode()

static int remain_for_mode ( int  mode)
static

Definition at line 1095 of file kern_thread.c.

References mode.

Referenced by thread_single(), and thread_single_end().

Here is the caller graph for this function:

◆ SDT_PROBE_DEFINE()

SDT_PROBE_DEFINE ( proc  ,
lwp__exit   
)

◆ SDT_PROVIDER_DECLARE()

SDT_PROVIDER_DECLARE ( proc  )

◆ SYSCTL_INT()

SYSCTL_INT ( _kern  ,
OID_AUTO  ,
maxthread  ,
CTLFLAG_RDTUN  ,
maxthread,
,
"Maximum number of threads"   
)

◆ tdfind()

struct thread * tdfind ( lwpid_t  tid,
pid_t  pid 
)

Definition at line 1729 of file kern_thread.c.

References tdfind_hash().

Referenced by cpuset_which(), get_cputime(), kern_ptrace(), pget(), sigev_findtd(), sys_rtprio_thread(), sys_thr_kill(), sys_thr_kill2(), sys_thr_set_name(), sys_thr_wake(), and umtxq_sleep_pi().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tdfind_hash()

static bool tdfind_hash ( lwpid_t  tid,
pid_t  pid,
struct proc **  pp,
struct thread **  tdp 
)
static

Definition at line 1686 of file kern_thread.c.

References RUN_THRESH, TIDHASH, and TIDHASHLOCK.

Referenced by tdfind().

Here is the caller graph for this function:

◆ thread_alloc()

struct thread * thread_alloc ( int  pages)

Definition at line 746 of file kern_thread.c.

References kmsan_thread_alloc(), thread_count_dec(), thread_count_inc(), thread_ctor(), thread_zone, tid_alloc(), and tid_free().

Referenced by fork1(), kern_thr_alloc(), and kthread_add().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_alloc_stack()

int thread_alloc_stack ( struct thread *  td,
int  pages 
)

Definition at line 773 of file kern_thread.c.

Referenced by fork1().

Here is the caller graph for this function:

◆ thread_check_susp()

int thread_check_susp ( struct thread *  td,
bool  sleep 
)

Definition at line 1476 of file kern_thread.c.

References thread_suspend_check().

Referenced by do_lock_normal(), do_lock_pi(), do_lock_pp(), do_rw_rdlock(), do_rw_unlock(), do_rw_wrlock(), do_sem2_wait(), do_sem2_wake(), do_unlock_normal(), do_unlock_pi(), do_wake2_umutex(), do_wake_umutex(), sigfastblock_setpend1(), and sys_sigfastblock().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_count_dec()

static void thread_count_dec ( void  )
static

Definition at line 226 of file kern_thread.c.

References thread_count_sub().

Referenced by thread_alloc(), and thread_free().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_count_inc()

static bool thread_count_inc ( void  )
static

Definition at line 195 of file kern_thread.c.

References ppsratecheck(), printf(), thread_reap(), and thread_reap_all().

Referenced by thread_alloc(), and threadinit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_count_sub()

static void thread_count_sub ( int  n)
static

Definition at line 219 of file kern_thread.c.

References nthreads.

Referenced by thread_count_dec(), and thread_reap_domain().

Here is the caller graph for this function:

◆ thread_cow_free()

void thread_cow_free ( struct thread *  td)

Definition at line 842 of file kern_thread.c.

References crcowfree(), and lim_free().

Referenced by thread_create(), and thread_wait().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_cow_get()

void thread_cow_get ( struct thread *  newtd,
struct thread *  td 
)

Definition at line 831 of file kern_thread.c.

References crcowget(), and lim_hold().

Referenced by thread_create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_cow_get_proc()

void thread_cow_get_proc ( struct thread *  newtd,
struct proc *  p 
)

Definition at line 820 of file kern_thread.c.

References crcowget(), and lim_hold().

Referenced by do_fork(), kthread_add(), and proc0_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_cow_synced()

void thread_cow_synced ( struct thread *  td)

Definition at line 871 of file kern_thread.c.

Referenced by kern_proc_setrlimit().

Here is the caller graph for this function:

◆ thread_cow_update()

void thread_cow_update ( struct thread *  td)

Definition at line 852 of file kern_thread.c.

References crcowsync(), crfree(), lim_cowsync(), and lim_free().

Referenced by ast(), and syscallenter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_ctor()

static int thread_ctor ( void *  mem,
int  size,
void *  arg,
int  flags 
)
static

Definition at line 345 of file kern_thread.c.

References kdtrace_thread_ctor(), and umtx_thread_alloc().

Referenced by proc0_init(), proc_ctor(), thread_alloc(), and threadinit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_dtor()

static void thread_dtor ( void *  mem,
int  size,
void *  arg 
)
static

Definition at line 375 of file kern_thread.c.

References kdtrace_thread_dtor(), panic(), and seltdfini().

Referenced by kcov_init(), proc_dtor(), thread_free(), thread_reap_domain(), and threadinit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_exit()

void thread_exit ( void  )

Definition at line 893 of file kern_thread.c.

References cpu_ticks, Giant, panic(), rucollect(), ruxagg_locked(), sched_exit_thread(), sched_throw(), thread_unlink(), thread_unsuspend_one(), ticks, and witness_thread_exit().

Referenced by exit1(), kern_thr_exit(), and kthread_exit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_fini()

static void thread_fini ( void *  mem,
int  size 
)
static

Definition at line 439 of file kern_thread.c.

References rlqentry_free(), sleepq_free(), thread_fini(), turnstile_free(), and umtx_thread_fini().

Referenced by thread_fini(), and threadinit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_free()

void thread_free ( struct thread *  td)

Definition at line 808 of file kern_thread.c.

References thread_count_dec(), thread_dtor(), thread_free_batched(), and tid_free().

Referenced by proc_fini(), and thread_create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_free_batched()

static void thread_free_batched ( struct thread *  td)
static

Definition at line 788 of file kern_thread.c.

References cpuset_rel(), kmsan_thread_free(), and thread_zone.

Referenced by thread_free(), and thread_reap_domain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_init()

static int thread_init ( void *  mem,
int  size,
int  flags 
)
static

Definition at line 418 of file kern_thread.c.

References sleepq_alloc(), thread_init(), turnstile_alloc(), and umtx_thread_init().

Referenced by proc0_init(), thread_init(), and threadinit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_link()

void thread_link ( struct thread *  td,
struct proc *  p 
)

Definition at line 1032 of file kern_thread.c.

References callout_init(), and sigqueue_init().

Referenced by kthread_add(), proc_linkup(), and thread_create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_reap()

static void thread_reap ( void  )
static

Definition at line 670 of file kern_thread.c.

References domain, and thread_reap_domain().

Referenced by thread_count_inc(), and thread_wait().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_reap_all()

static void thread_reap_all ( void  )
static

Definition at line 654 of file kern_thread.c.

References domain, and thread_reap_domain().

Referenced by thread_count_inc(), and thread_reap_task_cb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_reap_barrier()

void thread_reap_barrier ( void  )

Definition at line 721 of file kern_thread.c.

References free(), malloc(), quiesce_all_cpus(), taskqueue_drain(), taskqueue_enqueue(), and thread_reap_task_cb().

Here is the call graph for this function:

◆ thread_reap_callout_cb() [1/2]

static void thread_reap_callout_cb ( void *  )
static

Referenced by thread_reap_callout_cb(), and threadinit().

Here is the caller graph for this function:

◆ thread_reap_callout_cb() [2/2]

static void thread_reap_callout_cb ( void *arg  __unused)
static

◆ thread_reap_domain()

static void thread_reap_domain ( struct thread_domain_data tdd)
static

◆ thread_reap_task_cb() [1/2]

static void thread_reap_task_cb ( void *  ,
int   
)
static

Referenced by thread_reap_barrier(), and threadinit().

Here is the caller graph for this function:

◆ thread_reap_task_cb() [2/2]

static void thread_reap_task_cb ( void *arg  __unused,
int pending  __unused 
)
static

Definition at line 682 of file kern_thread.c.

References thread_reap_all().

Here is the call graph for this function:

◆ thread_run_flash()

void thread_run_flash ( struct thread *  td)

Definition at line 1562 of file kern_thread.c.

References setrunnable(), and sleepq_remove_nested().

Referenced by kern_ptrace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_single()

int thread_single ( struct proc *  p,
int  mode 
)

Definition at line 1188 of file kern_thread.c.

References calc_remaining(), Giant, mode, remain_for_mode(), sched_relinquish(), thread_suspend_switch(), and weed_inhib().

Referenced by exit1(), fork_norfproc(), post_execve(), pre_execve(), sigexit(), and stop_all_proc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_single_end()

void thread_single_end ( struct proc *  p,
int  mode 
)

Definition at line 1628 of file kern_thread.c.

References mode, remain_for_mode(), and thread_unsuspend_one().

Referenced by fork_norfproc(), post_execve(), and resume_all_proc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_stash()

void thread_stash ( struct thread *  td)

Definition at line 573 of file kern_thread.c.

References thread_zombie().

Referenced by fork_exit(), and mi_switch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_suspend_check()

int thread_suspend_check ( int  return_instead)

Definition at line 1365 of file kern_thread.c.

References Giant, kern_thr_exit(), mi_switch(), panic(), thread_stopped(), thread_suspend_check_needed(), thread_suspend_one(), thread_unsuspend_one(), and umtx_thread_exit().

Referenced by ast(), exit1(), fork_rfppwait(), kern_sigsuspend(), sig_ast_checksusp(), and thread_check_susp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_suspend_check_needed()

bool thread_suspend_check_needed ( void  )

Definition at line 1319 of file kern_thread.c.

Referenced by fork_rfppwait(), and thread_suspend_check().

Here is the caller graph for this function:

◆ thread_suspend_one()

void thread_suspend_one ( struct thread *  td)

Definition at line 1528 of file kern_thread.c.

References sched_sleep().

Referenced by sig_suspend_threads(), thread_suspend_check(), and weed_inhib().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_suspend_switch()

void thread_suspend_switch ( struct thread *  td,
struct proc *  p 
)

Definition at line 1500 of file kern_thread.c.

References mi_switch(), sched_sleep(), and thread_stopped().

Referenced by ptracestop(), sigprocess(), and thread_single().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_unlink()

void thread_unlink ( struct thread *  td)

Definition at line 1061 of file kern_thread.c.

Referenced by thread_exit().

Here is the caller graph for this function:

◆ thread_unsuspend()

void thread_unsuspend ( struct proc *  p)

Definition at line 1590 of file kern_thread.c.

References thread_unsuspend_one().

Referenced by kern_ptrace(), ptrace_unsuspend(), and tdsendsignal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_unsuspend_one()

static int thread_unsuspend_one ( struct thread *  td,
struct proc *  p,
bool  boundary 
)
static

Definition at line 1543 of file kern_thread.c.

References setrunnable().

Referenced by thread_exit(), thread_single_end(), thread_suspend_check(), thread_unsuspend(), and weed_inhib().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_wait()

void thread_wait ( struct proc *  p)

Definition at line 1006 of file kern_thread.c.

References cpuset_rel(), Giant, thread_cow_free(), and thread_reap().

Referenced by proc_reap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread_zombie()

void thread_zombie ( struct thread *  td)
static

Definition at line 553 of file kern_thread.c.

References thread_domain_data::tdd_zombies.

Referenced by thread_stash().

Here is the caller graph for this function:

◆ threadinit()

void threadinit ( void  )

◆ tid_alloc()

static lwpid_t tid_alloc ( void  )
static

Definition at line 233 of file kern_thread.c.

References maxthread, tid_bitmap, and tid_lock.

Referenced by thread_alloc(), and threadinit().

Here is the caller graph for this function:

◆ tid_free()

static void tid_free ( lwpid_t  rtid)
static

Definition at line 273 of file kern_thread.c.

References tid_free_locked(), and tid_lock.

Referenced by thread_alloc(), and thread_free().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tid_free_batch()

static void tid_free_batch ( lwpid_t *  batch,
int  n 
)
static

Definition at line 282 of file kern_thread.c.

References tid_free_locked(), and tid_lock.

Referenced by tidbatch_final(), and tidbatch_process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tid_free_locked()

static void tid_free_locked ( lwpid_t  rtid)
static

Definition at line 259 of file kern_thread.c.

References tid_bitmap, and tid_lock.

Referenced by tid_free(), and tid_free_batch().

Here is the caller graph for this function:

◆ tidbatch_add()

static void tidbatch_add ( struct tidbatch tb,
struct thread *  td 
)
static

Definition at line 309 of file kern_thread.c.

References tidbatch::n, and tidbatch::tab.

Referenced by thread_reap_domain().

Here is the caller graph for this function:

◆ tidbatch_final()

static void tidbatch_final ( struct tidbatch tb)
static

Definition at line 331 of file kern_thread.c.

References tidbatch::n, tidbatch::tab, and tid_free_batch().

Referenced by thread_reap_domain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tidbatch_prep()

static void tidbatch_prep ( struct tidbatch tb)
static

Definition at line 302 of file kern_thread.c.

References tidbatch::n.

Referenced by thread_reap_domain().

Here is the caller graph for this function:

◆ tidbatch_process()

static void tidbatch_process ( struct tidbatch tb)
static

Definition at line 319 of file kern_thread.c.

References tidbatch::n, tidbatch::tab, and tid_free_batch().

Referenced by thread_reap_domain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tidhash_add()

void tidhash_add ( struct thread *  td)

Definition at line 1763 of file kern_thread.c.

References TIDHASH, and TIDHASHLOCK.

Referenced by do_fork(), kthread_add(), proc0_init(), and thread_create().

Here is the caller graph for this function:

◆ tidhash_remove()

void tidhash_remove ( struct thread *  td)

Definition at line 1771 of file kern_thread.c.

References TIDHASHLOCK.

Referenced by exit1(), kern_thr_exit(), and kthread_exit().

Here is the caller graph for this function:

◆ weed_inhib()

static int weed_inhib ( int  mode,
struct thread *  td2,
struct proc *  p 
)
static

Definition at line 1102 of file kern_thread.c.

References mode, sleepq_abort(), thread_suspend_one(), and thread_unsuspend_one().

Referenced by thread_single().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ __aligned

struct bufdomain __aligned

◆ max_threads_per_proc

int max_threads_per_proc
extern

Definition at line 70 of file kern_thr.c.

Referenced by kern_thr_alloc(), and threadinit().

◆ maxthread

int maxthread
static

Definition at line 160 of file kern_thread.c.

Referenced by threadinit(), and tid_alloc().

◆ nthreads

__exclusive_cache_line int nthreads
static

Definition at line 164 of file kern_thread.c.

Referenced by thread_count_sub().

◆ tdd_reapticks

int tdd_reapticks

Definition at line 1 of file kern_thread.c.

◆ tdd_zombies

struct thread* tdd_zombies

Definition at line 0 of file kern_thread.c.

◆ thread_domain_data

struct thread_domain_data thread_domain_data[MAXMEMDOM]
static

Definition at line 141 of file kern_thread.c.

◆ thread_reap_callout

struct callout thread_reap_callout
static

Definition at line 144 of file kern_thread.c.

Referenced by thread_reap_callout_cb(), and threadinit().

◆ thread_reap_task

struct task thread_reap_task
static

Definition at line 143 of file kern_thread.c.

Referenced by thread_reap_callout_cb(), and threadinit().

◆ thread_zone

uma_zone_t thread_zone
static

Definition at line 134 of file kern_thread.c.

Referenced by thread_alloc(), thread_free_batched(), and threadinit().

◆ tid_bitmap

bitstr_t* tid_bitmap
static

Definition at line 156 of file kern_thread.c.

Referenced by threadinit(), tid_alloc(), and tid_free_locked().

◆ tid_lock

__exclusive_cache_line struct mtx tid_lock
static

Definition at line 155 of file kern_thread.c.

Referenced by threadinit(), tid_alloc(), tid_free(), tid_free_batch(), and tid_free_locked().