tech-kern archive

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

Re: RFC: localcount_hadref() or localcount_trydarin()

> Date: Fri, 9 Jun 2017 16:50:18 +0900
> From: Kengo NAKAHARA <>
> I tried using localcount(9) for opencyrpto(9) to avoid detach encryption
> drivers. While I implement that, I want to something to use KASSERT which
> ensure someone have reference or not.
> In addition, localcount_drain() waits forever if someone has had reference.
> So, I want to function which returns in not so long time regardless of
> someone has reference or not. In other words, I want some function like
> mutex_tryenter() for mutex_enter().

This sounds questionable to me.  If there is a reference remaining
that does not drain in a bounded time, that sounds like a bug that
should be addressed some other way.  Can you explain how you want to
use this?  Can you share preliminary diffs to opencrypto code with
localcount that motivate this?

Home | Main Index | Thread Index | Old Index