<ahref="chmboxes_8c.html">Go to the documentation of this file.</a><divclass="fragment"><preclass="fragment"><aname="l00001"></a>00001 <spanclass="comment">/*</span>
<aname="l00059"></a>00059 <spanclass="preprocessor">#include "<aclass="code"href="ch_8h.html"title="ChibiOS/RT main include file.">ch.h</a>"</span>
<aname="l00075"></a>00075 <aclass="code"href="group__semaphores.html#gafe8fc6155a871074e8017efd908b2c58"title="Initializes a semaphore with the specified counter value.">chSemInit</a>(&mbp->mb_emptysem, n);
<aname="l00076"></a>00076 <aclass="code"href="group__semaphores.html#gafe8fc6155a871074e8017efd908b2c58"title="Initializes a semaphore with the specified counter value.">chSemInit</a>(&mbp->mb_fullsem, 0);
<aname="l00092"></a>00092 <aclass="code"href="group__semaphores.html#gae7972b6b22b80ac09bac5a186277ab81"title="Performs a reset operation on the semaphore.">chSemResetI</a>(&mbp->mb_emptysem, mbp->mb_top - mbp->mb_buffer);
<aname="l00093"></a>00093 <aclass="code"href="group__semaphores.html#gae7972b6b22b80ac09bac5a186277ab81"title="Performs a reset operation on the semaphore.">chSemResetI</a>(&mbp->mb_fullsem, 0);
<aname="l00094"></a>00094 <aclass="code"href="group__scheduler.html#ga4e38b4bee3d2330f6a0f1cdb7660af20"title="Performs a reschedule if a higher priority thread is runnable.">chSchRescheduleS</a>();
<aname="l00095"></a>00095 <aclass="code"href="group__system.html#ga5a257fa58a09815eb64a45e2dfbdc22e"title="Leaves the kernel lock mode.">chSysUnlock</a>();
<aname="l00115"></a><aclass="code"href="group__mailboxes.html#ga9bafcc634765886f59cf68c0e35d070d">00115</a><aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="group__mailboxes.html#ga9bafcc634765886f59cf68c0e35d070d"title="Posts a message into a mailbox.">chMBPost</a>(Mailbox *mbp, <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> msg, <aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time) {
<aname="l00116"></a>00116 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> rdymsg;
<aname="l00117"></a>00117
<aname="l00118"></a>00118 <aclass="code"href="group__system.html#ga9f6573c0763d1e4e97c63c62edad6e42"title="Enters the kernel lock mode.">chSysLock</a>();
<aname="l00119"></a>00119 rdymsg = <aclass="code"href="group__mailboxes.html#gac6514c185ae87c2633132478ea48d689"title="Posts a message into a mailbox.">chMBPostS</a>(mbp, msg, time);
<aname="l00120"></a>00120 <aclass="code"href="group__system.html#ga5a257fa58a09815eb64a45e2dfbdc22e"title="Leaves the kernel lock mode.">chSysUnlock</a>();
<aname="l00141"></a><aclass="code"href="group__mailboxes.html#gac6514c185ae87c2633132478ea48d689">00141</a><aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="group__mailboxes.html#gac6514c185ae87c2633132478ea48d689"title="Posts a message into a mailbox.">chMBPostS</a>(Mailbox *mbp, <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> msg, <aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time) {
<aname="l00142"></a>00142 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> rdymsg;
<aname="l00146"></a>00146 rdymsg = <aclass="code"href="group__semaphores.html#ga924ec5d191bb8debe8727ae4dd5d6d03"title="Performs a wait operation on a semaphore with timeout specification.">chSemWaitTimeoutS</a>(&mbp->mb_emptysem, time);
<aname="l00151"></a>00151 <aclass="code"href="group__semaphores.html#gaca0b70cf495a9cb7569e1cf5b07e2b3d"title="Performs a signal operation on a semaphore.">chSemSignalI</a>(&mbp->mb_fullsem);
<aname="l00152"></a>00152 <aclass="code"href="group__scheduler.html#ga4e38b4bee3d2330f6a0f1cdb7660af20"title="Performs a reschedule if a higher priority thread is runnable.">chSchRescheduleS</a>();
<aname="l00174"></a><aclass="code"href="group__mailboxes.html#ga55c5b8890b78127bc1fa5a324252d5e6">00174</a><aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="group__mailboxes.html#ga55c5b8890b78127bc1fa5a324252d5e6"title="Posts an high priority message into a mailbox.">chMBPostAhead</a>(Mailbox *mbp, <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> msg, <aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time) {
<aname="l00175"></a>00175 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> rdymsg;
<aname="l00176"></a>00176
<aname="l00177"></a>00177 <aclass="code"href="group__system.html#ga9f6573c0763d1e4e97c63c62edad6e42"title="Enters the kernel lock mode.">chSysLock</a>();
<aname="l00178"></a>00178 rdymsg = <aclass="code"href="group__mailboxes.html#gaa9c91c0b781bec0df3540407d75b1bb3"title="Posts an high priority message into a mailbox.">chMBPostAheadS</a>(mbp, msg, time);
<aname="l00179"></a>00179 <aclass="code"href="group__system.html#ga5a257fa58a09815eb64a45e2dfbdc22e"title="Leaves the kernel lock mode.">chSysUnlock</a>();
<aname="l00200"></a><aclass="code"href="group__mailboxes.html#gaa9c91c0b781bec0df3540407d75b1bb3">00200</a><aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="group__mailboxes.html#gaa9c91c0b781bec0df3540407d75b1bb3"title="Posts an high priority message into a mailbox.">chMBPostAheadS</a>(Mailbox *mbp, <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> msg, <aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time) {
<aname="l00201"></a>00201 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> rdymsg;
<aname="l00205"></a>00205 rdymsg = <aclass="code"href="group__semaphores.html#ga924ec5d191bb8debe8727ae4dd5d6d03"title="Performs a wait operation on a semaphore with timeout specification.">chSemWaitTimeoutS</a>(&mbp->mb_emptysem, time);
<aname="l00210"></a>00210 <aclass="code"href="group__semaphores.html#gaca0b70cf495a9cb7569e1cf5b07e2b3d"title="Performs a signal operation on a semaphore.">chSemSignalI</a>(&mbp->mb_fullsem);
<aname="l00211"></a>00211 <aclass="code"href="group__scheduler.html#ga4e38b4bee3d2330f6a0f1cdb7660af20"title="Performs a reschedule if a higher priority thread is runnable.">chSchRescheduleS</a>();
<aname="l00233"></a><aclass="code"href="group__mailboxes.html#ga61543bf11d0caa737f5818c67548c055">00233</a><aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="group__mailboxes.html#ga61543bf11d0caa737f5818c67548c055"title="Retrieves a message from a mailbox.">chMBFetch</a>(Mailbox *mbp, <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> *msgp, <aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time) {
<aname="l00234"></a>00234 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> rdymsg;
<aname="l00235"></a>00235
<aname="l00236"></a>00236 <aclass="code"href="group__system.html#ga9f6573c0763d1e4e97c63c62edad6e42"title="Enters the kernel lock mode.">chSysLock</a>();
<aname="l00237"></a>00237 rdymsg = <aclass="code"href="group__mailboxes.html#gadc562242a8854497a1f9539cb9ffea09"title="Retrieves a message from a mailbox.">chMBFetchS</a>(mbp, msgp, time);
<aname="l00238"></a>00238 <aclass="code"href="group__system.html#ga5a257fa58a09815eb64a45e2dfbdc22e"title="Leaves the kernel lock mode.">chSysUnlock</a>();
<aname="l00259"></a><aclass="code"href="group__mailboxes.html#gadc562242a8854497a1f9539cb9ffea09">00259</a><aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a><aclass="code"href="group__mailboxes.html#gadc562242a8854497a1f9539cb9ffea09"title="Retrieves a message from a mailbox.">chMBFetchS</a>(Mailbox *mbp, <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> *msgp, <aclass="code"href="group__types.html#gae3e32a98d431a02106616da3071832dd"title="System Time, recommended fastest unsigned.">systime_t</a> time) {
<aname="l00260"></a>00260 <aclass="code"href="group__types.html#ga35bcb0c321cd7bc45bf1a11fa17ebdd3"title="Message, use signed pointer equivalent.">msg_t</a> rdymsg;
<aname="l00264"></a>00264 rdymsg = <aclass="code"href="group__semaphores.html#ga924ec5d191bb8debe8727ae4dd5d6d03"title="Performs a wait operation on a semaphore with timeout specification.">chSemWaitTimeoutS</a>(&mbp->mb_fullsem, time);
<aname="l00269"></a>00269 <aclass="code"href="group__semaphores.html#gaca0b70cf495a9cb7569e1cf5b07e2b3d"title="Performs a signal operation on a semaphore.">chSemSignalI</a>(&mbp->mb_emptysem);
<aname="l00270"></a>00270 <aclass="code"href="group__scheduler.html#ga4e38b4bee3d2330f6a0f1cdb7660af20"title="Performs a reschedule if a higher priority thread is runnable.">chSchRescheduleS</a>();
Generated on Sun Nov 28 2010 14:09:48 for ChibiOS/RT by <ahref="http://www.doxygen.org/index.html"><imgsrc="doxygen.png"alt="doxygen"align="middle"border="0"></a> 1.7.1</small></address>