summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3b4d308)
Rename local variables that are shadowed by global variables.
Change-Id: Ic60e880cb6e98d6111e6b747d9668731a156e4fa
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
}
{
char msg[1] = { 0x42 };
}
{
char msg[1] = { 0x42 };
- ret = write(count_pipe[1], msg, 1); /* wakeup thread */
- } while (ret == -1L && errno == EINTR);
+ sret = write(count_pipe[1], msg, 1); /* wakeup thread */
+ } while (sret == -1L && errno == EINTR);
}
err = pthread_join(tid_count, &tret);
if (err != 0) {
}
err = pthread_join(tid_count, &tret);
if (err != 0) {
-void test_end(struct cds_lfq_queue_rcu *q, unsigned long long *nr_dequeues)
+void test_end(unsigned long long *nr_dequeues_l)
{
struct cds_lfq_node_rcu *snode;
do {
{
struct cds_lfq_node_rcu *snode;
do {
- snode = cds_lfq_dequeue_rcu(q);
+ snode = cds_lfq_dequeue_rcu(&q);
if (snode) {
struct test *node;
node = caa_container_of(snode, struct test, list);
free(node); /* no more concurrent access */
if (snode) {
struct test *node;
node = caa_container_of(snode, struct test, list);
free(node); /* no more concurrent access */
tot_successful_dequeues += count_dequeuer[2 * i_thr + 1];
}
tot_successful_dequeues += count_dequeuer[2 * i_thr + 1];
}
- test_end(&q, &end_dequeues);
+ test_end(&end_dequeues);
err = cds_lfq_destroy_rcu(&q);
assert(!err);
err = cds_lfq_destroy_rcu(&q);
assert(!err);
-static void test_end(struct cds_lfs_stack *s, unsigned long long *nr_dequeues)
+static void test_end(unsigned long long *nr_dequeues_l)
{
struct cds_lfs_node *snode;
do {
{
struct cds_lfs_node *snode;
do {
- snode = __cds_lfs_pop(s);
+ snode = __cds_lfs_pop(&s);
if (snode) {
struct test *node;
node = caa_container_of(snode, struct test, list);
free(node);
if (snode) {
struct test *node;
node = caa_container_of(snode, struct test, list);
free(node);
tot_successful_dequeues += count_dequeuer[2 * i_thr + 1];
}
tot_successful_dequeues += count_dequeuer[2 * i_thr + 1];
}
- test_end(&s, &end_dequeues);
+ test_end(&end_dequeues);
printf_verbose("total number of enqueues : %llu, dequeues %llu\n",
tot_enqueues, tot_dequeues);
printf_verbose("total number of enqueues : %llu, dequeues %llu\n",
tot_enqueues, tot_dequeues);
-void test_end(struct cds_lfs_stack_rcu *s, unsigned long long *nr_dequeues)
+void test_end(unsigned long long *nr_dequeues_l)
{
struct cds_lfs_node_rcu *snode;
do {
{
struct cds_lfs_node_rcu *snode;
do {
- snode = cds_lfs_pop_rcu(s);
+ snode = cds_lfs_pop_rcu(&s);
if (snode) {
struct test *node;
node = caa_container_of(snode, struct test, list);
free(node);
if (snode) {
struct test *node;
node = caa_container_of(snode, struct test, list);
free(node);
tot_successful_dequeues += count_dequeuer[2 * i_thr + 1];
}
tot_successful_dequeues += count_dequeuer[2 * i_thr + 1];
}
- test_end(&s, &end_dequeues);
+ test_end(&end_dequeues);
printf_verbose("total number of enqueues : %llu, dequeues %llu\n",
tot_enqueues, tot_dequeues);
printf_verbose("total number of enqueues : %llu, dequeues %llu\n",
tot_enqueues, tot_dequeues);
-static void test_end(unsigned long long *nr_dequeues,
- unsigned long long *nr_dequeue_last)
+static void test_end(unsigned long long *nr_dequeues_l,
+ unsigned long long *nr_dequeue_last_l)
{
struct cds_wfcq_node *node;
int state;
{
struct cds_wfcq_node *node;
int state;
&state);
if (node) {
if (state & CDS_WFCQ_STATE_LAST)
&state);
if (node) {
if (state & CDS_WFCQ_STATE_LAST)
+ (*nr_dequeue_last_l)++;
-void test_end(struct cds_wfq_queue *q, unsigned long long *nr_dequeues)
+void test_end(unsigned long long *nr_dequeues_l)
{
struct cds_wfq_node *node;
do {
{
struct cds_wfq_node *node;
do {
- node = cds_wfq_dequeue_blocking(q);
+ node = cds_wfq_dequeue_blocking(&q);
tot_successful_dequeues += count_dequeuer[2 * i_thr + 1];
}
tot_successful_dequeues += count_dequeuer[2 * i_thr + 1];
}
- test_end(&q, &end_dequeues);
+ test_end(&end_dequeues);
printf_verbose("total number of enqueues : %llu, dequeues %llu\n",
tot_enqueues, tot_dequeues);
printf_verbose("total number of enqueues : %llu, dequeues %llu\n",
tot_enqueues, tot_dequeues);
-static void test_end(struct cds_wfs_stack *s, unsigned long long *nr_dequeues,
- unsigned long long *nr_pop_last)
+static void test_end(unsigned long long *nr_dequeues_l,
+ unsigned long long *nr_pop_last_l)
{
struct cds_wfs_node *node;
int state;
do {
{
struct cds_wfs_node *node;
int state;
do {
- node = cds_wfs_pop_with_state_blocking(s, &state);
+ node = cds_wfs_pop_with_state_blocking(&s, &state);
if (node) {
if (state & CDS_WFS_STATE_LAST)
if (node) {
if (state & CDS_WFS_STATE_LAST)
tot_pop_last += count_dequeuer[4 * i_thr + 3];
}
tot_pop_last += count_dequeuer[4 * i_thr + 3];
}
- test_end(&s, &end_dequeues, &tot_pop_last);
+ test_end(&end_dequeues, &tot_pop_last);
printf_verbose("total number of enqueues : %llu, dequeues %llu\n",
tot_enqueues, tot_dequeues);
printf_verbose("total number of enqueues : %llu, dequeues %llu\n",
tot_enqueues, tot_dequeues);