From: Anoop Saldanha Date: Mon, 25 Mar 2013 09:51:09 +0000 (+0530) Subject: Add a usleep to CudaBuffer culling process. Would lead to a situation where the threa... X-Git-Tag: suricata-2.0beta1~102 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=70cb4d30ebdaeb6f6b4b68d47356bc5d6865e10a;p=thirdparty%2Fsuricata.git Add a usleep to CudaBuffer culling process. Would lead to a situation where the thread wouldn't care to yield to others." --- diff --git a/src/util-cuda-buffer.c b/src/util-cuda-buffer.c index f94b3dcca1..d332470d3e 100644 --- a/src/util-cuda-buffer.c +++ b/src/util-cuda-buffer.c @@ -155,7 +155,7 @@ void CudaBufferCullCompletedSlices(CudaBufferData *cb_data, SCLogDebug("CudaBuffer waiting on an item to finish"); if (buffer_reset) { while (!SC_ATOMIC_GET(slice_temp->done)) - ; + usleep(1); } else { break; }