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 {
|
||||
void (*user_function)(void *);
|
||||
void *arg;
|
||||
@ -601,6 +605,7 @@ static void SpdkStartThreadWrapper(void *arg)
|
||||
|
||||
SpdkInitializeThread();
|
||||
state->user_function(state->arg);
|
||||
SpdkFinalizeThread();
|
||||
delete state;
|
||||
}
|
||||
|
||||
@ -722,6 +727,7 @@ SpdkEnv::~SpdkEnv()
|
||||
if (!g_sync_args.channel) {
|
||||
SpdkInitializeThread();
|
||||
}
|
||||
|
||||
iter = spdk_fs_iter_first(g_fs);
|
||||
while (iter != NULL) {
|
||||
file = spdk_fs_iter_get_file(iter);
|
||||
@ -730,6 +736,7 @@ SpdkEnv::~SpdkEnv()
|
||||
}
|
||||
}
|
||||
|
||||
SpdkFinalizeThread();
|
||||
spdk_app_start_shutdown();
|
||||
pthread_join(mSpdkTid, NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user