Commit 2d48b7dc authored by John Levon's avatar John Levon Committed by Tomasz Zawadzki
Browse files

lib/event: avoid cast of event_queue_run_batch



Signed-off-by: default avatarJohn Levon <john.levon@nutanix.com>
Change-Id: I1f23b9ab3aa5ace791a9460267606fcb03287245
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9776


Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 78ef7cfc
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -527,10 +527,11 @@ spdk_event_call(struct spdk_event *event)
	}
}

static inline uint32_t
event_queue_run_batch(struct spdk_reactor *reactor)
static inline int
event_queue_run_batch(void *arg)
{
	unsigned count, i;
	struct spdk_reactor *reactor = arg;
	size_t count, i;
	void *events[SPDK_EVENT_BATCH_SIZE];
	struct spdk_thread *thread;
	struct spdk_lw_thread *lw_thread;
@@ -598,7 +599,7 @@ event_queue_run_batch(struct spdk_reactor *reactor)

	spdk_mempool_put_bulk(g_spdk_event_mempool, events, count);

	return count;
	return (int)count;
}

/* 1s */
@@ -1429,7 +1430,7 @@ reactor_interrupt_init(struct spdk_reactor *reactor)
	}

	rc = spdk_fd_group_add(reactor->fgrp, reactor->events_fd,
			       (spdk_fd_fn)event_queue_run_batch, reactor);
			       event_queue_run_batch, reactor);
	if (rc) {
		spdk_fd_group_remove(reactor->fgrp, reactor->resched_fd);
		close(reactor->resched_fd);