//rcxmsg.nqh //A collection of macros implementing intertask messaging for NQC // //This file is part of the NQCIPC package and should not be //distributed separately. See // http://www.geocities.com/ResearchTriangle/Station/2266/nqcipc/nqcipcdoc.html // //for details. // //(c)1999 Brian Connors under terms of the MPL //contact: connorbd@yahoo.com //messages version #define MSGVER 2 //notational convenience #define msg int //message operations //msg_clear -- clears a specified message buffer b #define msg_clear(b) b = 0; //msg_send -- places a value m in a specified message buffer b #define msg_send(b,m) b = m; //msg_await -- watches message buffer b, then blocks until // an expected value m appears #define msg_await(b,m) until (b == m); //msg_read -- takes the contents of message buffer b and copies // to specified variable v #define msg_read(b,v) v = b; //msg_biff -- is there a message in the first place? #define msg_biff(b) b > 0