Messages in this thread | | | From | Kevin Puetz <> | Subject | Re: [RFC] Splitting kernel headers and deprecating __KERNEL__ | Date | Sun, 28 Nov 2004 10:34:46 -0600 |
| |
Arjan van de Ven wrote:
> implementing your own is still evil, but glibc provides similar > constructs already. busy waiting in userspace is evil anyway (use futex > :) and.... just as with atomic.h, spinlock.h only gets compiled in for > CONFIG_SMP so the same caveats apply
Yeah, this is on it's way out now that futexes exist, but KDE (for one) used to use spinlocks for a thread-pooled malloc (spin-sleep-spin-sleep though, calling either sched_yield or nanosleep if the lock-grab failed - so it wasn't a pure busy-wait). It didn't reuse spinlock.h from the kernel, but it did use the general concept, since the old pre-futex posix mutexes were crazy-slow for a lock which was heavily used but rarely contended.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |