rculfhash mm plugins: cleanup alloc
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 28 Nov 2011 14:07:54 +0000 (09:07 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 28 Nov 2011 14:07:54 +0000 (09:07 -0500)
- Ensure the order of fields set match the cds_lfht field order.
- 80 cols cleanup.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash-mm-chunk.c
rculfhash-mm-mmap.c
rculfhash-mm-order.c

index 046977651b02b17e53177457c6a0baef187c8656..38dde3a2b8759f6b2e672963eafc1f88eb84592d 100644 (file)
@@ -79,8 +79,7 @@ struct cds_lfht *alloc_cds_lfht(unsigned long min_nr_alloc_buckets,
        unsigned long nr_chunks, cds_lfht_size;
 
        min_nr_alloc_buckets = max(min_nr_alloc_buckets,
-                       max_nr_buckets / MAX_CHUNK_TABLE);
-
+                               max_nr_buckets / MAX_CHUNK_TABLE);
        nr_chunks = max_nr_buckets / min_nr_alloc_buckets;
        cds_lfht_size = offsetof(struct cds_lfht, tbl_chunk) +
                        sizeof(ht->tbl_chunk[0]) * nr_chunks;
@@ -88,14 +87,13 @@ struct cds_lfht *alloc_cds_lfht(unsigned long min_nr_alloc_buckets,
        ht = calloc(1, cds_lfht_size);
        assert(ht);
 
+       ht->bucket_at = bucket_at;
        ht->mm = &cds_lfht_mm_chunk;
-
        ht->min_nr_alloc_buckets = min_nr_alloc_buckets;
-       ht->min_alloc_buckets_order = get_count_order_ulong(min_nr_alloc_buckets);
+       ht->min_alloc_buckets_order =
+               get_count_order_ulong(min_nr_alloc_buckets);
        ht->max_nr_buckets = max_nr_buckets;
 
-       ht->bucket_at = bucket_at;
-
        return ht;
 }
 
index 542c884e9f576c4dae45186b4fa0b4849cbd4eb8..e2c565e67fee5b48654f9eb12b72aa6f41ec8c44 100644 (file)
@@ -140,14 +140,13 @@ struct cds_lfht *alloc_cds_lfht(unsigned long min_nr_alloc_buckets,
        ht = calloc(1, sizeof(struct cds_lfht));
        assert(ht);
 
+       ht->bucket_at = bucket_at;
        ht->mm = &cds_lfht_mm_mmap;
-
        ht->min_nr_alloc_buckets = min_nr_alloc_buckets;
        ht->min_alloc_buckets_order =
                        get_count_order_ulong(min_nr_alloc_buckets);
        ht->max_nr_buckets = max_nr_buckets;
 
-       ht->bucket_at = bucket_at;
 
        return ht;
 }
index 69e2b622a6eeb4020b06980818e8951120a92af7..9c0c70e421244cb47c07a4d2a545b0e1f8478718 100644 (file)
@@ -82,14 +82,13 @@ struct cds_lfht *alloc_cds_lfht(unsigned long min_nr_alloc_buckets,
        ht = calloc(1, sizeof(struct cds_lfht));
        assert(ht);
 
+       ht->bucket_at = bucket_at;
        ht->mm = &cds_lfht_mm_order;
-
        ht->min_nr_alloc_buckets = min_nr_alloc_buckets;
-       ht->min_alloc_buckets_order = get_count_order_ulong(min_nr_alloc_buckets);
+       ht->min_alloc_buckets_order =
+               get_count_order_ulong(min_nr_alloc_buckets);
        ht->max_nr_buckets = max_nr_buckets;
 
-       ht->bucket_at = bucket_at;
-
        return ht;
 }
 
This page took 0.029535 seconds and 4 git commands to generate.