Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Nov 2014 18:04:03 +0100
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, Jung-uk Kim <jkim@freebsd.org>, Andriy Gapon <avg@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: suspending threads before devices
Message-ID:  <86ppcocs58.fsf@nine.des.no>
In-Reply-To: <CAJ-Vmo=JbMRH0J4jy03sKxeMV-FP7GoE5R--92241rzeMTMo-g@mail.gmail.com> (Adrian Chadd's message of "Sat, 15 Nov 2014 08:41:37 -0800")
References:  <201203202037.q2KKbNfK037014@svn.freebsd.org> <201203211502.14353.jkim@FreeBSD.org> <4F6AF1CB.80902@FreeBSD.org> <201203220748.49635.jhb@freebsd.org> <20120322141436.GC2358@deviant.kiev.zoral.com.ua> <54666FD5.6080705@FreeBSD.org> <20141115105819.GJ17068@kib.kiev.ua> <54676BA6.7000202@FreeBSD.org> <CAJ-Vmo=JbMRH0J4jy03sKxeMV-FP7GoE5R--92241rzeMTMo-g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Adrian Chadd <adrian@freebsd.org> writes:
> Hm, would just creating a suspend kernel thread make it easier?
> Ie, instead of you doing the suspend in the context of the calling
> process, just have it signal to a kernel thread, so the userland
> thread doing the suspend can also be suspended?

My immediate reaction was "the process might want to know that the
system actually suspended (and resumed)" but this can be addressed by
having it sleep on a condvar which is awoken when either a) suspend
fails or b) the system resumes.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ppcocs58.fsf>