drake
1.0.0
|
00001 /* 00002 Copyright 2015 Nicolas Melot 00003 00004 This file is part of Drake. 00005 00006 Drake is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 (at your option) any later version. 00010 00011 Drake is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with Drake. If not, see <http://www.gnu.org/licenses/>. 00018 00019 */ 00020 00021 00022 // Standard C includes 00023 #include <stddef.h> 00024 00025 // Drake includes 00026 #include <pelib/template.h> 00027 00028 // Drake includes 00029 #include <drake/task.h> 00030 00031 #if PELIB_CONCAT_3(DONE_, TASK_MODULE, TASK_NAME) == 0 00032 00033 #ifdef _DRAKE_COMPILE 00034 00035 #define drake_init PELIB_CONCAT_3(TASK_MODULE,_init_,TASK_NAME) 00036 #define drake_start PELIB_CONCAT_3(TASK_MODULE,_start_,TASK_NAME) 00037 #define drake_run PELIB_CONCAT_3(TASK_MODULE,_run_,TASK_NAME) 00038 #define drake_kill PELIB_##CONCAT_3(TASK_MODULE, _kill_, TASK_NAME) 00039 #define drake_destroy PELIB_##CONCAT_3(TASK_MODULE, _destroy_, TASK_NAME) 00040 #define drake_user(name) PELIB_##CONCAT_5(TASK_MODULE, _user_, TASK_NAME, _, name) 00041 00046 int drake_init(task_t *, void *aux); 00051 int drake_start(task_t *); 00055 int drake_run(task_t *); 00060 int drake_kill(task_t *); 00065 int drake_destroy(task_t *); 00066 #else 00067 #define drake_init(name,id) PELIB_CONCAT_3(name,_init_,id) 00068 #define drake_start(name,id) PELIB_CONCAT_3(name,_start_,id) 00069 #define drake_run(name,id) PELIB_CONCAT_3(name,_run_,id) 00070 #define drake_kill(name,id) PELIB_CONCAT_3(name,_kill_,id) 00071 #define drake_destroy(name,id) PELIB_CONCAT_3(name,_destroy_,id) 00072 00077 int drake_init(TASK_MODULE, TASK_NAME)(task_t *, void *aux); 00082 int drake_start(TASK_MODULE, TASK_NAME)(task_t *); 00086 int drake_run(TASK_MODULE, TASK_NAME)(task_t *); 00091 int drake_kill(TASK_MODULE, TASK_NAME)(task_t *); 00096 int drake_destroy(TASK_MODULE, TASK_NAME)(task_t *); 00097 00098 #undef TASK_MODULE 00099 #undef TASK_NAME 00100 #endif 00101 00102 #endif 00103