Marin Ramesa, le Thu 05 Dec 2013 22:03:46 +0100, a écrit :
> * kern/debug.c (Assert_print_lock): Initialize the lock.
It is actually initialized to zero, which happens to be the correct
value.
> @@ -58,6 +58,7 @@ void
> Assert(char *exp, char *file, int line)
> {
> #if NCPUS > 1
> + simple_lock_init(&Assert_print_lock);
> simple_lock(&Assert_print_lock);
This is always wrong to initialize a mutex just before locking it: it
will always be available, since it has just been initialized...
> printf("{%d} Assertion failed: file \"%s\", line %d\n",
> cpu_number(), file, line);
> --
> 1.8.1.4
>
>
--
Samuel
<N> (* If you have a precise idea of the intended use of the following code,
please
<N> write to [email protected] and ask for the prize :-)
<N> -- Eduardo (11/8/97) *)
-+- N sur #ens-mim - et c'était un des développeurs -+-