ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/kpx_cpu/include/task-plugin.hpp
Revision: 1.2
Committed: 2006-01-28T21:57:52Z (18 years, 4 months ago) by gbeauche
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -0 lines
Log Message:
Merge from KPX: new exit() handling code; make "syscall" illegal for MacOS
emulation (SheepShaver)

File Contents

# Content
1 /*
2 * task-plugin.hpp - Task plugin definition
3 *
4 * Kheperix (C) 2003 Gwenole Beauchesne
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #ifndef TASK_PLUGIN_H
22 #define TASK_PLUGIN_H
23
24 #include "basic-plugin.hpp"
25
26 // Forward declarations
27 class task_struct;
28 class basic_kernel;
29 class basic_cpu;
30 class program_info;
31
32 // Base class for all task components
33 class task_plugin
34 : public basic_plugin
35 {
36 // Parent task
37 task_struct * task;
38
39 public:
40
41 // Constructor
42 task_plugin(task_struct * parent_task) : task(parent_task) { }
43
44 // Public accessors to resolve various components of a task
45 basic_kernel * kernel() const;
46 basic_cpu * cpu() const;
47 program_info * program() const;
48 };
49
50 // Get out of specified task
51 extern void task_exit(task_plugin *task, int status);
52
53 #endif /* TASK_PLUGIN_H */