app irc was completely rewrited from base, should be stable now, support multichannel...
[ZeXOS.git] / kernel / include / proc.h
blobb286e48d612f6189a6ce68f6cdffb36b335841a1
1 /*
2 * ZeX/OS
3 * Copyright (C) 2007 Tomas 'ZeXx86' Jedrzejek (zexx86@gmail.com)
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/>.
20 #ifndef _PROC_H
21 #define _PROC_H
23 #include <tty.h>
25 #define PROC_USER_PRIORITY 128
27 #define PROC_FLAG_DAEMON 0x1
29 /* Process id */
30 typedef unsigned pid_t;
32 /* Process structure */
33 typedef struct proc_context {
34 struct proc_context *next, *prev;
36 task_t *task;
37 pid_t pid;
38 tty_t *tty;
39 char name[12];
41 unsigned argc;
42 char **argv;
44 unsigned short flags;
46 unsigned start;
47 unsigned code;
48 unsigned data;
49 unsigned data_off;
50 unsigned bss;
51 unsigned end;
52 } proc_t;
54 /* externs */
55 extern void proc_display ();
56 extern proc_t *proc_find (task_t *task);
57 extern proc_t *proc_findbypid (pid_t pid);
58 extern proc_t *proc_create (tty_t *tty, char *name, unsigned entry);
59 extern bool proc_done (proc_t *proc);
60 extern bool proc_signal (proc_t *proc, unsigned signal);
61 extern bool proc_arg_set (proc_t *proc, char *arg, unsigned argl);
62 extern bool proc_arg_free (proc_t *proc);
63 extern bool proc_arg_get (proc_t *proc, unsigned *argc, char **argv);
64 extern unsigned proc_page_fault ();
65 extern unsigned int init_proc (void);
67 #endif