Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jun 2017 08:45:21 -0700
From:      Conrad Meyer <cem@freebsd.org>
To:        Jia-Ju Bai <baijiaju1990@163.com>
Cc:        Konstantin Belousov <kostikbel@gmail.com>,  "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Re: A question about in lock usage in FreeBSD
Message-ID:  <CAG6CVpVd-5_7cf5O=egC7cLisag9GCc_MN==EvS8M0i-Q8cS2Q@mail.gmail.com>
In-Reply-To: <5940EA87.4030002@163.com>
References:  <5940EA87.4030002@163.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 14, 2017 at 12:49 AM, Jia-Ju Bai <baijiaju1990@163.com> wrote:
> Namely, it is unsafe that the thread calls the function which may sleep when
> the thread holds mutexes, reader/writer locks or read-mostly locks.
> Is it right?

Correct.  sxlocks ("shared-exclusive," although I tend to think of the
"s" as standing for "sleepable") can be held calling functions which
may sleep.

Best,
Conrad



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpVd-5_7cf5O=egC7cLisag9GCc_MN==EvS8M0i-Q8cS2Q>