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 <drake/task.h> 00024 00025 #ifndef CROSS_LINK_BUFFER 00026 #define CROSS_LINK_BUFFER void 00027 #endif 00028 00029 #ifndef CROSS_LINK_H 00030 #define CROSS_LINK_H 00031 00033 struct cross_link 00034 { 00036 link_t *link; 00038 task_status_t *prod_state; 00040 volatile size_t *read; 00042 volatile size_t *write; 00044 size_t available; 00046 size_t total_read, total_written; 00048 volatile CROSS_LINK_BUFFER *buffer; 00050 size_t actual_read, actual_written; 00051 }; 00053 typedef struct cross_link cross_link_t; 00055 typedef cross_link_t* cross_link_tp; 00056 00058 #define STRUCT_T cross_link_tp 00059 #include <pelib/structure.h> 00060 #define DONE_cross_link_tp 1 00061 00063 #define ARRAY_T cross_link_tp 00064 #include <pelib/array.h> 00065 #define DONE_array_cross_link_tp 1 00066 00067 #endif