[Monetdb-developers] BATpreload_ and _BATpreload

Stefan Manegold Stefan.Manegold at cwi.nl
Mon Feb 15 12:50:40 CET 2010


On Mon, Feb 15, 2010 at 11:18:30AM +0100, Sjoerd Mullender wrote:
> On 2010-02-15 10:12, Stefan Manegold wrote:
> > On Mon, Feb 15, 2010 at 10:03:18AM +0100, Sjoerd Mullender wrote:
> >> On 2010-02-15 09:57, Stefan Manegold wrote:
> >>> On Sun, Feb 14, 2010 at 09:21:34PM +0100, Martin Kersten wrote:
> >>>> Sjoerd Mullender wrote:
> >>>>> I am quite unhappy with the names BATpreload, BATpreload_, and
> >>>>> _BATpreload.  I really don't like names that differ only by an initial
> >>>>> or final _.  I would much rather see more descriptive names.
> >>>>> BATpreload_ is now more an interface to give advice to the underlying
> >>>>> system about how the BAT is going to be accessed in the near future, and
> >>>>> _BATpreload is telling the underlying system that you're done with
> >>>>> accessing the BAT according to the advice given.  Names such as
> >>>>> BATaccessadvice/BATendaccessadvice, though longer, are more descriptive.
> >>>>>
> >>>>> I have seen some checkins fixing the incorrect use of BATpreload_ and
> >>>>> _BATpreload, proofing my point.
> >>>>>
> >>>>> Now we still have a chance to fix this.
> >>>>>
> >>>> I fully agree, but did not had the trigger to change it....
> >>>
> >>> I also more than agree --- what about
> >>> BATaccessBegin() & BATaccessEnd() ?
> >>>
> >>> If noone else is "faster", I could apply the chnages later today ...
> >>
> >> That's good.  What about BATpreload (without _)?
> > 
> > BATaccess() (i.e., without "Begin"/"End") ?
> > 
> > The actual function should not be called directly, but only via the
> > BATaccessBegin() / BATaccessEnd() macros.
> 
> I thought those were functions.  And if so, old BATpreload (by whatever
> name) should be a static function.

No, for now, they are just macros:

MonetDB/src/gdk/gdk.mx:1814:#define BATpreload_(b,what,advise) BATpreload(b,what,advise,1)
MonetDB/src/gdk/gdk.mx:1815:#define _BATpreload(b,what,advise) BATpreload(b,what,advise,-1)
MonetDB/src/gdk/gdk.mx:1816:gdk_export size_t BATpreload(BAT *b, int what, int advise, int load);
MonetDB/src/gdk/gdk_storage.mx:705:BATpreload(BAT *b, int what, int advise, int preload) {

Stefan

> > Stefan
> > 
> >>
> >> -- 
> >> Sjoerd Mullender
> >>
> > 
> > 
> > 
> >> ------------------------------------------------------------------------------
> >> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> >> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> >> http://p.sf.net/sfu/solaris-dev2dev
> > 
> >> _______________________________________________
> >> Monetdb-developers mailing list
> >> Monetdb-developers at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/monetdb-developers
> > 
> > 
> 
> 
> -- 
> Sjoerd Mullender
> 



-- 
| Dr. Stefan Manegold | mailto:Stefan.Manegold at cwi.nl |
| CWI,  P.O.Box 94079 | http://www.cwi.nl/~manegold/  |
| 1090 GB Amsterdam   | Tel.: +31 (20) 592-4212       |
| The Netherlands     | Fax : +31 (20) 592-4199       |




More information about the developers-list mailing list