move everything out of trunk
[lttv.git] / trunk / obsolete / ltt-usertrace / ltt / kernelutils-arm.h
diff --git a/trunk/obsolete/ltt-usertrace/ltt/kernelutils-arm.h b/trunk/obsolete/ltt-usertrace/ltt/kernelutils-arm.h
deleted file mode 100644 (file)
index dce42ef..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*****************************************************************************
- * kernelutils-arm.h
- *
- * This file holds the code needed by LTT usertrace that comes from the
- * kernel headers.  Since including kernel headers is not recommended in
- * userspace programs/libraries, we rewrote implementations HIGHLY INSPIRED
- * (i.e. copied/pasted) from the original kernel headers (2.6.18).
- *
- * Do not use these functions within signal handlers, as the architecture offers
- * no atomic operations. (Mathieu Desnoyers) It is safe to do multithreaded
- * tracing though, as the buffers are per thread.
- *
- * Deepak Saxena, October 2006
- */
-
-#ifndef _KERNELUTILS_ARM_H
-#define _KERNELUTILS_ARM_H
-
-#include <time.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct { volatile int counter; } atomic_t;
-
-#define atomic_read(v) ((v)->counter)
-
-static inline int atomic_add_return(int i, atomic_t *v)
-{
-       unsigned long flags;
-       int val;
-
-       val = v->counter;
-       v->counter = val += i;
-
-       return val;
-}
-
-#define atomic_add(i, v)       (void) atomic_add_return(i, v)
-#define atomic_inc(v)          (void) atomic_add_return(1, v)
-
-static inline unsigned long cmpxchg(volatile void *ptr,
-                                   unsigned long old,
-                                   unsigned long new)
-{
-       unsigned long flags, prev;
-       volatile unsigned long *p = ptr;
-
-       if ((prev = *p) == old)
-               *p = new;
-       return(prev);
-}
-
-static inline unsigned long long get_cycles(void)
-{
-       struct timespec tp;
-       clock_gettime(CLOCK_MONOTONIC, &tp);    
-       return tp.tv_sec * 1000000000 + tp.tv_nsec;
-}
-
-
-#ifdef __cplusplus
-} /* end of extern "C" */
-#endif
-
-#endif
This page took 0.023026 seconds and 4 git commands to generate.