rocksdb: Add an SpdkFinalizeThread function
This is just a placeholder. The real implementation comes later. Change-Id: I657b240977ba09fd6f24e9e36e97e293e73b5801 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449471 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>
This commit is contained in:
parent
29b446a1bc
commit
c04332d494
@ -590,6 +590,10 @@ void SpdkInitializeThread(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SpdkFinalizeThread(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
struct SpdkThreadState {
|
struct SpdkThreadState {
|
||||||
void (*user_function)(void *);
|
void (*user_function)(void *);
|
||||||
void *arg;
|
void *arg;
|
||||||
@ -601,6 +605,7 @@ static void SpdkStartThreadWrapper(void *arg)
|
|||||||
|
|
||||||
SpdkInitializeThread();
|
SpdkInitializeThread();
|
||||||
state->user_function(state->arg);
|
state->user_function(state->arg);
|
||||||
|
SpdkFinalizeThread();
|
||||||
delete state;
|
delete state;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -722,6 +727,7 @@ SpdkEnv::~SpdkEnv()
|
|||||||
if (!g_sync_args.channel) {
|
if (!g_sync_args.channel) {
|
||||||
SpdkInitializeThread();
|
SpdkInitializeThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
iter = spdk_fs_iter_first(g_fs);
|
iter = spdk_fs_iter_first(g_fs);
|
||||||
while (iter != NULL) {
|
while (iter != NULL) {
|
||||||
file = spdk_fs_iter_get_file(iter);
|
file = spdk_fs_iter_get_file(iter);
|
||||||
@ -730,6 +736,7 @@ SpdkEnv::~SpdkEnv()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SpdkFinalizeThread();
|
||||||
spdk_app_start_shutdown();
|
spdk_app_start_shutdown();
|
||||||
pthread_join(mSpdkTid, NULL);
|
pthread_join(mSpdkTid, NULL);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user