You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sledge-serverless-framework/runtime/include/sandbox_run_queue.h

32 lines
1.1 KiB

#ifndef SFRT_SANDBOX_RUN_QUEUE_H
#define SFRT_SANDBOX_RUN_QUEUE_H
#include <stdbool.h>
#include <sandbox.h>
// Returns pointer back if successful, null otherwise
typedef struct sandbox *(*sandbox_run_queue_add_t)(struct sandbox *);
typedef struct sandbox *(*sandbox_run_queue_remove_t)(void);
typedef bool (*sandbox_run_queue_is_empty_t)(void);
typedef void (*sandbox_run_queue_delete_t)(struct sandbox *sandbox);
typedef struct sandbox *(*sandbox_run_queue_get_next_t)();
typedef struct sandbox_run_queue_config_t {
sandbox_run_queue_add_t add;
sandbox_run_queue_is_empty_t is_empty;
sandbox_run_queue_remove_t remove;
sandbox_run_queue_delete_t delete;
sandbox_run_queue_get_next_t get_next;
} sandbox_run_queue_config_t;
void sandbox_run_queue_initialize(sandbox_run_queue_config_t *config);
struct sandbox *sandbox_run_queue_add(struct sandbox *);
void sandbox_run_queue_delete(struct sandbox *);
struct sandbox *sandbox_run_queue_remove();
bool sandbox_run_queue_is_empty();
struct sandbox *sandbox_run_queue_get_next();
#endif /* SFRT_SANDBOX_RUN_QUEUE_H */