FreeBSD kernel kern code
kern_kthread.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/cpuset.h>
#include <sys/kthread.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/rwlock.h>
#include <sys/signalvar.h>
#include <sys/sx.h>
#include <sys/unistd.h>
#include <sys/wait.h>
#include <sys/sched.h>
#include <vm/vm.h>
#include <vm/vm_extern.h>
#include <machine/stdarg.h>
Include dependency graph for kern_kthread.c:

Go to the source code of this file.

Functions

 __FBSDID ("$BSDSUniX$")
 
void kproc_start (void *udata) const
 
int kproc_create (void(*func)(void *), void *arg, struct proc **newpp, int flags, int pages, const char *fmt,...)
 
void kproc_exit (int ecode)
 
int kproc_suspend (struct proc *p, int timo)
 
int kproc_resume (struct proc *p)
 
void kproc_suspend_check (struct proc *p)
 
void kthread_start (void *udata) const
 
int kthread_add (void(*func)(void *), void *arg, struct proc *p, struct thread **newtdp, int flags, int pages, const char *fmt,...)
 
void kthread_exit (void)
 
int kthread_suspend (struct thread *td, int timo)
 
int kthread_resume (struct thread *td)
 
void kthread_suspend_check ()
 
int kproc_kthread_add (void(*func)(void *), void *arg, struct proc **procptr, struct thread **tdptr, int flags, int pages, const char *procname, const char *fmt,...)
 

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
int kproc_create ( void(*)(void *)  func,
void *  arg,
struct proc **  newpp,
int  flags,
int  pages,
const char *  fmt,
  ... 
)

Definition at line 80 of file kern_kthread.c.

References cpuset_root, cpuset_setthread(), fork1(), panic(), proc0, sched_add(), sched_prio(), sched_user_prio(), and vsnprintf().

Referenced by aio_newproc(), kproc_kthread_add(), kproc_start(), and sys_acct().

Here is the call graph for this function:

Here is the caller graph for this function:

void kproc_exit ( int  ecode)

Definition at line 141 of file kern_kthread.c.

References exit1(), initproc, proc_reparent(), proctree_lock, and wakeup().

Referenced by acct_thread(), aio_daemon(), ald_daemon(), and kthread_exit().

Here is the call graph for this function:

Here is the caller graph for this function:

int kproc_kthread_add ( void(*)(void *)  func,
void *  arg,
struct proc **  procptr,
struct thread **  tdptr,
int  flags,
int  pages,
const char *  procname,
const char *  fmt,
  ... 
)

Definition at line 437 of file kern_kthread.c.

References buf, kproc_create(), kthread_add(), and vsnprintf().

Referenced by idle_setup(), and ithread_create().

Here is the call graph for this function:

Here is the caller graph for this function:

int kproc_resume ( struct proc *  p)

Definition at line 190 of file kern_kthread.c.

References wakeup().

Here is the call graph for this function:

void kproc_start ( void *  udata) const

Definition at line 57 of file kern_kthread.c.

References kproc_create(), and panic().

Here is the call graph for this function:

int kproc_suspend ( struct proc *  p,
int  timo 
)

Definition at line 173 of file kern_kthread.c.

References wakeup().

Referenced by kproc_shutdown().

Here is the call graph for this function:

Here is the caller graph for this function:

void kproc_suspend_check ( struct proc *  p)

Definition at line 208 of file kern_kthread.c.

References wakeup().

Referenced by buf_daemon(), sched_sync(), and vnlru_proc().

Here is the call graph for this function:

Here is the caller graph for this function:

int kthread_add ( void(*)(void *)  func,
void *  arg,
struct proc *  p,
struct thread **  newtdp,
int  flags,
int  pages,
const char *  fmt,
  ... 
)

Definition at line 250 of file kern_kthread.c.

References cpuset_root, cpuset_setthread(), crhold(), panic(), proc0, sched_add(), sched_fork_thread(), thread_alloc(), thread_link(), tidhash_add(), and vsnprintf().

Referenced by kproc_kthread_add(), kthread_start(), and taskqueue_start_threads().

Here is the call graph for this function:

Here is the caller graph for this function:

void kthread_exit ( void  )

Definition at line 322 of file kern_kthread.c.

References kproc_exit(), thread_exit(), and wakeup().

Referenced by fork_exit(), ithread_loop(), and taskqueue_thread_loop().

Here is the call graph for this function:

Here is the caller graph for this function:

int kthread_resume ( struct thread *  td)

Definition at line 384 of file kern_kthread.c.

References wakeup().

Here is the call graph for this function:

void kthread_start ( void *  udata) const

Definition at line 227 of file kern_kthread.c.

References kthread_add(), and panic().

Here is the call graph for this function:

int kthread_suspend ( struct thread *  td,
int  timo 
)

Definition at line 353 of file kern_kthread.c.

Referenced by kthread_shutdown().

Here is the caller graph for this function:

void kthread_suspend_check ( )

Definition at line 412 of file kern_kthread.c.

References panic(), and wakeup().

Here is the call graph for this function: