22
33 @file IntrOS: os_box.h
44 @author Rajmund Szymanski
5- @date 24.01 .2017
5+ @date 04.03 .2017
66 @brief This file contains definitions for IntrOS.
77
88 ******************************************************************************
@@ -52,7 +52,7 @@ struct __box
5252 unsigned size; // size of a single mail (in bytes)
5353};
5454
55- typedef struct __box box_t , box_id[ 1 ] ;
55+ typedef struct __box box_t , * box_id;
5656
5757/* *********************************************************************************************************************
5858 * *
@@ -108,7 +108,7 @@ typedef struct __box box_t, box_id[1];
108108
109109#define OS_BOX ( box, limit, size ) \
110110 char box##__buf[limt * size]; \
111- box_id box = { _BOX_INIT ( limit, size, box##__buf ) }
111+ box_t box[ 1 ] = { _BOX_INIT ( limit, size, box##__buf ) }
112112
113113/* *********************************************************************************************************************
114114 * *
@@ -125,7 +125,7 @@ typedef struct __box box_t, box_id[1];
125125
126126#define static_BOX ( box, limit, size ) \
127127 static char box##__buf[limt * size]; \
128- static box_id box = { _BOX_INIT ( limit, size, box##__buf ) }
128+ static box_t box[ 1 ] = { _BOX_INIT ( limit, size, box##__buf ) }
129129
130130/* *********************************************************************************************************************
131131 * *
@@ -166,7 +166,7 @@ typedef struct __box box_t, box_id[1];
166166
167167#ifndef __cplusplus
168168#define BOX_CREATE ( limit, size ) \
169- { BOX_INIT ( limit, size ) }
169+ & ( box_t ) BOX_INIT( limit, size )
170170#endif
171171
172172/* *********************************************************************************************************************
0 commit comments