machinarium: move msg structure into separate file

This commit is contained in:
Dmitry Simonenko 2017-05-22 15:58:57 +03:00
parent 0dcb0649b9
commit 23e44ab787
2 changed files with 19 additions and 8 deletions

19
src/mm_msg.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef MM_MSG_H_
#define MM_MSG_H_
/*
* machinarium.
*
* cooperative multitasking engine.
*/
typedef struct mm_msg_t mm_msg_t;
struct mm_msg_t {
uint16_t refs;
int type;
void *data;
mm_list_t link;
};
#endif

View File

@ -7,16 +7,8 @@
* cooperative multitasking engine.
*/
typedef struct mm_msg_t mm_msg_t;
typedef struct mm_msgpool_t mm_msgpool_t;
struct mm_msg_t {
uint16_t refs;
int type;
void *data;
mm_list_t link;
};
struct mm_msgpool_t {
pthread_spinlock_t lock;
mm_list_t list;