Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 624 → Rev 625

/kernel/trunk/generic/src/synch/spinlock.c
45,7 → 45,7
*/
void spinlock_initialize(spinlock_t *sl, char *name)
{
sl->val = 0;
atomic_set(&sl->val, 0);
#ifdef CONFIG_DEBUG_SPINLOCK
sl->name = name;
#endif
151,7 → 151,7
*/
void spinlock_unlock(spinlock_t *sl)
{
ASSERT(sl->val != 0);
ASSERT(atomic_get(&sl->val) != 0);
 
/*
* Prevent critical section code from bleeding out this way down.
158,7 → 158,7
*/
CS_LEAVE_BARRIER();
sl->val = 0;
atomic_set(&sl->val,0);
preemption_enable();
}