FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include "opt_compat.h"
#include "opt_posix.h"
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/posix4.h>
#include <sys/racct.h>
#include <sys/resourcevar.h>
#include <sys/rwlock.h>
#include <sys/sched.h>
#include <sys/sysctl.h>
#include <sys/smp.h>
#include <sys/syscallsubr.h>
#include <sys/sysent.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/signalvar.h>
#include <sys/ucontext.h>
#include <sys/thr.h>
#include <sys/rtprio.h>
#include <sys/umtx.h>
#include <sys/limits.h>
#include <machine/frame.h>
#include <security/audit/audit.h>
Go to the source code of this file.
Macros | |
#define | suword_lwpid suword |
Functions | |
__FBSDID ("$BSDSUniX$") | |
static | SYSCTL_NODE (_kern, OID_AUTO, threads, CTLFLAG_RW, 0,"thread allocation") |
SYSCTL_INT (_kern_threads, OID_AUTO, max_threads_per_proc, CTLFLAG_RW,&max_threads_per_proc, 0,"Limit on threads per proc") | |
SYSCTL_INT (_kern_threads, OID_AUTO, max_threads_hits, CTLFLAG_RD,&max_threads_hits, 0,"") | |
static int | create_thread (struct thread *td, mcontext_t *ctx, void(*start_func)(void *), void *arg, char *stack_base, size_t stack_size, char *tls_base, long *child_tid, long *parent_tid, int flags, struct rtprio *rtp) |
int | sys_thr_create (struct thread *td, struct thr_create_args *uap) |
int | sys_thr_new (struct thread *td, struct thr_new_args *uap) |
int | kern_thr_new (struct thread *td, struct thr_param *param) |
int | sys_thr_self (struct thread *td, struct thr_self_args *uap) |
int | sys_thr_exit (struct thread *td, struct thr_exit_args *uap) |
int | sys_thr_kill (struct thread *td, struct thr_kill_args *uap) |
int | sys_thr_kill2 (struct thread *td, struct thr_kill2_args *uap) |
int | sys_thr_suspend (struct thread *td, struct thr_suspend_args *uap) |
int | kern_thr_suspend (struct thread *td, struct timespec *tsp) |
int | sys_thr_wake (struct thread *td, struct thr_wake_args *uap) |
int | sys_thr_set_name (struct thread *td, struct thr_set_name_args *uap) |
Variables | |
static int | max_threads_per_proc = 1500 |
static int | max_threads_hits |
#define suword_lwpid suword |
Definition at line 87 of file kern_thr.c.
Referenced by create_thread(), sys_thr_exit(), and sys_thr_self().
__FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
Definition at line 151 of file kern_thr.c.
References crfree(), crhold(), max_threads_hits, max_threads_per_proc, priv_check(), racct_add(), racct_sub(), rtp_to_pri(), sched_add(), sched_fork_thread(), sched_prio(), suword_lwpid, thread_alloc(), thread_free(), thread_link(), and tidhash_add().
Referenced by kern_thr_new(), and sys_thr_create().
int kern_thr_new | ( | struct thread * | td, |
struct thr_param * | param | ||
) |
Definition at line 131 of file kern_thr.c.
References create_thread().
Referenced by sys_thr_new().
int kern_thr_suspend | ( | struct thread * | td, |
struct timespec * | tsp | ||
) |
Definition at line 465 of file kern_thr.c.
References tvtohz().
Referenced by sys_thr_suspend().
int sys_thr_create | ( | struct thread * | td, |
struct thr_create_args * | uap | ||
) |
Definition at line 101 of file kern_thr.c.
References create_thread().
int sys_thr_exit | ( | struct thread * | td, |
struct thr_exit_args * | uap | ||
) |
Definition at line 306 of file kern_thr.c.
References kern_umtx_wake(), racct_sub(), suword_lwpid, tdsigcleanup(), thread_exit(), and thread_stopped().
int sys_thr_kill | ( | struct thread * | td, |
struct thr_kill_args * | uap | ||
) |
Definition at line 343 of file kern_thr.c.
References tdfind(), and tdksignal().
int sys_thr_kill2 | ( | struct thread * | td, |
struct thr_kill2_args * | uap | ||
) |
Definition at line 390 of file kern_thr.c.
References p_cansignal(), pfind(), tdfind(), and tdksignal().
int sys_thr_new | ( | struct thread * | td, |
struct thr_new_args * | uap | ||
) |
Definition at line 116 of file kern_thr.c.
References kern_thr_new().
int sys_thr_self | ( | struct thread * | td, |
struct thr_self_args * | uap | ||
) |
Definition at line 294 of file kern_thr.c.
References suword_lwpid.
int sys_thr_set_name | ( | struct thread * | td, |
struct thr_set_name_args * | uap | ||
) |
Definition at line 533 of file kern_thr.c.
References name, and tdfind().
int sys_thr_suspend | ( | struct thread * | td, |
struct thr_suspend_args * | uap | ||
) |
Definition at line 447 of file kern_thr.c.
References kern_thr_suspend(), ts, and umtx_copyin_timeout().
int sys_thr_wake | ( | struct thread * | td, |
struct thr_wake_args * | uap | ||
) |
Definition at line 509 of file kern_thr.c.
References tdfind(), and wakeup().
SYSCTL_INT | ( | _kern_threads | , |
OID_AUTO | , | ||
max_threads_per_proc | , | ||
CTLFLAG_RW | , | ||
& | max_threads_per_proc, | ||
0 | , | ||
"Limit on threads per proc" | |||
) |
SYSCTL_INT | ( | _kern_threads | , |
OID_AUTO | , | ||
max_threads_hits | , | ||
CTLFLAG_RD | , | ||
& | max_threads_hits, | ||
0 | , | ||
"" | |||
) |
|
static |
|
static |
Definition at line 68 of file kern_thr.c.
Referenced by create_thread().
|
static |
Definition at line 64 of file kern_thr.c.
Referenced by create_thread().