diff --git a/paw/stos/ob/ob.c b/paw/stos/ob/ob.c index 07b6b67..dcd811f 100644 --- a/paw/stos/ob/ob.c +++ b/paw/stos/ob/ob.c @@ -10,6 +10,7 @@ #include #include #include +#include ST_STATUS ObCreateDirectory(const CHAR *Name, ST_OBJECT **Result) @@ -93,9 +94,7 @@ ObReclaimObject(ST_OBJECT *Object) return; } - /* TODO: Decrement this atomically */ - Object->RefCount -= 1; - if (Object->RefCount == 0) { + if (AtomicDecLong(&Object->RefCount) == 0) { ObReclaimToCache(&gObCache, Object); } }