Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Abramo Bagnara <abramo.bagnara@libero.it>
To: Paul Davis <pbd@op.net>
Cc: Anders Torger <torger@ludd.luth.se>,
	alsa-devel@lists.sourceforge.net,
	Clemens Ladisch <clemens@ladisch.de>,
	Takashi Iwai <tiwai@suse.de>
Subject: Re: Why do I get broken pipe on write to a pcm in statePREPARED?
Date: Tue, 08 Oct 2002 08:06:58 +0200	[thread overview]
Message-ID: <3DA27602.969C3174@libero.it> (raw)
In-Reply-To: 3D98769A00183382@ims5a.libero.it

Paul Davis wrote:
> 
> >I'm not speaking about programming bugs. Suppose the PCM is stopped by
> >another thread: you're screwed.
> 
> why are you screwed? you're waiting (presumably) for data/space to be
> ready in the PCM device. there isn't any (or more precisely, you're
> waiting for changes in the state of data/space, and there are none). i
> don't see the problem.

The thread has no way to detect what's the cause of data/space lack
without busy loop or delaying.

> >> > As pointed by Clemens the current is the proper POSIX behaviour.
> >>
> >
> >Perhaps you should reread Single Unix Specification, I quote
> >http://www.opengroup.org/onlinepubs/007904975/functions/poll.html
> >
> >POLLIN
> >            Data other than high-priority data may be read without
> >blocking.
> >
> >
> >POLLOUT
> >            Normal data may be written without blocking.
> >
> >
> >No data may be read/written in current stream state in the case we are
> >discussing.
> 
> but nobody has suggested that poll(2) should return any flags with
> these bits set. the issue, i thought, was what should write(2) do ...

No, the issue was about poll and write.
The point is that stream is in bad state wrt read/write, this is the
reason why poll should return POLLERR.

-- 
Abramo Bagnara                       mailto:abramo.bagnara@libero.it

Opera Unica                          Phone: +39.546.656023
Via Emilia Interna, 140
48014 Castel Bolognese (RA) - Italy


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

       reply	other threads:[~2002-10-08  6:06 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3D98769A00183382@ims5a.libero.it>
2002-10-08  6:06 ` Abramo Bagnara [this message]
2002-10-08  7:30   ` Why do I get broken pipe on write to a pcm in statePREPARED? Clemens Ladisch
2002-10-08 18:50     ` Why do I get broken pipe on write to a pcm instatePREPARED? Abramo Bagnara
2002-10-09  7:52       ` Clemens Ladisch
2002-10-09 10:48         ` Anders Torger
2002-10-09 18:54           ` Abramo Bagnara
2002-10-09 13:28         ` James Courtier-Dutton
2002-10-09 13:54           ` Anders Torger
2002-10-10  2:15             ` James Courtier-Dutton
2002-10-10  3:51               ` Anders Torger
2002-10-10 14:21                 ` Jaroslav Kysela
2002-10-10 15:03                   ` Anders Torger
2002-10-09 14:39           ` Tim Goetze
2002-10-09 18:53         ` Why do I get broken pipe on write to a pcminstatePREPARED? Abramo Bagnara
2002-10-09 19:33           ` Jaroslav Kysela
     [not found] <3D98769A000FAA05@ims5a.libero.it>
2002-10-05  7:45 ` Why do I get broken pipe on write to a pcm in statePREPARED? Abramo Bagnara
     [not found] <200209171301.g8HD1Ww01231@mother.ludd.luth.se>
2002-09-17 13:04 ` Anders Torger
     [not found] <3D8638F6.AC6DE0C2@racine.ra.it>
2002-09-16 22:04 ` Tim Goetze
2002-09-17  8:21   ` Abramo Bagnara
2002-09-17  9:21     ` Tim Goetze
2002-09-13  9:41 Why do I get broken pipe on write to a pcm in state PREPARED? Jaroslav Kysela
2002-09-15 17:56 ` Why do I get broken pipe on write to a pcm in statePREPARED? Abramo Bagnara
2002-09-16 10:46   ` Takashi Iwai
2002-09-16 13:18     ` Tim Goetze
2002-09-16 14:31       ` Takashi Iwai
2002-09-16 19:31     ` Abramo Bagnara
2002-09-16 19:49       ` Tim Goetze
2002-09-16 20:14       ` Anders Torger
2002-09-17  8:12         ` Abramo Bagnara
2002-09-17  9:03           ` Anders Torger
2002-09-17 13:04           ` Paul Davis
2002-09-17  9:05         ` Clemens Ladisch
2002-09-17 10:09           ` Anders Torger
2002-09-17 11:09           ` Takashi Iwai
2002-09-17 11:55             ` tomasz motylewski
2002-09-17 12:52               ` Takashi Iwai
2002-09-17 13:01                 ` Anders Torger
2002-09-17 14:40                   ` Clemens Ladisch
2002-09-18 19:57                     ` Anders Torger
2002-10-04  8:14                       ` Anders Torger
2002-10-04 12:58                         ` Takashi Iwai
2002-10-04 18:04                           ` Abramo Bagnara
2002-10-07 10:15                             ` Takashi Iwai
2002-10-07 12:07                               ` Abramo Bagnara
2002-10-07 13:19                                 ` Anders Torger
2002-10-07 17:46                                   ` Abramo Bagnara
2002-10-08  9:54                                     ` Takashi Iwai
2002-10-07 13:57                                 ` Tim Goetze
2002-10-09 18:13                             ` Jack O'Quin
2002-09-17 13:03           ` Paul Davis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DA27602.969C3174@libero.it \
    --to=abramo.bagnara@libero.it \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=clemens@ladisch.de \
    --cc=pbd@op.net \
    --cc=tiwai@suse.de \
    --cc=torger@ludd.luth.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox