Use unsigned int instead of int for bitfields
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Dec 2011 14:35:54 +0000 (09:35 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Dec 2011 14:35:54 +0000 (09:35 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-events.h
libringbuffer/backend_types.h
libringbuffer/frontend_types.h

index 6b4863fd494540b921c6158544b94a8d3ebf3929..45358d422ec9c54d972c5e16c5379790b97d9855 100644 (file)
@@ -229,7 +229,7 @@ struct ltt_event {
        } u;
        struct cds_list_head list;              /* Event list */
        struct ust_pending_probe *pending_probe;
-       int metadata_dumped:1;
+       unsigned int metadata_dumped:1;
 };
 
 struct channel;
@@ -289,7 +289,7 @@ struct ltt_channel {
        struct ltt_channel_ops *ops;
        int header_type;                /* 0: unset, 1: compact, 2: large */
        struct lttng_ust_shm_handle *handle;    /* shared-memory handle */
-       int metadata_dumped:1;
+       unsigned int metadata_dumped:1;
 
        /* Channel ID, available for consumer too */
        unsigned int id;
@@ -307,7 +307,7 @@ struct ltt_session {
        struct cds_list_head list;      /* Session list */
        unsigned int free_chan_id;      /* Next chan ID to allocate */
        uuid_t uuid;                    /* Trace session unique ID */
-       int metadata_dumped:1;
+       unsigned int metadata_dumped:1;
 };
 
 struct ltt_transport {
index 7300309f27ef97071354a8f4298ad7bed50d9f67..3d8bd3cb3392c1f5c3db2d3fc11323e1b29f7081 100644 (file)
@@ -53,7 +53,7 @@ struct lttng_ust_lib_ring_buffer_backend {
        DECLARE_SHMP(struct channel, chan);     /* Associated channel */
        int cpu;                        /* This buffer's cpu. -1 if global. */
        union v_atomic records_read;    /* Number of records read */
-       unsigned int allocated:1;       /* Bool: is buffer allocated ? */
+       unsigned int allocated:1;       /* is buffer allocated ? */
 };
 
 struct lttng_ust_lib_ring_buffer_shmp {
@@ -69,7 +69,7 @@ struct channel_backend {
                                         * for writer.
                                         */
        unsigned int buf_size_order;    /* Order of buffer size */
-       int extra_reader_sb:1;          /* Bool: has extra reader subbuffer */
+       unsigned int extra_reader_sb:1; /* has extra reader subbuffer ? */
        unsigned long num_subbuf;       /* Number of sub-buffers for writer */
        uint64_t start_tsc;             /* Channel creation TSC value */
        DECLARE_SHMP(void *, priv_data);/* Client-specific information */
index 32462f6b5725cb5ab1883566ee7bc397e43ad528..961c90e5084bd705c502d40e40a7cbb7b54307f6 100644 (file)
@@ -104,9 +104,9 @@ struct lttng_ust_lib_ring_buffer {
        unsigned long get_subbuf_consumed;      /* Read-side consumed */
        unsigned long prod_snapshot;    /* Producer count snapshot */
        unsigned long cons_snapshot;    /* Consumer count snapshot */
-       int get_subbuf:1;               /* Sub-buffer being held by reader */
-       int switch_timer_enabled:1;     /* Protected by ring_buffer_nohz_lock */
-       int read_timer_enabled:1;       /* Protected by ring_buffer_nohz_lock */
+       unsigned int get_subbuf:1,      /* Sub-buffer being held by reader */
+               switch_timer_enabled:1, /* Protected by ring_buffer_nohz_lock */
+               read_timer_enabled:1;   /* Protected by ring_buffer_nohz_lock */
        /* shmp pointer to self */
        DECLARE_SHMP(struct lttng_ust_lib_ring_buffer, self);
 } __attribute__((aligned(CAA_CACHE_LINE_SIZE)));
This page took 0.02647 seconds and 4 git commands to generate.