From: razvanm Date: Wed, 19 Aug 2009 17:52:10 +0000 (+0000) Subject: Fix the async warnings in FcfsResourceQueue (committed on behalf of Stephen Dawson... X-Git-Tag: rc_6_tinyos_2_1_1~334 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=378dc938879e15711945c6d4c7ce832c23593c41 Fix the async warnings in FcfsResourceQueue (committed on behalf of Stephen Dawson-Haggerty) --- diff --git a/tos/system/FcfsResourceQueueC.nc b/tos/system/FcfsResourceQueueC.nc index 565ba25f..23e41dd2 100644 --- a/tos/system/FcfsResourceQueueC.nc +++ b/tos/system/FcfsResourceQueueC.nc @@ -48,11 +48,11 @@ implementation { } async command bool FcfsQueue.isEmpty() { - return (qHead == NO_ENTRY); + atomic return (qHead == NO_ENTRY); } async command bool FcfsQueue.isEnqueued(resource_client_id_t id) { - return resQ[id] != NO_ENTRY || qTail == id; + atomic return resQ[id] != NO_ENTRY || qTail == id; } async command resource_client_id_t FcfsQueue.dequeue() {