}
void cds_lfht_count_nodes(struct cds_lfht *ht,
- unsigned long *approx_before,
+ long *approx_before,
unsigned long *count,
unsigned long *removed,
- unsigned long *approx_after)
+ long *approx_after)
{
struct cds_lfht_node *node, *next;
struct _cds_lfht_node *lookup;
rcu_register_thread();
for (;;) {
- unsigned long count, removed, approx_before, approx_after;
+ unsigned long count, removed;
+ long approx_before, approx_after;
ssize_t len;
char buf[1];
&approx_after);
rcu_read_unlock();
printf("done.\n");
- printf("Approximation before node accounting: %lu nodes.\n",
+ printf("Approximation before node accounting: %ld nodes.\n",
approx_before);
printf("Accounting of nodes in the hash table: "
"%lu nodes + %lu logically removed.\n",
count, removed);
- printf("Approximation after node accounting: %lu nodes.\n",
+ printf("Approximation after node accounting: %ld nodes.\n",
approx_after);
}
rcu_unregister_thread();
struct wr_count *count_writer;
unsigned long long tot_reads = 0, tot_writes = 0,
tot_add = 0, tot_add_exist = 0, tot_remove = 0;
- unsigned long count, removed, approx_before, approx_after;
+ unsigned long count, removed;
+ long approx_before, approx_after;
int i, a, ret;
struct sigaction act;
unsigned int remain;
&approx_after);
printf("done.\n");
if (count || removed) {
- printf("Approximation before node accounting: %lu nodes.\n",
+ printf("Approximation before node accounting: %ld nodes.\n",
approx_before);
printf("WARNING: nodes left in the hash table upon destroy: "
"%lu nodes + %lu logically removed.\n",
count, removed);
- printf("Approximation after node accounting: %lu nodes.\n",
+ printf("Approximation after node accounting: %ld nodes.\n",
approx_after);
}
ret = cds_lfht_destroy(test_ht, NULL);
* Call with rcu_read_lock held.
*/
void cds_lfht_count_nodes(struct cds_lfht *ht,
- unsigned long *approx_before,
+ long *approx_before,
unsigned long *count,
unsigned long *removed,
- unsigned long *approx_after);
+ long *approx_after);
/*
* cds_lfht_lookup - lookup a node by key.