X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=libust%2Fbuffer.h;fp=libust%2Fbuffer.h;h=0000000000000000000000000000000000000000;hb=b5b073e22d34bec71259d39b8946354f170f01a9;hp=086f55c4d2564d8cbd26905d679a5dba4dbe3a7c;hpb=a2dc02e0e0a685b8814b68a2f07ce73c08e0ef50;p=ust.git diff --git a/libust/buffer.h b/libust/buffer.h deleted file mode 100644 index 086f55c..0000000 --- a/libust/buffer.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 2005-2009 Mathieu Desnoyers - * - * 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 - */ - -#ifndef UST_BUFFER_H -#define UST_BUFFER_H - -/* Buffer offset macros */ - -/* - * BUFFER_TRUNC zeroes the subbuffer offset and the subbuffer number parts of - * the offset, which leaves only the buffer number. - */ -#define BUFFER_TRUNC(offset, chan) \ - ((offset) & (~((chan)->alloc_size-1))) -#define BUFFER_OFFSET(offset, chan) ((offset) & ((chan)->alloc_size - 1)) -#define SUBBUF_OFFSET(offset, chan) ((offset) & ((chan)->subbuf_size - 1)) -#define SUBBUF_ALIGN(offset, chan) \ - (((offset) + (chan)->subbuf_size) & (~((chan)->subbuf_size - 1))) -#define SUBBUF_TRUNC(offset, chan) \ - ((offset) & (~((chan)->subbuf_size - 1))) -#define SUBBUF_INDEX(offset, chan) \ - (BUFFER_OFFSET((offset), chan) >> (chan)->subbuf_size_order) - - -#endif /* UST_BUFFER_H */