From ffa5cddcb740eb5e392038beeec086858082ba0f Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Sat, 26 May 2012 00:02:47 -0700 Subject: [PATCH] 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 -- 2.45.2