Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00021 #ifndef MESH_COMM_H
00022 #define MESH_COMM_H
00023
00024
00025 #define SD_INACTIVE 0
00026 #define SD_SHARED 1
00027 #define SD_EXCLUSIVE 2
00028 #define SD_EXCLUSIVE_REQ 3
00029 #define SD_EXCLUSIVE_RDY 4
00030
00031
00032 #define NO_BLOCKING 0
00033 #define BLOCK_THREAD 1
00034 #define BLOCK_RESOURCE 2
00035
00036
00037 #define READ_ACCESS 0
00038 #define WRITE_ACCESS 1
00039
00052 void mesh_comm_write(gchar *comm_thread,
00053 void* arg,
00054 mesh_shared_data *msd,
00055 gint blocking_mode);
00056
00063 void mesh_comm_write_delayed(gchar *comm_thread,
00064 void* arg,
00065 mesh_shared_data *msd,
00066 gint blocking_mode);
00067
00079 void mesh_comm_read(gchar *comm_thread,
00080 void* arg,
00081 mesh_shared_data *msd,
00082 gint blocking_mode);
00083
00089 void mesh_comm_read_delayed(gchar *comm_thread,
00090 void* arg,
00091 mesh_shared_data *msd,
00092 gint blocking_mode);
00093
00105 void mesh_create_comm_thread(gchar *name,
00106 mesh_scheduler *cs,
00107 void*(*thread)(void*));
00108
00109 mesh_scheduler* mesh_create_comm_scheduler(gchar *name);
00110
00111
00112 void mesh_shared_set_write(mesh_shared_data *msd);
00113
00114
00115 void mesh_shared_end_write(mesh_shared_data *msd);
00116
00117
00118 void mesh_shared_set_read(mesh_shared_data *msd);
00119
00120
00121 void mesh_shared_end_read(mesh_shared_data *msd);
00122
00123
00124
00125 mesh_shared_data*
00126 mesh_create_shared_data(void *data);
00127
00128
00129
00130 void
00131 mesh_comm_read_write_helper(mesh_thread *calling_thread,
00132 gchar *comm_thread,
00133 mesh_comm_thread_data *mctd,
00134 gchar *thread_name,
00135 gboolean blocking);
00136 #endif