X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=ustd%2Flowlevel.c;h=dbe03c1d3732c4542445e36b960a85f599bb2a30;hb=6eb05e4feb4700acdc9d0e1e2778859562ad1bb7;hp=ff3875931a36c464c345c7c2a8823ee94e61f11d;hpb=d748a7de2e2a43fb576d67668a8c105f863051e7;p=ust.git diff --git a/ustd/lowlevel.c b/ustd/lowlevel.c index ff38759..dbe03c1 100644 --- a/ustd/lowlevel.c +++ b/ustd/lowlevel.c @@ -1,8 +1,25 @@ +/* Copyright (C) 2009 Pierre-Marc Fournier + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + #include -#include "tracer.h" +#include #include "ustd.h" -#include "localerr.h" +#include "usterr.h" /* This truncates to an offset in the buffer. */ #define USTD_BUFFER_TRUNC(offset, bufinfo) \ @@ -29,8 +46,8 @@ void finish_consuming_dead_subbuffer(struct buffer_info *buf) * last place written. */ long last_subbuf = (write_offset - 1) / buf->subbuf_size; - DBG("first_subbuf=%d", first_subbuf); - DBG("last_subbuf=%d", last_subbuf); + DBG("first_subbuf=%ld", first_subbuf); + DBG("last_subbuf=%ld", last_subbuf); if(last_subbuf - first_subbuf >= buf->n_subbufs) { DBG("an overflow has occurred, nothing can be recovered");