lkml.org 
[lkml]   [2004]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [RFC] Splitting kernel headers and deprecating __KERNEL__
    Date
    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/

    \
     
     \ /
      Last update: 2005-03-22 14:08    [W:3.715 / U:0.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site