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