MOS Source Code
Loading...
Searching...
No Matches
task_types.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#pragma once
4
7#include "mos/tasks/wait.h"
8
9#include <abi-bits/signal.h>
13
24
25typedef struct _thread thread_t;
26typedef struct _process process_t;
27
33
34typedef struct
35{
38} fd_type;
39
40#define nullfd ((fd_type){ .io = NULL, .flags = 0 })
41
66
73
93
95
#define MOS_PROCESS_MAX_OPEN_FILES
Definition autoconf.h:26
fd_flags_t
Definition fs_types.h:47
list_node_t list_head
A linked list head.
Definition list.h:23
struct _process process_t
Definition task_types.h:26
struct _thread thread_t
Definition platform.h:36
slab_t * process_cache
Definition tasks.c:22
thread_mode
Definition task_types.h:20
slab_t * thread_cache
Definition task_types.h:94
@ THREAD_MODE_KERNEL
Definition task_types.h:21
@ THREAD_MODE_USER
Definition task_types.h:22
thread_state_t
Definition platform.h:61
#define SIGNAL_MAX_N
Definition signal_types.h:8
fd_flags_t flags
Definition task_types.h:37
io_t * io
Definition task_types.h:36
Definition io.h:46
waitlist_t sigchild_waitlist
the parent is waiting for a child to exit, if not empty
Definition task_types.h:31
as_linked_list
node in the parent's children list
Definition task_types.h:49
mm_context_t * mm
Definition task_types.h:59
bool exited
true if the process has exited
Definition task_types.h:51
process_t * parent
Definition task_types.h:47
platform_process_options_t platform_options
platform per-process flags
Definition task_types.h:62
process_signal_info_t signal_info
signal handling info
Definition task_types.h:64
dentry_t * working_directory
Definition task_types.h:60
const char * name
Definition task_types.h:46
list_head threads
Definition task_types.h:57
thread_t * main_thread
Definition task_types.h:56
list_head children
list of children processes
Definition task_types.h:48
pid_t pid
Definition task_types.h:45
u32 exit_status
exit status
Definition task_types.h:52
Definition slab.h:45
list_head pending
list of pending signals
Definition task_types.h:70
sigset_t mask
pending signals mask
Definition task_types.h:71
platform_thread_options_t platform_options
platform-specific thread options
Definition task_types.h:87
u32 magic
Definition task_types.h:76
thread_mode mode
user-mode thread or kernel-mode
Definition task_types.h:81
as_linked_list
node in the process's thread list
Definition task_types.h:80
downwards_stack_t u_stack
user-mode stack
Definition task_types.h:84
waitlist_t waiters
list of threads waiting for this thread to exit
Definition task_types.h:89
downwards_stack_t k_stack
kernel-mode stack
Definition task_types.h:85
const char * name
Definition task_types.h:78
spinlock_t state_lock
protects the thread state
Definition task_types.h:82
process_t * owner
Definition task_types.h:79
tid_t tid
Definition task_types.h:77
thread_state_t state
thread state
Definition task_types.h:83
thread_signal_info_t signal_info
Definition task_types.h:91
unsigned int u32
Definition types.h:21
s32 tid_t
Definition types.h:79
s32 pid_t
Definition types.h:78