KSE headache: Spinlock called when not threaded

Kyryll A Mirnenko mirya at innovativemarketing.com.ua
Mon Nov 8 10:38:54 PST 2004


I found out some apps recompiled with KSE libpthread (not from ports, just by 
myself from original sources) are terminated with this message while worked 
fine for libc_r; here's the source (lib/libpthread/thr_spinlock.c):

void
_spinlock(spinlock_t *lck)
{
        struct spinlock_extra *extra;

        if (!__isthreaded)
                PANIC("Spinlock called when not threaded.");
        if (!initialized)
                PANIC("Spinlocks not initialized.");
        /*
         * Try to grab the lock and loop if another thread grabs
         * it before we do.
         */
        if (lck->fname == NULL)
                init_spinlock(lck);
        extra = (struct spinlock_extra *)lck->fname;
        pthread_mutex_lock(&extra->lock);
}

Removing the 1st check works for most apps, but some of 'em (xmms is the one) 
hang up there; can anyone tell me what can be wrong there?
--------------
Regards, Mirya
ICQ #313898202


More information about the freebsd-questions mailing list