event: add an error check for spdk_allocate_thread()

Change-Id: Ib338bc536eaed82b93d106be1e5044d9dc3a04df
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/381192
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
GangCao 2017-10-03 06:23:56 -04:00 committed by Daniel Verkamp
parent 1ae9dd67b6
commit 108e3d9600

View File

@ -357,7 +357,9 @@ _spdk_reactor_run(void *arg)
char thread_name[32];
snprintf(thread_name, sizeof(thread_name), "reactor_%u", reactor->lcore);
spdk_allocate_thread(_spdk_reactor_send_msg, &reactor->lcore, thread_name);
if (spdk_allocate_thread(_spdk_reactor_send_msg, &reactor->lcore, thread_name) == NULL) {
return -1;
}
SPDK_NOTICELOG("Reactor started on core %u on socket %u\n", reactor->lcore,
reactor->socket_id);