revert between 56095 -> 55830 in arch
[AROS.git] / workbench / devs / networks / realtek8180 / task.h
blob01bc7f835aa9e25d7c20cbef85b9eae77c5281f4
1 /*
3 Copyright (C) 2017 Neil Cafferkey
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 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 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, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18 MA 02111-1307, USA.
22 #ifndef TASK_H
23 #define TASK_H
26 #if defined(__mc68000) && !defined(__AROS__)
27 #define AddUnitTask(task, initial_pc, unit) \
28 ({ \
29 task->tc_SPReg -= sizeof(APTR); \
30 *((APTR *)task->tc_SPReg) = unit; \
31 AddTask(task, initial_pc, NULL); \
33 #endif
34 #ifdef __amigaos4__
35 #define AddUnitTask(task, initial_pc, unit) \
36 ({ \
37 struct TagItem _task_tags[] = \
38 {{AT_Param1, (UPINT)unit}, {TAG_END, 0}}; \
39 AddTask(task, initial_pc, NULL, _task_tags); \
41 #endif
42 #ifdef __MORPHOS__
43 #define AddUnitTask(task, initial_pc, unit) \
44 ({ \
45 struct TagItem _task_tags[] = \
46 { \
47 {TASKTAG_CODETYPE, CODETYPE_PPC}, \
48 {TASKTAG_PC, (UPINT)initial_pc}, \
49 {TASKTAG_PPC_ARG1, (UPINT)unit}, \
50 {TAG_END, 1} \
51 }; \
52 struct TaskInitExtension _task_init = {0xfff0, 0, _task_tags}; \
53 AddTask(task, &_task_init, NULL); \
55 #endif
56 #ifdef __AROS__
57 #define AddUnitTask(task, initial_pc, unit) \
58 ({ \
59 struct TagItem _task_tags[] = \
60 {{TASKTAG_ARG1, (UPINT)unit}, {TAG_END, 0}}; \
61 NewAddTask(task, initial_pc, NULL, _task_tags); \
63 #endif
66 #endif