<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>RTX51-Tiny:  os_wait2(..) return question</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/18483/rtx51-tiny-os_wait2-return-question</link><description> If I call os_wait2(..) as listed in the example below, and if subsequently another task signals MyTask() AND it times out, what will the return value be? The manual states the return value will be a manifest constant identifying the event that restarted</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: RTX51-Tiny:  os_wait2(..) return question</title><link>https://community.arm.com/thread/73682?ContentTypeID=1</link><pubDate>Thu, 08 Dec 2005 10:00:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6378878e-bdd5-48ad-bbb9-8d8e7fd52ede</guid><dc:creator>Robert Wey</dc:creator><description>&lt;p&gt;Well, as it turns out, I did resort to some experimentation.  As in the original example above, I performed the os_wait2(..) specifying K_SIG | K_TMO for the event types, then I let another task a) delay long enough for the first task&amp;#39;s timeout to expire, then b) I signaled it.  ( I also swapped the order of a and b around as well).&lt;br /&gt;
&lt;br /&gt;
In both instances, upon return to the original task, its return type indicated SIG_EVENT.  Thus, I conclude K_SIG takes priority.&lt;br /&gt;
&lt;br /&gt;
Now, is this &amp;quot;proof&amp;quot; that K_SIG takes priority?  Only so far as the accuracy of the experiment.  I would have a much greater feeling of confidence in this answer if examination of Tiny&amp;#39;s task switch code verified the conclusion as well.  That area of the source code, however, isn&amp;#39;t too straight forward.&lt;br /&gt;
&lt;br /&gt;
Perhaps if one of Kiel&amp;#39;s tech support personnel read this, they can confirm or deny what I found.&lt;br /&gt;
&lt;br /&gt;
Thanks to everyone for you help and suggestions.&lt;br /&gt;
&lt;br /&gt;
R. Wey&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTX51-Tiny:  os_wait2(..) return question</title><link>https://community.arm.com/thread/45157?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2005 18:19:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6b097133-6f5c-4cbf-b921-51a7f91b240a</guid><dc:creator>Drew Davis</dc:creator><description>&lt;p&gt;For a really detailed question like this, you might want to email tech support.  Officially, this forum is for users and not Keil&amp;#39;s means of tech support.&lt;br /&gt;
&lt;br /&gt;
(Unless someone in the general user base happens to already have asked that question, it&amp;#39;s not likely that they&amp;#39;ll know answers about implementation details that aren&amp;#39;t in the manual or easily discoverable by experiment.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTX51-Tiny:  os_wait2(..) return question</title><link>https://community.arm.com/thread/111828?ContentTypeID=1</link><pubDate>Wed, 07 Dec 2005 11:57:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ababbd07-f32e-4d8b-bfa0-1a76fcb0ce05</guid><dc:creator>Robert Wey</dc:creator><description>&lt;p&gt;That states that the &amp;quot;event_sel&amp;quot; input parameter may be ORed, but it says nothing about the reply being an ORed combination of more than one value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTX51-Tiny:  os_wait2(..) return question</title><link>https://community.arm.com/thread/84507?ContentTypeID=1</link><pubDate>Tue, 06 Dec 2005 16:36:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6ad8ae46-feb5-4b2f-8606-893ec636968f</guid><dc:creator>Roman Horvath</dc:creator><description>&lt;p&gt;See at&lt;br /&gt;
&lt;a href="http://www.keil.com/support/man/docs/tr51/tr51_os_wait.htm"&gt;http://www.keil.com/support/man/docs/tr51/tr51_os_wait.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The os_wait return value may be or-ed with all of posible return values at once. You must bit-check all possible events from the return value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTX51-Tiny:  os_wait2(..) return question</title><link>https://community.arm.com/thread/73681?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2005 11:21:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b1cfc0be-f036-4d9c-ab93-e3f65ec6d519</guid><dc:creator>Robert Wey</dc:creator><description>&lt;p&gt;I suppose its not possible for both of them to occur at precisely the same time, but it is certainly possible for both of them to occur before RTX returns control back to the task.  Thus the original question:  which event, if any, takes priority with respect to the return value from the wait function?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTX51-Tiny:  os_wait2(..) return question</title><link>https://community.arm.com/thread/73679?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2005 11:18:25 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:67dd2a7b-f17f-4b31-ab07-5000cd1ba492</guid><dc:creator>Robert Wey</dc:creator><description>&lt;p&gt;So lets say the task times out, but before RTX returns to it, another task signals it as well.  Will it miss the signal?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTX51-Tiny:  os_wait2(..) return question</title><link>https://community.arm.com/thread/45162?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2005 08:11:18 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:47c4740f-e8d1-4121-9f79-28e33f7194af</guid><dc:creator>Andy Maes</dc:creator><description>&lt;p&gt;It is not possible for both events to occur at the same time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>