X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fkcompat%2Fkcompat.h;fp=include%2Flttng%2Fkcompat%2Fkcompat.h;h=3fdea64829c48725af9a5f71ac5a98106b93d959;hb=4318ae1be57eb7983ab4857a7a8eeb4a030a8216;hp=0000000000000000000000000000000000000000;hpb=d4419b81b243bc3a6bdd4a09b3ca2216d044a1c7;p=ust.git diff --git a/include/lttng/kcompat/kcompat.h b/include/lttng/kcompat/kcompat.h new file mode 100644 index 0000000..3fdea64 --- /dev/null +++ b/include/lttng/kcompat/kcompat.h @@ -0,0 +1,63 @@ +/* + * kcompat.h + * + * Copyright (C) 2009 - Pierre-Marc Fournier (pierre-marc dot fournier at polymtl dot ca) + * + * 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 KCOMPAT_H +#define KCOMPAT_H + +#define __KERNEL__ +#define _LOOSE_KERNEL_NAMES + +#ifndef CONFIG_SMP +#define CONFIG_SMP 1 /* Needed for urcu, verify it's ok to remove it. */ +#endif + +#include +#include +#if __WORDSIZE == 32 +#define LIBKCOMPAT_X86_32 +#elif __WORDSIZE == 64 +#define LIBKCOMPAT_X86_64 +#else +#error "Unsupported" +#endif + +#ifdef LIBKCOMPAT_X86_32 +#define CONFIG_X86_32 +#define CONFIG_32BIT +#endif + +#ifdef LIBKCOMPAT_X86_64 +#define CONFIG_X86_64 +#define CONFIG_64BIT +#endif + +/* Standard libs */ +#include +#include + +/* Taken from userspace-rcu */ +#include + +/* Kernel libs */ +#include +#include +#include + +#endif /* KCOMPAT_H */