Pumpkin, Inc.

Pumpkin User Forums

SB-7: Salvo: Incorrect Detection of Timed Out Status

Service Bulletins -- outlining known problems and how to handle them -- are posted here.

SB-7: Salvo: Incorrect Detection of Timed Out Status

Postby Salvo Tech Support » Fri Jul 13, 2001 11:17 am

Applies To

Salvo v2.2.1 and earlier.

Description of Problem

In instances where a task waits on multiple events with timeouts, the occurrence of the timeout may be incorrectly detected by OSTimedOut().

For example, in this code snippet:

OS_WaitBinSem(BINSEM1_P, timeout1, label1);
if ( OSTimedOut() ) {
/* A: handle timeout from binsem1 */

OS_WaitBinSem(BINSEM2_P, timeout2, label2);
if ( OSTimedOut() ) {
/* B: handle timeout from binsem2 */

a timeout will be (incorrectly) detected at point B if the first call to OS_WaitBinSem() times out AND binsem2 is available. In this case, OSTimedOut() will be TRUE at points A and B even though there was no timeout while waiting for binsem2.

Suggested Workaround

In the user source code for tasks that have multiple calls to OS_WaitXyz(), add the following line immediately before each call to OS_WaitXyz():

OScTcbP->u.runStatus = OScTcbP->status.bits;

Fixed In
Salvo v3.0.0.

[This message has been edited by Salvo Tech Support (edited January 13, 2002).]

Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am

Return to Service Bulletins

Who is online

Users browsing this forum: No registered users and 1 guest