libust: change some licences to LGPL
[ust.git] / libust / tracer.h
index cc86d548ecfb39e6a4af5429289e0ee55de67da2..0c283ab4dfbb5c501472734a50e4815ff3cda623 100644 (file)
@@ -6,7 +6,19 @@
  *
  * Ported to userspace by Pierre-Marc Fournier.
  *
- * This file is released under the GPLv2.
+ * 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 _LTT_TRACER_H
 
 #include <sys/types.h>
 #include <stdarg.h>
-#include "relay.h"
-#include "list.h"
+//#include "list.h"
 #include "kernelcompat.h"
+#include "buffer.h"
+#include "relay.h"
 #include "channels.h"
 #include "tracercore.h"
 #include "marker.h"
@@ -135,9 +148,9 @@ struct ltt_trace_ops {
                                size_t *slot_size, long *buf_offset, u64 *tsc,
                                unsigned int *rflags,
                                int largest_align);
-       void (*commit_slot) (struct ltt_channel_struct *channel,
-                               void **transport_data, long buf_offset,
-                               size_t slot_size);
+//ust//        void (*commit_slot) (struct ltt_channel_struct *channel,
+//ust//                                void **transport_data, long buf_offset,
+//ust//                                size_t slot_size);
        void (*wakeup_channel) (struct ltt_channel_struct *ltt_channel);
        int (*user_blocking) (struct ltt_trace_struct *trace,
                                unsigned int index, size_t data_size,
@@ -430,23 +443,6 @@ static inline size_t ltt_write_event_header(struct ltt_trace_struct *trace,
 
 /* Lockless LTTng */
 
-/* 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)
-
 /*
  * ltt_reserve_slot
  *
@@ -484,29 +480,29 @@ static inline int ltt_reserve_slot(
 }
 
 
-/*
- * ltt_commit_slot
- *
- * Atomic unordered slot commit. Increments the commit count in the
- * specified sub-buffer, and delivers it if necessary.
- *
- * Parameters:
- *
- * @channel : the chanel to reserve space into.
- * @transport_data : specific transport data.
- * @buf_offset : offset of beginning of reserved slot
- * @slot_size : size of the reserved slot.
- */
-static inline void ltt_commit_slot(
-               struct ltt_channel_struct *channel,
-               void **transport_data,
-               long buf_offset,
-               size_t slot_size)
-{
-       struct ltt_trace_struct *trace = channel->trace;
-
-       trace->ops->commit_slot(channel, transport_data, buf_offset, slot_size);
-}
+///*
+// * ltt_commit_slot
+// *
+// * Atomic unordered slot commit. Increments the commit count in the
+// * specified sub-buffer, and delivers it if necessary.
+// *
+// * Parameters:
+// *
+// * @channel : the chanel to reserve space into.
+// * @transport_data : specific transport data.
+// * @buf_offset : offset of beginning of reserved slot
+// * @slot_size : size of the reserved slot.
+// */
+//static inline void ltt_commit_slot(
+//             struct ltt_channel_struct *channel,
+//             void **transport_data,
+//             long buf_offset,
+//             size_t slot_size)
+//{
+//     struct ltt_trace_struct *trace = channel->trace;
+//
+//     trace->ops->commit_slot(channel, transport_data, buf_offset, slot_size);
+//}
 
 /*
  * Control channels :
This page took 0.02421 seconds and 4 git commands to generate.