update syscalls
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 7 Jul 2006 22:41:10 +0000 (22:41 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 7 Jul 2006 22:41:10 +0000 (22:41 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1997 04897980-b3bd-0310-b5e0-8ef037075253

ltt-usertrace/Makefile
ltt-usertrace/ltt-usertrace-fast.c
ltt-usertrace/ltt/ltt-usertrace.h

index 9b0b40e920d3867da96dd1af56381e44aa3bbf27..de07916e2a66e46df37ae5c2fd556b47870233be 100644 (file)
@@ -4,7 +4,7 @@ INCLUDE_DIR=/usr/include
 LIB_DIR?=/usr/lib
 RANLIB=ranlib
 
-LTT_CFLAGS=-I. -O2 -L.
+LTT_CFLAGS=-I. -O2 -L. -fPIC
 # note : x86_64 needs -fPIC ? FIXME
 
 #For testing lib ltt-usertrace-fast
index 2d22ce9b98a45dd1fb2500ea63a31e1bf5f9088e..17da6cd8cf2a4d05b97bf6bf353e141643859dcf 100644 (file)
 #include <sys/wait.h>
 #include <sys/stat.h>
 #include <sys/mman.h>
-#include <linux/unistd.h>
+#include <unistd.h>
+#include <sys/syscall.h>
 
 // included with hack for powerpc in ltt-usertrace.h #include <asm/atomic.h>
 #include <asm/timex.h> //for get_cycles()
 
 #include <ltt/ltt-usertrace.h>
 
-_syscall0(pid_t,gettid);
+#define gettid() syscall(__NR_gettid)
 
 #ifdef LTT_SHOW_DEBUG
 #define dbg_printf(...) printf(__VA_ARGS__)
index e88b6450de1b8d370356de558111f5890eb3d83d..4fed3b76b90c0c083f8510b331d1bb3919b105e9 100644 (file)
@@ -101,13 +101,17 @@ struct user_facility_info {
   size_t pointer_size;
   size_t size_t_size;
 };
-
+#if 0
 static inline __attribute__((no_instrument_function)) 
 _syscall5(int, ltt_trace_generic, unsigned int, facility_id,
        unsigned int, event_id, void *, data, size_t, data_size, int, blocking)
 static inline __attribute__((no_instrument_function))
 _syscall2(int, ltt_register_generic, unsigned int *, facility_id,
        const struct user_facility_info *, info)
+#endif //0
+
+#define ltt_register_generic(...)  syscall(__NR_ltt_register_generic, __VA_ARGS__)
+#define ltt_trace_generic(...)  syscall(__NR_ltt_trace_generic, __VA_ARGS__)
 
 #ifndef LTT_PACK
 /* Calculate the offset needed to align the type */
This page took 0.024985 seconds and 4 git commands to generate.