Browse Source

optimize spinlock spin

rs-1.0
Rich Felker 15 years ago
parent
commit
c322fe4e1a
  1. 2
      src/thread/pthread_spin_lock.c

2
src/thread/pthread_spin_lock.c

@ -2,6 +2,6 @@
int pthread_spin_lock(pthread_spinlock_t *s)
{
while (a_xchg(s, 1));
while (*s || a_xchg(s, 1));
return 0;
}

Loading…
Cancel
Save