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: Cunyin Chang <cunyin.chang@intel.com>
This commit is contained in:
Cunyin Chang 2016-06-06 14:23:42 +08:00 committed by Daniel Verkamp
parent b1b7bebdc7
commit f0d2e5508c
3 changed files with 11 additions and 11 deletions

View File

@ -318,7 +318,7 @@ spdk_app_init(struct spdk_app_opts *opts)
* reactor_mask will be NULL which will enable all cores to run * reactor_mask will be NULL which will enable all cores to run
* reactors. * reactors.
*/ */
if (spdk_reactor_subsystem_init(opts->reactor_mask)) { if (spdk_reactors_init(opts->reactor_mask)) {
fprintf(stderr, "Invalid reactor mask.\n"); fprintf(stderr, "Invalid reactor mask.\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@ -423,7 +423,7 @@ spdk_app_start(spdk_event_fn start_fn, void *arg1, void *arg2)
spdk_event_call(event); spdk_event_call(event);
/* This blocks until spdk_app_stop is called */ /* This blocks until spdk_app_stop is called */
spdk_reactor_subsystem_start(); spdk_reactors_start();
return g_spdk_app.rc; return g_spdk_app.rc;
} }
@ -431,7 +431,7 @@ spdk_app_start(spdk_event_fn start_fn, void *arg1, void *arg2)
void void
spdk_app_stop(int rc) spdk_app_stop(int rc)
{ {
spdk_reactor_subsystem_stop(); spdk_reactors_stop();
g_spdk_app.rc = rc; g_spdk_app.rc = rc;
} }

View File

@ -404,7 +404,7 @@ spdk_reactor_get_socket_mask(void)
} }
void void
spdk_reactor_subsystem_start(void) spdk_reactors_start(void)
{ {
struct spdk_reactor *reactor; struct spdk_reactor *reactor;
uint32_t i; uint32_t i;
@ -429,13 +429,13 @@ spdk_reactor_subsystem_start(void)
g_reactor_state = SPDK_REACTOR_STATE_SHUTDOWN; 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; g_reactor_state = SPDK_REACTOR_STATE_EXITING;
} }
int int
spdk_reactor_subsystem_init(const char *mask) spdk_reactors_init(const char *mask)
{ {
uint32_t i; uint32_t i;
int rc; int rc;
@ -474,7 +474,7 @@ spdk_reactor_subsystem_init(const char *mask)
} }
int int
spdk_reactor_subsystem_fini(void) spdk_reactors_fini(void)
{ {
/* TODO: free rings and mempool */ /* TODO: free rings and mempool */
return 0; return 0;

View File

@ -34,10 +34,10 @@
#ifndef SPDK_REACTOR_H_ #ifndef SPDK_REACTOR_H_
#define SPDK_REACTOR_H_ #define SPDK_REACTOR_H_
int spdk_reactor_subsystem_init(const char *mask); int spdk_reactors_init(const char *mask);
int spdk_reactor_subsystem_fini(void); int spdk_reactors_fini(void);
void spdk_reactor_subsystem_start(void); void spdk_reactors_start(void);
void spdk_reactor_subsystem_stop(void); void spdk_reactors_stop(void);
#endif #endif