X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Fsystem%2FFcfsResourceQueueC.nc;h=23e41dd26a5c4077b7f11f6a9dadd3e266253c9d;hp=565ba25fca0f96297bf7b7c4ad4ef81b1a92c41e;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hpb=adf1de6c009d13b7b52e68535c63b28f59c97400 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() {