Fix memory layout for channel
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 24 Sep 2011 21:32:47 +0000 (17:32 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 24 Sep 2011 21:32:47 +0000 (17:32 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/frontend_types.h

index 76ad7ff5beece42cd492a2f7da27d8301ea29336..baf1826321a2934f83b40992464dd2671615a2ef 100644 (file)
@@ -44,12 +44,15 @@ struct channel {
                                                 * subbuffer index.
                                                 */
 
-       struct channel_backend backend;         /* Associated backend */
-
        unsigned long switch_timer_interval;    /* Buffer flush (jiffies) */
        unsigned long read_timer_interval;      /* Reader wakeup (jiffies) */
        //wait_queue_head_t read_wait;          /* reader wait queue */
        int finalized;                          /* Has channel been finalized */
+       /*
+        * Associated backend contains a variable-length array. Needs to
+        * be last member.
+        */
+       struct channel_backend backend;         /* Associated backend */
 } ____cacheline_aligned;
 
 /* Per-subbuffer commit counters used on the hot path */
This page took 0.023462 seconds and 4 git commands to generate.