svn commit: r254846 - projects/camlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
John Baldwin
jhb at freebsd.org
Mon Aug 26 18:27:58 UTC 2013
On Sunday, August 25, 2013 9:29:06 am Alexander Motin wrote:
> On 25.08.2013 15:48, Adrian Chadd wrote:
> > Surely there's a better way to check whether a thread can sleep besides
> > digging around in curthread->td_no_sleeping ? What about adding an
> > accessor macro along side THREAD_SLEEPING_OK and THREAD_NO_SLEEPING ?
>
> That sounds good to me. I was also surprised such macros are not there
> yet when found some code doing these checks just the same way as I did.
It was never intended to be public, only as a debugging aid for assertions. :(
I had hoped that the calling code would know when it was in an ithread or not
and call different routines as needed (i.e. that the programmer would
intentionally think about the context they were in). Perhaps this is not
realistic? Are you really queueing new I/O from ithreads and/or timers?
--
John Baldwin
More information about the svn-src-projects
mailing list