#define max(a,b) (((a)>(b))?a:b)
#define BUG_ON(a) assert(!(a))
+#define force_inline inline __attribute__((always_inline))
+
/* Calculate the offset needed to align the type */
-static inline unsigned int ltt_align(size_t align_drift,
+static force_inline unsigned int ltt_align(size_t align_drift,
size_t size_of_type)
{
size_t alignment = min(sizeof(void*), size_of_type);
};
-static inline size_t lttng_get_size_mystruct2(
+static force_inline size_t lttng_get_size_mystruct2(
struct lttng_mystruct2 * obj)
{
size_t size=0, locsize;
return sizeof(struct lttng_mystruct2);
}
-static inline size_t lttng_get_alignment_mystruct2(
+static force_inline size_t lttng_get_alignment_mystruct2(
struct lttng_mystruct2 *obj)
{
size_t align=0, localign;
return align;
}
-static inline void lttng_write_mystruct2(
+static force_inline void lttng_write_mystruct2(
void **to_base,
size_t *to,
void **from,
#define LTTNG_ARRAY_SIZE_mystruct_myarray 10
typedef uint64_t lttng_array_mystruct_myarray[LTTNG_ARRAY_SIZE_mystruct_myarray];
-static inline size_t lttng_get_size_array_mystruct_myarray(
+static force_inline size_t lttng_get_size_array_mystruct_myarray(
lttng_array_mystruct_myarray obj)
{
size_t size=0, locsize;
return size;
}
-static inline size_t lttng_get_alignment_array_mystruct_myarray(
+static force_inline size_t lttng_get_alignment_array_mystruct_myarray(
lttng_array_mystruct_myarray obj)
{
size_t align=0, localign;
}
-static inline void lttng_write_array_mystruct_myarray(
+static force_inline void lttng_write_array_mystruct_myarray(
void **to_base,
size_t *to,
void **from,
};
-static inline size_t lttng_get_size_sequence_mystruct_mysequence(
+static force_inline size_t lttng_get_size_sequence_mystruct_mysequence(
lttng_sequence_mystruct_mysequence *obj)
{
size_t size=0, locsize;
return size;
}
-static inline size_t lttng_get_alignment_sequence_mystruct_mysequence(
+static force_inline size_t lttng_get_alignment_sequence_mystruct_mysequence(
lttng_sequence_mystruct_mysequence *obj)
{
size_t align=0, localign;
}
-static inline void lttng_write_sequence_mystruct_mysequence(
+static force_inline void lttng_write_sequence_mystruct_mysequence(
void **to_base,
size_t *to,
void **from,
};
-static inline size_t lttng_get_size_mystruct_myunion(
+static force_inline size_t lttng_get_size_mystruct_myunion(
union lttng_mystruct_myunion *obj)
{
size_t size=0, locsize;
}
-static inline size_t lttng_get_alignment_mystruct_myunion(
+static force_inline size_t lttng_get_alignment_mystruct_myunion(
union lttng_mystruct_myunion *obj)
{
size_t align=0, localign;
}
-static inline void lttng_write_mystruct_myunion(
+static force_inline void lttng_write_mystruct_myunion(
void **to_base,
size_t *to,
void **from,
union lttng_mystruct_myunion myunion;
};
-static inline size_t lttng_get_size_mystruct(
+static force_inline size_t lttng_get_size_mystruct(
struct lttng_mystruct *obj)
{
size_t size=0, locsize, localign;
}
-static inline size_t lttng_get_alignment_mystruct(
+static force_inline size_t lttng_get_alignment_mystruct(
struct lttng_mystruct *obj)
{
size_t align=0, localign;
return align;
}
-static inline void lttng_write_mystruct(
+static force_inline void lttng_write_mystruct(
void **to_base,
size_t *to,
void **from,