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 #include <stddef.h> 00023 #include <pelib/integer.h> 00024 00025 #ifndef LINK_H 00026 #define LINK_H 00027 00029 typedef struct task* task_tp; 00030 00032 #define STRUCT_T task_tp 00033 #include <pelib/structure.h> 00034 #define DONE_task_tp 1 00035 00037 #define ARRAY_T task_tp 00038 #include <pelib/array.h> 00039 #define DONE_array_task_tp 1 00040 00041 #ifndef INNER_LINK_BUFFER 00042 #define INNER_LINK_BUFFER void 00043 #endif 00044 00046 struct link 00047 { 00049 struct task *prod; 00051 struct task *cons; 00052 //char *name; 00054 cfifo_t(int)* buffer; 00055 }; 00057 typedef struct link link_t; 00059 typedef link_t* link_tp; 00060 00062 #define STRUCT_T link_tp 00063 #include <pelib/structure.h> 00064 #define DONE_link_tp 1 00065 00067 #define ARRAY_T link_tp 00068 #include <pelib/array.h> 00069 #define DONE_array_link_tp 1 00070 00071 #endif // LINK_T