AquilaOS documentation
How it works, and its code
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. */
9extern 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. */
13int kthread_create(const char *name, void (*fn)(void *), void *arg, struct thread **ref);
14
15#endif /* ! _SYS_KTHREAD_H */
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
struct proc * kproc
Definition kthread.c:23
A process.
Definition proc.h:75
char * name
its name: the program it runs
Definition proc.h:84
A thread.
Definition thread.h:23