]> git.openfabrics.org - ~shefty/librdmacm.git/commit
rsocket: Merge nonblock test with test() routine in rs_process_cq
authorSean Hefty <sean.hefty@intel.com>
Sat, 26 May 2012 07:02:47 +0000 (00:02 -0700)
committerSean Hefty <sean.hefty@intel.com>
Sat, 26 May 2012 07:02:47 +0000 (00:02 -0700)
commitffa5cddcb740eb5e392038beeec086858082ba0f
tree21cab4e0e2179a70e55cee483fbfdabf4510108a
parentb6f44cc4d1cce1b5580696e1fa60245b83c9382c
rsocket: Merge nonblock test with test() routine in rs_process_cq

rs_process_cq takes the following 2 parameters: nonblock and test().
These are used to control the operation of rs_process_cq.  If
nonblock is true, rs_process_cq will exit without arming the CQ or
waiting on a CQ event.  rs_process_cq() will also exit if test()
returns true.  The only difference in the operation is the return
value that rs_process_cq() returns.

We can simplify the code by merging the nonblock test into the
caller's provided test() routine.  The test() routine simply needs
to return the correct value for rs_process_cq().  This will also
simplify fixing an issue where a caller may block indefinitely
in send() or recv() after an rsocket has been disconnected.  That
fix is in a subsequent patch.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>