Re: fix for libpthread

From: Craig Rodrigues <rodrigc_at_crodrigues.org>
Date: Wed, 3 Mar 2004 12:32:40 -0500
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
Received on Wed Mar 03 2004 - 08:32:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:45 UTC