]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/ofed/management/libibumad/man/umad_poll.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / ofed / management / libibumad / man / umad_poll.3
1 .\" -*- nroff -*-
2 .\"
3 .TH UMAD_POLL 3  "October 23, 2007" "OpenIB" "OpenIB Programmer\'s Manual"
4 .SH "NAME"
5 umad_poll \- poll umad
6 .SH "SYNOPSIS"
7 .nf
8 .B #include <infiniband/umad.h>
9 .sp
10 .BI "int umad_poll(int " "portid" ", int " "timeout_ms");
11 .fi
12 .SH "DESCRIPTION"
13 .B umad_poll()
14 waits up to
15 .I timeout_ms\fR
16 milliseconds for a packet to be received from the port specified by
17 .I portid\fR.
18 Once a packet is ready to be read, the function
19 returns 0. After that the packet can be read using
20 .B umad_recv().
21 Otherwise, \-ETIMEDOUT is returned. Note that successfully polling a port
22 does not guarantee that the subsequent
23 .B umad_recv()
24 will be non blocking when several threads are using
25 the same port. Instead, use a
26 .I timeout_ms\fR
27 parameter of zero to
28 .B umad_recv()
29 to ensure a non-blocking read.
30 .SH "RETURN VALUE"
31 .B umad_poll()
32 returns 0 on success, and a negative value on error as follows:
33  -EINVAL    invalid port handle or agentid
34  -ETIMEDOUT poll operation timed out
35  -EIO       poll operation failed
36 .SH "SEE ALSO"
37 .BR umad_recv (3)
38 .SH "AUTHOR"
39 .TP
40 Hal Rosenstock <halr@voltaire.com>