Date: Mon, 26 Aug 2013 14:25:34 -0400 From: John Baldwin <jhb@freebsd.org> To: Alexander Motin <mav@freebsd.org> Cc: svn-src-projects@freebsd.org, Adrian Chadd <adrian@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org> Subject: Re: svn commit: r254846 - projects/camlock/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201308261425.34743.jhb@freebsd.org> In-Reply-To: <521A06A2.7050807@FreeBSD.org> References: <201308251121.r7PBLA3v033536@svn.freebsd.org> <CAJ-VmomGUoQco04RCPuc1iA%2B1qecPqzBb_u8PBKiTL-Y0SaMkQ@mail.gmail.com> <521A06A2.7050807@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308261425.34743.jhb>