From: Timenkov Yuri Subject: Re: suspending execution within Xen Date: Wed, 29 Jun 2005 16:03:34 +0400 Message-ID: <200506291603.34450.ytimenkov@sw.ru> References: <1120045998.12491.10.camel@blast.q> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1120045998.12491.10.camel@blast.q> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org may be worth using wait queues here? (or schedule()) On Wednesday 29 June 2005 15:53, Avi Kivity wrote: > I am trying to send a stream of events about one domain to another. so I > set up a ring between the monitoring domain and xen (not the monitored > domain). however I am having trouble blocking when buffer space runs > out. > > the intuitive > > while (!buffer_space_available()) > do_block(); > > does not work; do_block() appears to return to guest context, not to the > while loop (is this correct?). the other alternative, > > while (!buffer_space_available()) > if (!test_and_set_bit(EDF_BLOCKED, &ed->ed_flags)) > domain_sleep(ed); > > freezes xen solid. > > is there a way to do it? am I missing something obvious? > > Avi > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel -- Timenkov Yuri