fix for libpthread

Craig Rodrigues rodrigc at crodrigues.org
Wed Mar 3 09:32:38 PST 2004


On Wed, Mar 03, 2004 at 04:10:29PM +0800, David Xu wrote:
> >-	if (!__isthreaded)
> >-		PANIC("Spinlock called when not threaded.");
> >	if (!initialized)
> >		PANIC("Spinlocks not initialized.");
> >	/*
> > 
> >
> As I saw some reports in the -CURRENT list,  the panic is always 
> triggered by mix up
> of libc_r and libpthread in same program. So to avoid other mysterious 
> crashes,
> I'd like keep the code there, it is now used to check the problem.


Would it be a good idea to change the wording of this error message to give
the user a better idea of how to fix the problem?

        PANIC("Spinlock called when not threaded.\nPossible problem: program might be linked to both -lpthread and -lc_r, instead of linking only one of them.\n");


Or, something to that effect.

-- 
Craig Rodrigues        
http://crodrigues.org
rodrigc at crodrigues.org


More information about the freebsd-current mailing list