AquilaOS documentation
How it works, and its code
Toggle main menu visibility
Loading...
Searching...
No Matches
kthread.h
Go to the documentation of this file.
1
#ifndef _SYS_KTHREAD_H
2
#define _SYS_KTHREAD_H
3
4
#include <
core/system.h
>
5
#include <
sys/proc.h
>
6
7
/* Process 0, the kernel's own (sys/kthread.c). Its threads run in the
8
* kernel only, on the kernel's address space, and it takes no signals. */
9
extern
struct
proc
*
kproc
;
10
11
/* Makes a thread of process 0, named `name`, that runs fn(arg), which must
12
* not return. The thread is made ready to run. */
13
int
kthread_create
(
const
char
*
name
,
void
(*fn)(
void
*),
void
*arg,
struct
thread
**ref);
14
15
#endif
/* ! _SYS_KTHREAD_H */
system.h
kthread_create
int kthread_create(const char *name, void(*fn)(void *), void *arg, struct thread **ref)
Makes a kernel thread, and makes it ready to run.
Definition
kthread.c:71
kproc
struct proc * kproc
Definition
kthread.c:23
proc.h
proc
A process.
Definition
proc.h:75
proc::name
char * name
its name: the program it runs
Definition
proc.h:84
thread
A thread.
Definition
thread.h:23
kernel
include
sys
kthread.h
Generated by
1.18.0