From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rmsr0-0004nU-Nw for qemu-devel@nongnu.org; Mon, 16 Jan 2012 15:08:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rmsqx-0004T6-Nj for qemu-devel@nongnu.org; Mon, 16 Jan 2012 15:08:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rmsqx-0004St-CS for qemu-devel@nongnu.org; Mon, 16 Jan 2012 15:08:27 -0500 Message-ID: <4F1483B7.2010105@redhat.com> Date: Mon, 16 Jan 2012 13:08:23 -0700 From: Eric Blake MIME-Version: 1.0 References: <1326482122-12619-1-git-send-email-lcapitulino@redhat.com> <1326482122-12619-3-git-send-email-lcapitulino@redhat.com> <4F10A694.8030900@redhat.com> <20120116150853.40626823@doriath> In-Reply-To: <20120116150853.40626823@doriath> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigBAB34898F4C0CB246CC77D7F" Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-ga: Add the guest-suspend command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: jcody@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBAB34898F4C0CB246CC77D7F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 01/16/2012 10:08 AM, Luiz Capitulino wrote: >> Strangely enough, POSIX doesn't include strcmp() in its list of >> async-signal-safe functions (which is what you should be restricting >> yourself to, if qemu-ga is multi-threaded), but in practice, I think >> that is a bug of omission in POSIX, and not something you have to chan= ge >> in your code. >=20 > memset() ins't either... sigaction() either, which begins to get > annoying. sigaction() is required by POSIX to be async-signal-safe. Where are you looking when claiming it isn't? memset(), strlen, strcpy, and friends in are all in the class of functions that I think are unintentional omissions from the list of async-signal-safe functions (they don't read/modify anything but the pointers passed in, so the _only_ reason I can think of why they _might_ have been omitted from the list is that there might be some machine state that could be observably different if you were interrupted in the middle of one of these operations, such as a processor flag bit when using a rep prefix on x86 controlling which direction to move, but no one has ever pointed me to a definitive answer to why they were omitted).= --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigBAB34898F4C0CB246CC77D7F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPFIO3AAoJEKeha0olJ0NqrSwH/Atg1l7/eN3J4WmxpgPpfWdU r270Ti+XKZcXwsq36edjLSIe51zqEXaOjNavzvz5+T+mm3GI5qFwofTOG2eQOPUj EQFoucfaWlXJf6Ri7a9Kpaz155p9Jjbel8ZxYiBpFXqV5QpRp0hz3oUE1KMZJN8P Sd85pGbErGhtXI62yj5cRykVcB52K0T1JKjpSoBqolMkGfg2U5/FJETdCGVk6eOB kN4HI2QK31X7/y9Yy+ANt6ejuIK4ATiCrttpRzlMGBTgX0d05wZq4Uc1EAoWY1RE 1BfFnn7O2prdqOnXK21CbOmahBLiT+3SVG83O0qLvk4Z7nLNmvZ/Ym9Ke7X8AsE= =sDmk -----END PGP SIGNATURE----- --------------enigBAB34898F4C0CB246CC77D7F--