]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
librdmacm/cmatose: suspend thread when polling for completions
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 7 Apr 2009 20:55:45 +0000 (20:55 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 7 Apr 2009 20:55:45 +0000 (20:55 +0000)
Prevent starvation of other threads.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2085 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

branches/winverbs/ulp/librdmacm/examples/cmatose/cmatose.c

index b9a8232d095de62b49480e2a156a2dc0edb204ec..c7d89815c4411dd3deda81fff4371b4aa64ec7af 100644 (file)
@@ -417,6 +417,7 @@ static int poll_cqs(enum CQ_INDEX index)
                                printf("cmatose: failed polling CQ: 0x%x\n", ret);\r
                                return ret;\r
                        }\r
+                       Sleep(0);\r
                }\r
        }\r
        return 0;\r