lnet_eq_free(eq);
return -ENOMEM;
}
+EXPORT_SYMBOL(LNetEQAlloc);
/**
* Release the resources associated with an event queue if it's idle;
return rc;
}
+EXPORT_SYMBOL(LNetEQFree);
void
lnet_eq_enqueue_event(lnet_eq_t *eq, lnet_event_t *ev)
if (LNET_SEQ_GT(eq->eq_deq_seq, new_event->sequence))
RETURN(0);
- /* We've got a new event... */
- *ev = *new_event;
+ /* We've got a new event... */
+ *ev = *new_event;
CDEBUG(D_INFO, "event: %p, sequence: %lu, eq->size: %u\n",
new_event, eq->eq_deq_seq, eq->eq_size);
return LNetEQPoll(&eventq, 1, 0,
event, &which);
}
+EXPORT_SYMBOL(LNetEQGet);
/**
* Block the calling process until there is an event in the EQ.
return LNetEQPoll(&eventq, 1, LNET_TIME_FOREVER,
event, &which);
}
+EXPORT_SYMBOL(LNetEQWait);
#ifdef __KERNEL__
static int
lnet_eq_wait_locked(int *timeout_ms)
{
- int tms = *timeout_ms;
- int wait;
- cfs_waitlink_t wl;
- cfs_time_t now;
+ int tms = *timeout_ms;
+ int wait;
+ cfs_waitlink_t wl;
+ cfs_time_t now;
if (tms == 0)
return -1; /* don't want to wait and no new event */
static int
lnet_eq_wait_locked(int *timeout_ms)
{
- lnet_ni_t *eq_waitni = NULL;
- int tms = *timeout_ms;
- int wait;
- struct timeval then;
- struct timeval now;
+ lnet_ni_t *eq_waitni = NULL;
+ int tms = *timeout_ms;
+ int wait;
+ struct timeval then;
+ struct timeval now;
if (the_lnet.ln_eq_waitni != NULL) {
/* I have a single NI that I have to call into, to get
* \retval -ENOENT If there's an invalid handle in \a eventqs.
*/
int
-LNetEQPoll (lnet_handle_eq_t *eventqs, int neq, int timeout_ms,
- lnet_event_t *event, int *which)
+LNetEQPoll(lnet_handle_eq_t *eventqs, int neq, int timeout_ms,
+ lnet_event_t *event, int *which)
{
int wait = 1;
int rc;
lnet_eq_wait_lock();
- for (;;) {
+ for (;;) {
#ifndef __KERNEL__
lnet_eq_wait_unlock();