From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56698 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLD9Y-00028l-Ch for qemu-devel@nongnu.org; Wed, 24 Nov 2010 06:04:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PLD9T-00048h-Fz for qemu-devel@nongnu.org; Wed, 24 Nov 2010 06:04:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:24781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PLD9T-00048X-37 for qemu-devel@nongnu.org; Wed, 24 Nov 2010 06:04:39 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAOB4ceb014397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 24 Nov 2010 06:04:38 -0500 Date: Wed, 24 Nov 2010 13:04:26 +0200 From: "Michael S. Tsirkin" Message-ID: <20101124110426.GE23493@redhat.com> References: <20101124104035.GB23493@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [Qemu-devel] Re: [PATCH 02/10] Add buffered_file_internal constant List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org On Wed, Nov 24, 2010 at 11:52:25AM +0100, Juan Quintela wrote: > "Michael S. Tsirkin" wrote: > > On Wed, Nov 24, 2010 at 12:02:59AM +0100, Juan Quintela wrote: > >> From: Juan Quintela > > >> diff --git a/buffered_file.h b/buffered_file.h > >> index 98d358b..a728316 100644 > >> --- a/buffered_file.h > >> +++ b/buffered_file.h > >> @@ -21,6 +21,8 @@ typedef void (BufferedPutReadyFunc)(void *opaque); > >> typedef void (BufferedWaitForUnfreezeFunc)(void *opaque); > >> typedef int (BufferedCloseFunc)(void *opaque); > >> > >> +extern const int buffered_file_interval; > >> + > > > > This shouldn't be exported, IMO. > > What do you want? an accessor function? I mean an abstraction at qemu_file_ level. > Notice that it is a constant. > We need the value in other places, see the last patch. > > Otherwise, I have to pick random numbers like ... 50ms. > > Later, Juan. If you need a random number, use a random number :) > > > > >> QEMUFile *qemu_fopen_ops_buffered(void *opaque, size_t xfer_limit, > >> BufferedPutFunc *put_buffer, > >> BufferedPutReadyFunc *put_ready, > >> -- > >> 1.7.3.2 > >>