3 * Copyright (C) 2007 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #define PROC_USER_PRIORITY 128
27 #define PROC_FLAG_DAEMON 0x1
30 typedef unsigned pid_t
;
32 /* Process structure */
33 typedef struct proc_context
{
34 struct proc_context
*next
, *prev
;
56 extern proc_t proc_kernel
;
58 extern void proc_display ();
59 extern proc_t
*proc_find (task_t
*task
);
60 extern proc_t
*proc_findbypid (pid_t pid
);
61 extern proc_t
*proc_create (tty_t
*tty
, char *name
, unsigned entry
);
62 extern bool proc_done (proc_t
*proc
);
63 extern bool proc_signal (proc_t
*proc
, unsigned signal
);
64 extern bool proc_arg_set (proc_t
*proc
, char *arg
, unsigned argl
);
65 extern bool proc_arg_free (proc_t
*proc
);
66 extern bool proc_arg_get (proc_t
*proc
, unsigned *argc
, char **argv
);
67 extern unsigned proc_page_fault ();
68 extern unsigned proc_vmem_map (proc_t
*proc
);
69 extern unsigned proc_vmem_unmap (proc_t
*proc
);
70 extern unsigned proc_thread_create (void *entry
, void *arg
);
71 extern unsigned proc_thread_destroy (proc_t
*proc
, task_t
*task
);
72 extern unsigned int init_proc (void);