d82d69017f
Add enum spdk_thread_op and two function typedefs spdk_thread_op_fn and spdk_thread_op_supported_fn. The first operation type of enum spdk_thread_op is SPDK_THREAD_OP_NEW, and it is used as an alternative to spdk_new_thread_fn. Add global variables, g_thread_op_fn and g_thread_op_supported_fn, and then add spdk_thread_lib_init_ext() to initialize these. spdk_thread_lib_init() requires both of thread_op_fn and thread_op_supported_fn are specified or not specified. spdk_thread_create() calls g_thread_op_fn() with SPDK_THREAD_OP_NEW if g_new_thread_fn is NULL, g_thread_op_supported_fn is not NULL, and g_thread_op_supported_fn(SPDK_THREAD_OP_NEW) returns true. Update unit test to test these addition. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I56db903f62437f6ff3198248ffc5dede396c22bc Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/967 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> |
||
---|---|---|
.. | ||
include | ||
lib | ||
Makefile | ||
unittest.sh |