Add atomic_inc()/atomic_dec(), and use them to replace gc_running_mutex
authorSimon Marlow <marlowsd@gmail.com>
Fri, 24 Jul 2009 14:26:20 +0000 (14:26 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 24 Jul 2009 14:26:20 +0000 (14:26 +0000)
commit2da67673279cf015ccc84270f6fd7935f64261a6
treede71a6db993ba5c4e53fcc6cc29864bb9fa911dd
parentb62f4e789fa4aea34ce6e857d512905054023417
Add atomic_inc()/atomic_dec(), and use them to replace gc_running_mutex
This also fixes a memory leak on Windows with -threaded, because we
were calling initMutex(&gc_running_mutex) for each GC, which allocates
memory.
includes/SMP.h
rts/sm/GC.c