Remove stale declarations (moved to monitor.h).
[bertos.git] / kern / proc.h
1 /*!
2  * \file
3  * <!--
4  * Copyright 2001,2004 Develer S.r.l. (http://www.develer.com/)
5  * Copyright 1999,2000,2001 Bernardo Innocenti <bernie@develer.com>
6  * This file is part of DevLib - See devlib/README for information.
7  * -->
8  *
9  * \brief Process scheduler (public interface).
10  *
11  * \version $Id$
12  *
13  * \author Bernardo Innocenti <bernie@develer.com>
14  */
15
16 /*#*
17  *#* $Log$
18  *#* Revision 1.6  2004/10/03 20:44:18  bernie
19  *#* Remove stale declarations (moved to monitor.h).
20  *#*
21  *#* Revision 1.2  2004/06/03 11:27:09  bernie
22  *#* Add dual-license information.
23  *#*
24  *#* Revision 1.1  2004/05/23 17:27:00  bernie
25  *#* Import kern/ subdirectory.
26  *#*
27  *#*/
28
29 #ifndef KERN_PROC_H
30 #define KERN_PROC_H
31
32 #include "compiler.h"
33 #include "cpu.h"
34 #include "config_kern.h"
35
36 /* Fwd decl */
37 struct Process;
38
39 /* Task scheduling services */
40 void proc_init(void);
41 struct Process *proc_new_with_name(const char* name, void (*entry)(void), IPTR data, size_t stacksize, cpustack_t *stack);
42
43 #if !CONFIG_KERN_MONITOR
44         #define proc_new(entry,data,size,stack) proc_new_with_name(NULL,(entry),(data),(size),(stack))
45 #else
46         #define proc_new(entry,data,size,stack) proc_new_with_name(#entry,(entry),(data),(size),(stack))
47 #endif
48
49 void proc_exit(void);
50 void proc_switch(void);
51 void proc_test(void);
52 struct Process* proc_current(void);
53 IPTR proc_current_user_data(void);
54
55 #if CONFIG_KERN_PREEMPTIVE
56         #define FORBID proc_forbid()
57         #define PERMIT proc_permit()
58 #else
59         #define FORBID
60         #define PERMIT
61 #endif
62
63 #endif /* KERN_PROC_H */
64