reorder SBuf fields to get better alignment for buffer
authorMarko Kreen <markokr@gmail.com>
Fri, 7 Dec 2007 14:45:28 +0000 (14:45 +0000)
committerMarko Kreen <markokr@gmail.com>
Fri, 7 Dec 2007 14:45:28 +0000 (14:45 +0000)
src/sbuf.h

index 1d57b5bc0b008d132b3720fc44e53439d7700342..68f23bb35da54a056312cf78033c9d99bee0c20e 100644 (file)
@@ -42,16 +42,20 @@ struct SBuf {
        /* libevent handle */
        struct event ev;
 
+       unsigned pkt_skip:1;    /* if current packet should be skipped */
+       unsigned is_unix:1;     /* is it unix socket */
+       unsigned wait_send:1;   /* debug var, otherwise useless */
+
        /* protocol callback function */
        sbuf_proto_cb_t proto_handler;
        void *arg;
 
-       /* fd for this socket */
-       int sock;
-
        /* dest SBuf for current packet */
        SBuf *dst;
 
+       /* fd for this socket */
+       int sock;
+
        int recv_pos;
        int pkt_pos;
        int send_pos;
@@ -59,10 +63,6 @@ struct SBuf {
        int pkt_remain;         /* total packet length remaining */
        int send_remain;        /* total data to be sent remaining */
 
-       unsigned pkt_skip:1;    /* if current packet should be skipped */
-       unsigned is_unix:1;     /* is it unix socket */
-       unsigned wait_send:1;   /* debug var, otherwise useless */
-
        uint8 buf[0];
 };