diff --git a/runtime/include/global_request_scheduler.h b/runtime/include/global_request_scheduler.h index 8e363eb..437fccd 100644 --- a/runtime/include/global_request_scheduler.h +++ b/runtime/include/global_request_scheduler.h @@ -5,7 +5,7 @@ #include "sandbox_types.h" /* Returns pointer back if successful, null otherwise */ -typedef struct sandbox *(*global_request_scheduler_add_fn_t)(void *); +typedef struct sandbox *(*global_request_scheduler_add_fn_t)(struct sandbox *); typedef int (*global_request_scheduler_remove_fn_t)(struct sandbox **); typedef int (*global_request_scheduler_remove_if_earlier_fn_t)(struct sandbox **, uint64_t); typedef uint64_t (*global_request_scheduler_peek_fn_t)(void); diff --git a/runtime/src/global_request_scheduler.c b/runtime/src/global_request_scheduler.c index 459eef9..4362100 100644 --- a/runtime/src/global_request_scheduler.c +++ b/runtime/src/global_request_scheduler.c @@ -5,7 +5,7 @@ /* Default uninitialized implementations of the polymorphic interface */ noreturn static struct sandbox * -uninitialized_add(void *arg) +uninitialized_add(struct sandbox *arg) { panic("Global Request Scheduler Add was called before initialization\n"); } diff --git a/runtime/src/global_request_scheduler_minheap.c b/runtime/src/global_request_scheduler_minheap.c index 3d8facf..510cb15 100644 --- a/runtime/src/global_request_scheduler_minheap.c +++ b/runtime/src/global_request_scheduler_minheap.c @@ -15,16 +15,16 @@ static struct priority_queue *global_request_scheduler_minheap; * @returns pointer to request if added. Panics runtime otherwise */ static struct sandbox * -global_request_scheduler_minheap_add(void *sandbox_raw) +global_request_scheduler_minheap_add(struct sandbox *sandbox) { - assert(sandbox_raw); + assert(sandbox); assert(global_request_scheduler_minheap); if (unlikely(!listener_thread_is_running())) panic("%s is only callable by the listener thread\n", __func__); - int return_code = priority_queue_enqueue(global_request_scheduler_minheap, sandbox_raw); + int return_code = priority_queue_enqueue(global_request_scheduler_minheap, sandbox); /* TODO: Propagate -1 to caller. Issue #91 */ if (return_code == -ENOSPC) panic("Request Queue is full\n"); - return (struct sandbox *)sandbox_raw; + return sandbox; } /**