X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=kern%2Fmsg.h;h=3fa6a146bd595ba26befe6545d7c42a8e34b6ec4;hb=2535cb94ec2183791128f8bbd109ca69a960cf78;hp=eb67b2e9c18cc8b3f3ecfd1ec4b2d6968db960f3;hpb=3e6b31b794c1183b88031964c3694a0a800be677;p=bertos.git diff --git a/kern/msg.h b/kern/msg.h old mode 100755 new mode 100644 index eb67b2e9..3fa6a146 --- a/kern/msg.h +++ b/kern/msg.h @@ -1,9 +1,34 @@ -/*! +/** * \file * * * \brief Simple inter-process messaging system @@ -18,6 +43,15 @@ /*#* *#* $Log$ + *#* Revision 1.9 2006/07/19 12:56:27 bernie + *#* Convert to new Doxygen style. + *#* + *#* Revision 1.8 2005/11/04 16:20:02 bernie + *#* Fix reference to README.devlib in header. + *#* + *#* Revision 1.7 2005/02/09 21:48:30 bernie + *#* Doxygen fixes. + *#* *#* Revision 1.6 2005/01/22 04:20:26 bernie *#* Write extensive documentation; Add simple locking. *#* @@ -44,7 +78,7 @@ #include -/*! +/** * Handle queues of messages associated an action. * * A message port is an abstraction used to exchange information @@ -176,24 +210,24 @@ * } * } * } - * \end code + * \endcode */ typedef struct MsgPort { - List queue; /*!< Messages queued at this port. */ - Event event; /*!< Event to trigger when a message arrives. */ + List queue; /**< Messages queued at this port. */ + Event event; /**< Event to trigger when a message arrives. */ } MsgPort; typedef struct Msg { - Node link; /*!< Link into message port queue. */ - MsgPort *replyPort; /*!< Port to which the msg is to be replied. */ + Node link; /**< Link into message port queue. */ + MsgPort *replyPort; /**< Port to which the msg is to be replied. */ /* User data may follow */ } Msg; -/*! +/** * Lock a message port. * * This is required before reading or manipulating @@ -213,7 +247,7 @@ INLINE void msg_lockPort(MsgPort *port) proc_forbid(); } -/*! +/** * Unlock a message port. * * \see msg_lockPort() @@ -224,14 +258,14 @@ INLINE void msg_unlockPort(MsgPort *port) } -/*! Initialize a message port */ +/** Initialize a message port */ INLINE void msg_initPort(MsgPort *port, Event event) { LIST_INIT(&port->queue); port->event = event; } -/*! Queue \a msg into \a port, triggering the associated event */ +/** Queue \a msg into \a port, triggering the associated event */ INLINE void msg_put(MsgPort *port, Msg *msg) { msg_portLock(port); @@ -241,7 +275,7 @@ INLINE void msg_put(MsgPort *port, Msg *msg) event_do(&port->event); } -/*! +/** * Get the first message from the queue of \a port. * * \return Pointer to the message or NULL if the port was empty. @@ -257,7 +291,7 @@ INLINE Msg *msg_get(MsgPort *port) return msg; } -/* Peek the first message in the queue of \a port, or NULL if the port is empty */ +/** Peek the first message in the queue of \a port, or NULL if the port is empty. */ INLINE Msg *msg_peek(MsgPort *port) { Msg *msg; @@ -271,7 +305,7 @@ INLINE Msg *msg_peek(MsgPort *port) return msg; } -/*! Send back (reply) \a msg to its sender. */ +/** Send back (reply) \a msg to its sender. */ INLINE void msg_reply(Msg *msg) { msg_put(msg->replyPort, msg);