* This keeps events in order if dat_evd_wait() has copied events
* from CQ to EVD.
*/
- dapl_os_lock(&evd_ptr->pending_event_queue_lock); /* temporary workaround for the ring buffer race condition */
- local_event =
- (DAT_EVENT *) dapls_rbuf_remove(&evd_ptr->pending_event_queue);
- dapl_os_unlock(&evd_ptr->pending_event_queue_lock); /* temporary workaround for the ring buffer race condition */
+ local_event = (DAT_EVENT *) dapls_rbuf_remove(&evd_ptr->pending_event_queue);
if (local_event != NULL) {
*event = *local_event;
dat_status = dapls_rbuf_add(&evd_ptr->free_event_queue,
event_ptr++;
}
- /* temporary workaround for the ring buffer race condition */
- dapl_os_lock_init(&evd_ptr->pending_event_queue_lock);
-
evd_ptr->cq_notified = DAT_FALSE;
evd_ptr->cq_notified_when = 0;
evd_ptr->threshold = 0;
__FUNCTION__, dapl_event_str(event_ptr->event_number),
evd_ptr, evd_ptr->evd_state);
- dapl_os_lock(&evd_ptr->pending_event_queue_lock); /* temporary work around for the ring buffer race condition */
dat_status = dapls_rbuf_add(&evd_ptr->pending_event_queue,
(void *)event_ptr);
- dapl_os_unlock(&evd_ptr->pending_event_queue_lock); /* temporary work around for the ring buffer race condition */
dapl_os_assert(dat_status == DAT_SUCCESS);
dapl_os_assert(evd_ptr->evd_state == DAPL_EVD_STATE_WAITED
evd_ptr->evd_state = DAPL_EVD_STATE_OPEN;
if (dat_status == DAT_SUCCESS) {
- dapl_os_lock(&evd_ptr->pending_event_queue_lock); /* temporary work around for the ring buffer race condition */
local_event = dapls_rbuf_remove(&evd_ptr->pending_event_queue);
- dapl_os_unlock(&evd_ptr->pending_event_queue_lock); /* temporary work around for the ring buffer race condition */
*event = *local_event;
dapls_rbuf_add(&evd_ptr->free_event_queue, local_event);
}