Subject: Re: CVS commit: src/sys/dev/onewire
To: Antti Kantee <pooka@cs.hut.fi>
From: Juan RP <juan@xtrarom.org>
List: source-changes
Date: 09/02/2007 13:16:18
On Sun, 2 Sep 2007 12:33:18 +0300
Antti Kantee <pooka@cs.hut.fi> wrote:
> You changed the return value of onewire_lock, now 0 is both for success
> and failure.
But rw_enter() will always succeed, isn't it? I'm returning the
value of rw_tryenter() when ONEWIRE_NOWAIT is specified in flags.
The only thing I can suggest is to change this func to return void and
don't use rw_tryenter(). owtemp(4) is using onewire_lock() without
paying attention to the return value anyway...
> Also, is there some reason for using a reader/writer lock when it's
> always locked exclusively?
I used an exclusive rwlock to respect previous behavior.
Are you suggesting to change it?
--
Juan Romero Pardines - The NetBSD Project
http://plog.xtrarom.org - NetBSD/pkgsrc news in Spanish