From f41b32acf318e07ea16e8f5be28e84261b13d8e2 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Tue, 27 Feb 2007 15:39:02 +0000 Subject: [PATCH] add lock for smp safety --- lib/base/object.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/base/object.h b/lib/base/object.h index 8ac92b83..67a4606c 100644 --- a/lib/base/object.h +++ b/lib/base/object.h @@ -149,14 +149,14 @@ public: void c::AddRef() \ { \ __asm__ __volatile__( \ - " incl %0 \n" \ + " lock ; incl %0 \n" \ : "=m" (ref.count) \ : "m" (ref.count); \ } \ void c::Release() \ { \ __asm__ __volatile__( \ - " decl %0 \n" \ + " lock ; decl %0 \n" \ : "=m" (ref.count) \ : "m" (ref.count); \ if (!ref) \ -- 2.30.2