Commit f0d2e550 authored by Cunyin Chang's avatar Cunyin Chang Committed by Daniel Verkamp
Browse files

event: Remove the concept of subsystem from the reactor.



Eliminate the misconception of reactor, it actually not a subsystem.

Change-Id: I63ea46f0dfa34661f16526a71c47e8fba9813474
Signed-off-by: default avatarCunyin Chang <cunyin.chang@intel.com>
parent b1b7bebd
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ spdk_app_init(struct spdk_app_opts *opts)
	 *  reactor_mask will be NULL which will enable all cores to run
	 *  reactors.
	 */
	if (spdk_reactor_subsystem_init(opts->reactor_mask)) {
	if (spdk_reactors_init(opts->reactor_mask)) {
		fprintf(stderr, "Invalid reactor mask.\n");
		exit(EXIT_FAILURE);
	}
@@ -423,7 +423,7 @@ spdk_app_start(spdk_event_fn start_fn, void *arg1, void *arg2)
	spdk_event_call(event);

	/* This blocks until spdk_app_stop is called */
	spdk_reactor_subsystem_start();
	spdk_reactors_start();

	return g_spdk_app.rc;
}
@@ -431,7 +431,7 @@ spdk_app_start(spdk_event_fn start_fn, void *arg1, void *arg2)
void
spdk_app_stop(int rc)
{
	spdk_reactor_subsystem_stop();
	spdk_reactors_stop();
	g_spdk_app.rc = rc;
}

+4 −4
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ spdk_reactor_get_socket_mask(void)
}

void
spdk_reactor_subsystem_start(void)
spdk_reactors_start(void)
{
	struct spdk_reactor *reactor;
	uint32_t i;
@@ -429,13 +429,13 @@ spdk_reactor_subsystem_start(void)
	g_reactor_state = SPDK_REACTOR_STATE_SHUTDOWN;
}

void spdk_reactor_subsystem_stop(void)
void spdk_reactors_stop(void)
{
	g_reactor_state = SPDK_REACTOR_STATE_EXITING;
}

int
spdk_reactor_subsystem_init(const char *mask)
spdk_reactors_init(const char *mask)
{
	uint32_t i;
	int rc;
@@ -474,7 +474,7 @@ spdk_reactor_subsystem_init(const char *mask)
}

int
spdk_reactor_subsystem_fini(void)
spdk_reactors_fini(void)
{
	/* TODO: free rings and mempool */
	return 0;
+4 −4
Original line number Diff line number Diff line
@@ -34,10 +34,10 @@
#ifndef SPDK_REACTOR_H_
#define SPDK_REACTOR_H_

int spdk_reactor_subsystem_init(const char *mask);
int spdk_reactor_subsystem_fini(void);
int spdk_reactors_init(const char *mask);
int spdk_reactors_fini(void);

void spdk_reactor_subsystem_start(void);
void spdk_reactor_subsystem_stop(void);
void spdk_reactors_start(void);
void spdk_reactors_stop(void);

#endif