From owner-freebsd-hackers Mon Oct 20 21:06:18 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA16018 for hackers-outgoing; Mon, 20 Oct 1997 21:06:18 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id VAA16010 for ; Mon, 20 Oct 1997 21:06:12 -0700 (PDT) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id DAA20149; Tue, 21 Oct 1997 03:50:28 +0100 From: Luigi Rizzo Message-Id: <199710210250.DAA20149@labinfo.iet.unipi.it> Subject: How to deal with ERESTART ? To: hackers@freebsd.org Date: Tue, 21 Oct 1997 03:50:28 +0100 (MET) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I am having a problem in dealing with ERESTART in the audio driver. Right now I have a sequence like res = tsleep(..., PRIBIO | PCATCH , ..., timeout ) if (res == EINTR || res = ERESTART) ... do the same thing, typically abort operations. the aim was to make it easy for apps to gain control on the driver. Catching ERESTART this way had some interesting side effects on some applications which makes me thing that it is probably wrong to assimilate ERESTART and EINTR ? So my question is: when can i get ERESTART as a result from tsleep(), and would it be better to just restart the tsleep in this case ? Cheers Luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________