[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] kern/lock.h: XXX quiet GCC warnings about set but unused
From: |
Marin Ramesa |
Subject: |
Re: [PATCH 2/2] kern/lock.h: XXX quiet GCC warnings about set but unused variables during simple locks |
Date: |
Mon, 09 Dec 2013 08:37:01 +0100 |
On 02.12.2013 09:14:36, Marin Ramesa wrote:
> * kern/lock.h (decl_simple_lock_data): Define macro.
> (simple_unlock): Define so that lock is assigned to itself and add a
> comment saying why this was done.
> (simple_lock_try): Define so that lock data is cast to a boolean with
> the value TRUE and assigned to itself. Add a comment saying why this
> was done.
> * kern/sched_prim.c [!MACH_SLOCKS] (lock): Declare and initialize.
Samuel, if you have the time, please take a look at this patch. I'm
interested in your opinion.
I'm optimistic about it. It removes two GCC warnings and it does not
effect the cases where simple locks are actually used.