bug fix: busy-waiting before checking data length

This commit is contained in:
fros4943 2006-10-05 07:46:53 +00:00
parent eb0b2f137e
commit ad08af59f0

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id: radio-arch.c,v 1.2 2006/10/02 15:06:12 fros4943 Exp $ * $Id: radio-arch.c,v 1.3 2006/10/05 07:46:53 fros4943 Exp $
*/ */
#include "dev/radio-arch.h" #include "dev/radio-arch.h"
@ -68,14 +68,14 @@ doInterfaceActionsBeforeTick(void)
return; return;
} }
// If no incoming radio data, do nothing // Busy-wait while receiving (in main file)
if (simInSize == 0) { if (simReceiving) {
busyWaitNext = 1;
return; return;
} }
// Busy-wait while receiving (in main file) // If no incoming radio data, do nothing
while (simReceiving) { if (simInSize == 0) {
busyWaitNext = 1;
return; return;
} }