Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/onewire



On Sun, 2 Sep 2007 12:33:18 +0300
Antti Kantee <pooka%cs.hut.fi@localhost> 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



Home | Main Index | Thread Index | Old Index