From: Mathieu Desnoyers Date: Mon, 29 Jun 2015 20:29:36 +0000 (-0400) Subject: Cleanup: cast poll() return value to void for delays X-Git-Tag: v0.9.0~57 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=109105b7f91d58e29a2b0cfb18c325d57cf80199;p=urcu.git Cleanup: cast poll() return value to void for delays Explicitly state that we don't care about poll return value in those cases. Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h index c4a7875..5cc02d9 100644 --- a/urcu-call-rcu-impl.h +++ b/urcu-call-rcu-impl.h @@ -309,7 +309,7 @@ static void *call_rcu_thread(void *arg) cmm_smp_mb__before_uatomic_or(); uatomic_or(&crdp->flags, URCU_CALL_RCU_PAUSED); while ((uatomic_read(&crdp->flags) & URCU_CALL_RCU_PAUSE) != 0) - poll(NULL, 0, 1); + (void) poll(NULL, 0, 1); uatomic_and(&crdp->flags, ~URCU_CALL_RCU_PAUSED); cmm_smp_mb__after_uatomic_and(); rcu_register_thread(); @@ -341,7 +341,7 @@ static void *call_rcu_thread(void *arg) if (cds_wfcq_empty(&crdp->cbs_head, &crdp->cbs_tail)) { call_rcu_wait(crdp); - poll(NULL, 0, 10); + (void) poll(NULL, 0, 10); uatomic_dec(&crdp->futex); /* * Decrement futex before reading @@ -349,10 +349,10 @@ static void *call_rcu_thread(void *arg) */ cmm_smp_mb(); } else { - poll(NULL, 0, 10); + (void) poll(NULL, 0, 10); } } else { - poll(NULL, 0, 10); + (void) poll(NULL, 0, 10); } rcu_thread_online(); } @@ -710,7 +710,7 @@ void call_rcu_data_free(struct call_rcu_data *crdp) uatomic_or(&crdp->flags, URCU_CALL_RCU_STOP); wake_call_rcu_thread(crdp); while ((uatomic_read(&crdp->flags) & URCU_CALL_RCU_STOPPED) == 0) - poll(NULL, 0, 1); + (void) poll(NULL, 0, 1); } if (!cds_wfcq_empty(&crdp->cbs_head, &crdp->cbs_tail)) { /* Create default call rcu data if need be */ @@ -880,7 +880,7 @@ void call_rcu_before_fork(void) } cds_list_for_each_entry(crdp, &call_rcu_data_list, list) { while ((uatomic_read(&crdp->flags) & URCU_CALL_RCU_PAUSED) == 0) - poll(NULL, 0, 1); + (void) poll(NULL, 0, 1); } } @@ -897,7 +897,7 @@ void call_rcu_after_fork_parent(void) uatomic_and(&crdp->flags, ~URCU_CALL_RCU_PAUSE); cds_list_for_each_entry(crdp, &call_rcu_data_list, list) { while ((uatomic_read(&crdp->flags) & URCU_CALL_RCU_PAUSED) != 0) - poll(NULL, 0, 1); + (void) poll(NULL, 0, 1); } call_rcu_unlock(&call_rcu_mutex); }