X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fmsg.h;h=6cbcc444e371a98bb540a46bbca97af60f157fe8;hb=1c11ac0ab0636d07db3899b02c5d89e2d0b020bc;hp=05bbd7ef18c174782f6f368b3c3f7e2f595179cc;hpb=dd721d44c920f204cef12601141a609a87ab4398;p=bertos.git diff --git a/bertos/kern/msg.h b/bertos/kern/msg.h index 05bbd7ef..6cbcc444 100644 --- a/bertos/kern/msg.h +++ b/bertos/kern/msg.h @@ -32,16 +32,14 @@ * --> * * - * This module implements a common system for executing - * a user defined action calling a hook function. - * - * \version $Id$ - * - * \author Bernie Innocenti + * \defgroup kern_msg Message box IPC + * \ingroup kern + * \{ * * \brief Simple inter-process messaging system * - * Handle queues of messages associated an action. + * This module implements a common system for executing + * a user defined action calling a hook function. * * A message port is an abstraction used to exchange information * asynchronously between processes or other entities such as @@ -67,6 +65,11 @@ * receiver wakes up, it usually invokes msg_get() to pick * the next message from the port. * + * \note + * When you put a message into a port, such message becomes + * unavailable until you retrieve it using msg_get(), eg. + * you must not delete it or put it into another port. + * * Message ports can hold any number of pending messages, * and receivers usually process them in FIFO order. * Other scheduling policies are possible, but not implemented @@ -106,7 +109,7 @@ * } TestMsg; * * - * static cpu_stack_t sender_stack[CONFIG_KERN_MINSTACKSIZE / sizeof(cpu_stack_t)]; + * PROC_DEFINE_STACK(sender_stack, KERN_MINSTACKSIZE); * * // A process that sends two messages and waits for replies. * static void sender_proc(void) @@ -174,6 +177,11 @@ * } * } * \endcode + * + * \author Bernie Innocenti + * + * $WIZ$ module_name = "msg" + * $WIZ$ module_depends = "event", "signal", "kernel" */ @@ -283,4 +291,10 @@ INLINE void msg_reply(Msg *msg) msg_put(msg->replyPort, msg); } +/** \} */ //defgroup kern_msg + +int msg_testRun(void); +int msg_testSetup(void); +int msg_testTearDown(void); + #endif /* KERN_MSG_H */