--- libaitio/inc/aitsess.h 2013/03/19 17:02:58 1.2.2.1 +++ libaitio/inc/aitsess.h 2013/06/26 22:48:53 1.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsess.h,v 1.2.2.1 2013/03/19 17:02:58 misho Exp $ +* $Id: aitsess.h,v 1.5 2013/06/26 22:48:53 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -50,6 +50,7 @@ SUCH DAMAGE. #include #include #include +#include #define SHARED_UNKNOWN -1 #define SHARED_IPC 0 @@ -104,12 +105,12 @@ typedef struct tagSess { (s)->sess.create((sd), (siz), (s), ## __VA_ARGS__)) #define ATTACH_MEMORY(s) (assert((s) && (s)->sess.attach), (s)->sess.attach((s), NULL)) #define DETACH_MEMORY(s) (assert((s) && (s)->sess.detach), (s)->sess.detach((s))) -#define FREE_MEMORY(s) (assert((s) && (s)->sess.destroy); (s)->sess.destroy((s))) +#define FREE_MEMORY(s) (assert((s) && (s)->sess.destroy), (s)->sess.destroy((s))) #define IS_SEMOK(s) (assert((s) && (s)->sess.isSemOK), (s)->sess.isSemOK((s))) #define INC_SEM(s) (assert((s) && (s)->sess.incSem), (s)->sess.incSem((s))) #define DEC_SEM(s) (assert((s) && (s)->sess.decSem), (s)->sess.decSem((s))) -#define NOT_SEM(s) (assert((s) && (s)->sess.notSem); (s)->sess.notSem((s))) +#define NOT_SEM(s) (assert((s) && (s)->sess.notSem), (s)->sess.notSem((s))) /* --------------------------------------------------------- */ @@ -206,7 +207,7 @@ void ipc_detachSession(sess_t * __restrict s); * @s = Session item * return: -1 null session item, 0 not attached, 1 attached memory */ -inline int sess_isAttached(sess_t * __restrict s); +int sess_isAttached(sess_t * __restrict s); /*