Date: Tue, 18 Sep 2007 11:52:42 -0400 From: Joe Marcus Clarke <marcus@FreeBSD.org> To: Bruce Evans <brde@optusnet.com.au> Cc: Jilles Tjoelker <jilles@stack.nl>, freebsd-arch@FreeBSD.org Subject: Re: Understanding interrupted system calls Message-ID: <1190130762.48257.1.camel@shumai.marcuscom.com> In-Reply-To: <20070919005425.P75789@besplex.bde.org> References: <1188600721.1255.11.camel@shumai.marcuscom.com> <20070901112600.GA33832@stack.nl> <1188660782.41727.5.camel@shumai.marcuscom.com> <20070901224025.GA97796@stack.nl> <20070902131910.H46281@delplex.bde.org> <1189629164.80084.81.camel@shumai.marcuscom.com> <20070919005425.P75789@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-0dEr8OhQVqYnZmhO7Pqb Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2007-09-19 at 01:12 +1000, Bruce Evans wrote: > On Wed, 12 Sep 2007, Joe Marcus Clarke wrote: >=20 > Sorry this reply took so long. >=20 > > On Sun, 2007-09-02 at 14:17 +1000, Bruce Evans wrote: > >>> From Jilles' previous reply: > >>>>> The fixed version would then be > >>>>> > >>>>> error =3D tsleep(&scp->smode, PZERO|PCATCH, "waitvt", 0); > >> > >> I think this is right. The kernel should never loop on ERESTART like = this. > >> Please fix the remaining style bug in it (missing spaces around binary > >> operator). > > > > Bruce, I didn't know if you saw my fix, if it needs more work, or if > > you're going to commit it? I'd really like to get this fixed before > > 7.0. Should I open a PR to track it? Thanks. > > > > http://www.marcuscom.com/downloads/syscons.c.diff > > http://www.marcuscom.com/downloads/pcvt_ext.c (-STABLE only) >=20 > I saw a new style bug in it, but wasn't going to complain. Now I will :-= ). >=20 > % --- src/sys/dev/syscons/syscons.c.orig 2007-09-02 23:04:15.000000000 -0= 400 > % +++ src/sys/dev/syscons/syscons.c 2007-09-02 23:05:06.000000000 -0400 > % @@ -1073,8 +1073,7 @@ scioctl(struct cdev *dev, u_long cmd, ca > % scp =3D sc_get_stat(SC_DEV(sc, i)); > % if (scp =3D=3D scp->sc->cur_scp) > % return 0; > % - while ((error=3Dtsleep(&scp->smode, PZERO|PCATCH, > % - "waitvt", 0)) =3D=3D ERESTART) ; > % + error =3D tsleep(&scp->smode, (PZERO|PCATCH), "waitvt", 0); > % return error; > %=20 > % case VT_GETACTIVE: /* get active vty # */ >=20 > It now has extra parentheses, and still doesn't have spaces around the > binary operator. I re-read your first email twice, and read it as "put parentheses around the binary operator" both times. Sorry for being so dense. A space makes more sense. >=20 > In pcvt_ext.c.diff, the changes are larger and I only glanced at most > of them, but noticed that the formatting of the `PZERO | PCATCH' are > was already what I want but was changed to the above (2 changes instead > of 1). pcvt is almost dead and its style so unusual that it is difficult > to be bug for bug compatible with, so I would try to avoid making any > style changes in it. >=20 > Please commit all the changes, preferably after fixing the style bugs. Thanks, will do after approval from re. Joe --=20 Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome --=-0dEr8OhQVqYnZmhO7Pqb Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBG7/RGb2iPiv4Uz4cRAnfbAJ91WuNZrMk2V1df4QsFGf34qBHQDwCePc/c K1eZvfCXS1uI6rIABAhAm+8= =Z+O2 -----END PGP SIGNATURE----- --=-0dEr8OhQVqYnZmhO7Pqb--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1190130762.48257.1.camel>