Spdk/test/common/lib
Tomasz Zawadzki d7aff25df0 ut/common: add poll_thread_times() to poll select number of iterations
Right now functions poll_thread() and poll_threads(), polled
always until there were no further messages to process.
This allows to put next operation to execute only after
previous one completed.

Function poll_thread_times() allows to poll certain thread
for exact number of executions. If 0 is passed to max_polls,
then this function executes single message and all pollers,
until no messages are left.

With this change it is possible to only run a thread
selected number of iterations. Allowing to add another operation
without first one finishing.

It will become useful in blobstore UT, where two operations
will be executed with slight delay between them.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4a6537695389f30130ea2fd2fd43d7b2cb2dea39
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/772
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-21 09:35:27 +00:00
..
nvme nvme: publicly declare spdk_nvme_transport 2020-02-18 08:05:08 +00:00
test_env.c test/common: Mock CPU core operations for unit tests 2020-01-03 08:33:25 +00:00
test_sock.c sock/posix: Add flush 2020-01-22 13:53:09 +00:00
ut_multithread.c ut/common: add poll_thread_times() to poll select number of iterations 2020-02-21 09:35:27 +00:00