add missing licence headers
[ust.git] / include / ust / kernelcompat.h
index 5cc5eaa22e70b963795619b963c1c2f8ed9504da..77adebda47ba57a8f49a160b9bb7af0aad00534c 100644 (file)
@@ -1,11 +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
+ */
+
 #ifndef KERNELCOMPAT_H
 #define KERNELCOMPAT_H
 
 #include <kcompat.h>
 
-#include <string.h>
-#include <sys/time.h>
-
 /* FIXME: libkcompat must not define arch-specific local ops, as ust *must*
  * fallback to the normal atomic ops. Fix things so we don't add them and
  * break things accidentally.
         const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
         (type *)( (char *)__mptr - offsetof(type,member) );})
 
-#define KERN_DEBUG ""
-#define KERN_NOTICE ""
-#define KERN_INFO ""
-#define KERN_ERR ""
-#define KERN_ALERT ""
-#define KERN_WARNING ""
-
 /* ERROR OPS */
-
 #define MAX_ERRNO      4095
 
 #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
@@ -71,25 +77,11 @@ static inline long IS_ERR(const void *ptr)
 
 /* MALLOCATION */
 
-#include <stdlib.h>
-
-#define kmalloc(s, t) malloc(s)
-#define kzalloc(s, t) zmalloc(s)
-#define kfree(p) free((void *)p)
-#define kstrdup(s, t) strdup(s)
-
 #define zmalloc(s) calloc(1, s)
 
-#define GFP_KERNEL
-
-/* PRINTK */
-
-#include <stdio.h>
-#define printk(fmt, args...) printf(fmt, ## args)
-
-
 /* ATTRIBUTES */
 
+/* FIXME: define this */
 #define ____cacheline_aligned
 
 /* MATH */
@@ -179,6 +171,8 @@ static inline u64 trace_clock_read64(void)
 }
 #endif
 
+#include <sys/time.h>
+
 static inline u64 trace_clock_read64(void)
 {
        struct timeval tv;
@@ -202,5 +196,4 @@ static inline u32 trace_clock_freq_scale(void)
        return 1;
 }
 
-
 #endif /* KERNELCOMPAT_H */
This page took 0.033273 seconds and 4 git commands to generate.