void psmx_cq_enqueue_event(struct psmx_fid_cq *cq, struct psmx_cq_event *event) { slist_insert_tail(&event->list_entry, &cq->event_queue); cq->event_count++; if (cq->wait) psmx_wait_signal((struct fid_wait *)cq->wait); }
void psmx_cq_enqueue_event(struct psmx_fid_cq *cq, struct psmx_cq_event *event) { pthread_mutex_lock(&cq->mutex); slist_insert_tail(&event->list_entry, &cq->event_queue); cq->event_count++; pthread_mutex_unlock(&cq->mutex); if (cq->wait) psmx_wait_signal((struct fid_wait *)cq->wait); }
void psmx_cq_enqueue_event(struct psmx_fid_cq *cq, struct psmx_cq_event *event) { fastlock_acquire(&cq->lock); slist_insert_tail(&event->list_entry, &cq->event_queue); cq->event_count++; fastlock_release(&cq->lock); if (cq->wait) psmx_wait_signal((struct fid_wait *)cq->wait); }
static int psmx_cntr_set(struct fid_cntr *cntr, uint64_t value) { struct psmx_fid_cntr *cntr_priv; cntr_priv = container_of(cntr, struct psmx_fid_cntr, cntr); cntr_priv->counter = value; psmx_cntr_check_trigger(cntr_priv); if (cntr_priv->wait) psmx_wait_signal((struct fid_wait *)cntr_priv->wait); return 0; }