text
[lttv.git] / genevent-new / gentest.c
index f7dfca959053d1eaeda222bb43b47010cb4e63fa..f1dc3ec44bfb9d2419f32c52d3f61ac963a8f64d 100644 (file)
@@ -13,7 +13,7 @@
 #define max(a,b) (((a)>(b))?a:b)
 #define BUG_ON(a) assert(!(a))
 
-// Useful outsize __KERNEL__. Not used here because inline is already redefined.
+// Useful outside __KERNEL__. Not used here because inline is already redefined.
 #define force_inline inline __attribute__((always_inline))
 
 /* Calculate the offset needed to align the type */
@@ -169,6 +169,10 @@ static inline size_t lttng_get_size_sequence_mystruct_mysequence(
        locsize = sizeof(double);
        size += ltt_align(size, locsize) + (obj->len * locsize);
 
+       /* Realign on arch size */
+       locsize = sizeof(void *);
+       size += ltt_align(size, locsize);
+
        return size;
 }
 
@@ -398,7 +402,7 @@ static inline void lttng_write_mystruct(
 
        /* Variable length field */
        lttng_write_sequence_mystruct_mysequence(to_base, to, from, len, &obj->mysequence);
-       *to = 0;        /* Force the compiler to know it's 0 */
+       //*to = 0;      /* Force the compiler to know it's 0 */
        /* After this previous write, we are sure that *to is 0, and *to_base is
         * aligned on the architecture size : to rest of alignment will be calculated
         * statically. */
This page took 0.023851 seconds and 4 git commands to generate.