#ifndef __COMM_H_ #define __COMM_H_ 1 #include #include /* Non standart include */ #include #define READ_IDX 0 #define WRITE_IDX 1 struct communication_assoc { struct communication_assoc *next; struct communication_assoc *prev; pthread_t tid; int *pipefd; struct communication_channel *channel; int receiver_idx; }; __BEGIN_DECLS extern __thread int pipefd[]; extern struct communication_assoc assoc_root; struct communication_assoc *create_comm_assoc(void); static inline void send(void *addr) { write(pipefd[WRITE_IDX], &addr, sizeof(void *)); } __END_DECLS #endif