From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 From: Led To: ALT Linux Team development discussions Date: Tue, 19 Feb 2008 02:23:41 +0200 User-Agent: KMail/1.9.7 References: <20080218173649.02D5B151C8AC@granary.armor.altlinux.org> <20080219000628.GA27741@wo.int.altlinux.org> <20080219001811.GD25921@imap.altlinux.org> In-Reply-To: <20080219001811.GD25921@imap.altlinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200802190223.41135.ledest@gmail.com> X-Volia-Original-IP: 77.122.118.134 Subject: Re: [devel] asm/page.h X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 00:22:46 -0000 Archived-At: List-Archive: List-Post: Tuesday, 19 February 2008 02:18:11 Kirill Maslinsky =CE=C1=D0=C9=D3=C1=D7: > On Tue, Feb 19, 2008 at 03:06:28AM +0300, Dmitry V. Levin wrote: > > On Tue, Feb 19, 2008 at 01:45:34AM +0200, Led wrote: > > > > =FC=D4=CF =CE=C5 =CF=CE=CF? > > > > > > > > The user can find the value of PAGE_SIZE by calling getpagesize() > > > > defined in unistd.h . > > > > > > =E8=CF=D4=D1, =CE=C1=D7=C5=D2=CE=CF=C5, =D7=D3=A3 =D6=C5: > > > > > > -asm/page.h > > > +sys/user.h > > > > =EB=C1=CB=CF=CA-=D4=CF =D3=CF=CD=CE=C9=D4=C5=CC=D8=CE=D9=CA =C6=C1=CA= =CC. =EC=D5=DE=DB=C5 sysconf(_SC_PAGESIZE). > > =F7=CF=D4 =D4=C1=CB? > > --- a/eciadsl-usermode/pusb-linux.c > +++ b/eciadsl-usermode/pusb-linux.c > @@ -29,7 +29,6 @@ > #include > > #include "pusb-linux.h" > -#include > > #include "pusb.h" > > @@ -438,8 +437,8 @@ inline int pusb_endpoint_rw(int fd, int ep, unsigned > char* buf, int size, int ti > > bulk.len =3D size; > > - if (size > PAGE_SIZE) > - bulk.len =3D PAGE_SIZE; > + if (size > sysconf(_SC_PAGESIZE)) > + bulk.len =3D sysconf(_SC_PAGESIZE); > > bulk.timeout =3D timeout; > bulk.data =3D buf; =FA=C1=DE=C5=CD =C4=D7=C1=D6=C4=D9 =D7=D9=DA=D9=D7=C1=D4=D8? =E9=ED=E8=EF = =CC=D5=DE=DB=C5 =DA=C1=D7=C5=D3=D4=C9 =D0=C5=D2=C5=CD=C5=CE=CE=D5=C0 page_s= ize. =2D-=20 Led