event: remove spdk_event_t typedef

Use 'struct spdk_event *' directly for consistency with the rest of the
API.

Change-Id: Ib41a9bf47f5b18f4aebf5f4dee055455cb12ef7d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2017-01-04 18:24:18 -07:00 committed by Ben Walker
parent 9d90154537
commit c3ede774c7
10 changed files with 21 additions and 21 deletions

View File

@ -208,7 +208,7 @@ _nvmf_tgt_start_subsystem(void *arg1, void *arg2)
void
nvmf_tgt_start_subsystem(struct nvmf_tgt_subsystem *app_subsys)
{
spdk_event_t event;
struct spdk_event *event;
event = spdk_event_allocate(app_subsys->lcore, _nvmf_tgt_start_subsystem,
app_subsys, NULL, NULL);

View File

@ -80,7 +80,6 @@
#include "spdk/queue.h"
typedef struct spdk_event *spdk_event_t;
typedef void (*spdk_event_fn)(void *arg1, void *arg2);
/**
@ -199,14 +198,14 @@ uint32_t spdk_app_get_current_core(void);
/**
* \brief Allocate an event to be passed to \ref spdk_event_call
*/
spdk_event_t spdk_event_allocate(uint32_t lcore, spdk_event_fn fn,
void *arg1, void *arg2,
spdk_event_t next);
struct spdk_event *spdk_event_allocate(uint32_t lcore, spdk_event_fn fn,
void *arg1, void *arg2,
struct spdk_event *next);
/**
* \brief Pass the given event to the associated lcore and call the function.
*/
void spdk_event_call(spdk_event_t event);
void spdk_event_call(struct spdk_event *event);
/* TODO: This is only used by tests and should be made private */
uint32_t spdk_event_queue_run_batch(uint32_t lcore);

View File

@ -104,7 +104,7 @@ struct spdk_scsi_task {
struct spdk_io_channel *ch;
struct spdk_scsi_port *target_port;
struct spdk_scsi_port *initiator_port;
spdk_event_t cb_event;
struct spdk_event *cb_event;
uint32_t ref;
uint32_t id;

View File

@ -409,7 +409,7 @@ spdk_bdev_cleanup_pending_rbuf_io(struct spdk_bdev *bdev)
}
static void
__submit_request(struct spdk_bdev *bdev, struct spdk_bdev_io *bdev_io, spdk_event_t cb_event)
__submit_request(struct spdk_bdev *bdev, struct spdk_bdev_io *bdev_io, struct spdk_event *cb_event)
{
bdev_io->cb_event = cb_event;

View File

@ -74,7 +74,7 @@ struct spdk_app {
};
static struct spdk_app g_spdk_app;
static spdk_event_t g_shutdown_event = NULL;
static struct spdk_event *g_shutdown_event = NULL;
static int spdk_app_write_pidfile(void);
static void spdk_app_remove_pidfile(void);
@ -429,7 +429,7 @@ spdk_app_fini(void)
int
spdk_app_start(spdk_event_fn start_fn, void *arg1, void *arg2)
{
spdk_event_t event;
struct spdk_event *event;
g_spdk_app.rc = 0;

View File

@ -139,9 +139,9 @@ spdk_reactor_get(uint32_t lcore)
return reactor;
}
spdk_event_t
struct spdk_event *
spdk_event_allocate(uint32_t lcore, spdk_event_fn fn, void *arg1, void *arg2,
spdk_event_t next)
struct spdk_event *next)
{
struct spdk_event *event = NULL;
unsigned socket_id = rte_lcore_to_socket_id(lcore);
@ -164,7 +164,7 @@ spdk_event_allocate(uint32_t lcore, spdk_event_fn fn, void *arg1, void *arg2,
}
void
spdk_event_call(spdk_event_t event)
spdk_event_call(struct spdk_event *event)
{
int rc;
struct spdk_reactor *reactor;

View File

@ -185,7 +185,7 @@ blockdev_write(struct io_target *target, char *tx_buf,
uint64_t offset, int data_len, int iov_len)
{
struct bdevio_request req;
spdk_event_t event;
struct spdk_event *event;
req.target = target;
req.buf = tx_buf;
@ -231,7 +231,7 @@ blockdev_read(struct io_target *target, char *rx_buf,
uint64_t offset, int data_len, int iov_len)
{
struct bdevio_request req;
spdk_event_t event;
struct spdk_event *event;
req.target = target;
req.buf = rx_buf;
@ -641,7 +641,7 @@ static void
blockdev_reset(struct io_target *target, enum spdk_bdev_reset_type reset_type)
{
struct bdevio_request req;
spdk_event_t event;
struct spdk_event *event;
req.target = target;

View File

@ -185,7 +185,7 @@ bdevperf_complete(void *arg1, void *arg2)
struct io_target *target;
struct bdevperf_task *task = arg1;
struct spdk_bdev_io *bdev_io = arg2;
spdk_event_t complete;
struct spdk_event *complete;
target = task->target;
@ -485,7 +485,7 @@ bdevperf_run(void *arg1, void *arg2)
{
int i;
struct io_target *target;
spdk_event_t event;
struct spdk_event *event;
printf("Running I/O for %d seconds...\n", g_time_in_sec);
fflush(stdout);

View File

@ -92,8 +92,9 @@ spdk_app_get_current_core(void)
return 0;
}
spdk_event_t
spdk_event_allocate(uint32_t core, spdk_event_fn fn, void *arg1, void *arg2, spdk_event_t next)
struct spdk_event *
spdk_event_allocate(uint32_t core, spdk_event_fn fn, void *arg1, void *arg2,
struct spdk_event *next)
{
return NULL;
}

View File

@ -161,7 +161,7 @@ spdk_put_io_channel(struct spdk_io_channel *ch)
{
}
void spdk_event_call(spdk_event_t event)
void spdk_event_call(struct spdk_event *event)
{
}