diff --git a/runtime/include/arch/aarch64/context.h b/runtime/include/arch/aarch64/context.h index 2ae0d35..f8404c9 100644 --- a/runtime/include/arch/aarch64/context.h +++ b/runtime/include/arch/aarch64/context.h @@ -1,5 +1,4 @@ -#ifndef ARCH_AARCH64_CONTEXT_H -#define ARCH_AARCH64_CONTEXT_H +#pragma once #include #include @@ -112,5 +111,3 @@ arch_context_switch(arch_context_t *ca, arch_context_t *na) "d8", "d9", "d10", "d11", "d12", "d13", "d14", "d15"); return 0; } - -#endif /* ARCH_AARCH64_CONTEXT_H */ diff --git a/runtime/include/arch/context.h b/runtime/include/arch/context.h index ba56caf..0a393ff 100644 --- a/runtime/include/arch/context.h +++ b/runtime/include/arch/context.h @@ -1,5 +1,4 @@ -#ifndef ARCH_CONTEXT_H -#define ARCH_CONTEXT_H +#pragma once #if defined(AARCH64) || defined(aarch64) #include "aarch64/context.h" @@ -10,5 +9,3 @@ #define X86_64 #include "x86_64/context.h" #endif - -#endif /* ARCH_CONTEXT_H */ diff --git a/runtime/include/arch/x86_64/context.h b/runtime/include/arch/x86_64/context.h index ac71dc0..70c2bc5 100644 --- a/runtime/include/arch/x86_64/context.h +++ b/runtime/include/arch/x86_64/context.h @@ -1,5 +1,4 @@ -#ifndef ARCH_X86_64_CONTEXT_H -#define ARCH_X86_64_CONTEXT_H +#pragma once #include #include @@ -162,5 +161,3 @@ arch_context_switch(arch_context_t *current, arch_context_t *next) return 0; } - -#endif /* ARCH_X86_64_CONTEXT_H */ diff --git a/runtime/include/current_sandbox.h b/runtime/include/current_sandbox.h index e1bd43c..a0d47b4 100644 --- a/runtime/include/current_sandbox.h +++ b/runtime/include/current_sandbox.h @@ -1,5 +1,4 @@ -#ifndef SFRT_CURRENT_SANDBOX_H -#define SFRT_CURRENT_SANDBOX_H +#pragma once #include "sandbox.h" #include "types.h" @@ -11,5 +10,3 @@ union uv_any_handle *current_sandbox_get_libuv_handle(int io_handle_index); int current_sandbox_initialize_io_handle(void); void current_sandbox_set(struct sandbox *sandbox); int current_sandbox_set_file_descriptor(int io_handle_index, int file_descriptor); - -#endif /* SFRT_CURRENT_SANDBOX_H */ diff --git a/runtime/include/http_parser_settings.h b/runtime/include/http_parser_settings.h index b297281..8038630 100644 --- a/runtime/include/http_parser_settings.h +++ b/runtime/include/http_parser_settings.h @@ -1,9 +1,6 @@ -#ifndef SRFT_HTTP_PARSER_SETTINGS_H -#define SRFT_HTTP_PARSER_SETTINGS_H +#pragma once #include "http_parser.h" void http_parser_settings_initialize(void); http_parser_settings *http_parser_settings_get(); - -#endif /* SRFT_HTTP_PARSER_SETTINGS_H */ diff --git a/runtime/include/http_request.h b/runtime/include/http_request.h index 3cbd391..4bdbbeb 100644 --- a/runtime/include/http_request.h +++ b/runtime/include/http_request.h @@ -1,5 +1,4 @@ -#ifndef SFRT_HTTP_REQUEST_H -#define SFRT_HTTP_REQUEST_H +#pragma once #include @@ -28,5 +27,3 @@ struct http_request { * General HTTP Request Functions * **************************************************/ int http_request_get_body(struct http_request *http_request, char **body); - -#endif /* SFRT_HTTP_HEADER_H */ diff --git a/runtime/include/http_response.h b/runtime/include/http_response.h index 8674bf0..e8c2ffc 100644 --- a/runtime/include/http_response.h +++ b/runtime/include/http_response.h @@ -1,5 +1,4 @@ -#ifndef SFRT_HTTP_RESPONSE_H -#define SFRT_HTTP_RESPONSE_H +#pragma once #include #include @@ -36,5 +35,3 @@ int http_response_encode_as_vector(struct http_response *http_response); int http_response_set_body(struct http_response *http_response, char *body, int length); int http_response_set_header(struct http_response *http_response, char *h, int length); int http_response_set_status(struct http_response *http_response, char *status, int length); - -#endif /* SFRT_HTTP_RESPONSE_H */ diff --git a/runtime/include/libuv_callbacks.h b/runtime/include/libuv_callbacks.h index f50d0c3..aa90d8f 100644 --- a/runtime/include/libuv_callbacks.h +++ b/runtime/include/libuv_callbacks.h @@ -1,6 +1,4 @@ - -#ifndef SFRT_LIBUV_CALLBACKS_H -#define SFRT_LIBUV_CALLBACKS_H +#pragma once #include #include @@ -89,5 +87,3 @@ libuv_callbacks_on_allocate_setup_request_response_data(uv_handle_t *h, size_t s buf->base = (sandbox->request_response_data + sandbox->request_response_data_length); buf->len = l > suggested ? suggested : l; } - -#endif /* SFRT_SANDBOX_H */ diff --git a/runtime/include/module.h b/runtime/include/module.h index 46340d3..45fd48c 100644 --- a/runtime/include/module.h +++ b/runtime/include/module.h @@ -1,8 +1,6 @@ -#ifndef SFRT_MODULE_H -#define SFRT_MODULE_H +#pragma once #include - #include struct module { @@ -190,5 +188,3 @@ void module_free(struct module *module); struct module *module_new(char *mod_name, char *mod_path, i32 argument_count, u32 stack_sz, u32 max_heap, u32 relative_deadline_us, int port, int req_sz, int resp_sz); int module_new_from_json(char *filename); - -#endif /* SFRT_MODULE_H */ diff --git a/runtime/include/module_database.h b/runtime/include/module_database.h index 3d65eee..c966ed8 100644 --- a/runtime/include/module_database.h +++ b/runtime/include/module_database.h @@ -1,5 +1,4 @@ -#ifndef SFRT_MODULE_DATABASE_H -#define SFRT_MODULE_DATABASE_H +#pragma once #include @@ -25,5 +24,3 @@ module_database_add(struct module *module) return 0; } - -#endif /* SFRT_MODULE_DATABASE_H */ diff --git a/runtime/include/runtime.h b/runtime/include/runtime.h index d240fbb..668da81 100644 --- a/runtime/include/runtime.h +++ b/runtime/include/runtime.h @@ -1,5 +1,4 @@ -#ifndef SFRT_RUNTIME_H -#define SFRT_RUNTIME_H +#pragma once #include /* for epoll_create1(), epoll_ctl(), struct epoll_event */ #include "types.h" @@ -15,5 +14,3 @@ void listener_thread_initialize(void); void stub_init(i32 offset); unsigned long long __getcycles(void); - -#endif /* SFRT_RUNTIME_H */ diff --git a/runtime/include/sandbox.h b/runtime/include/sandbox.h index 796ca7f..d875475 100644 --- a/runtime/include/sandbox.h +++ b/runtime/include/sandbox.h @@ -1,5 +1,4 @@ -#ifndef SFRT_SANDBOX_H -#define SFRT_SANDBOX_H +#pragma once #include #include @@ -224,5 +223,3 @@ sandbox_get_libuv_handle(struct sandbox *sandbox, int io_handle_index) if (io_handle_index >= SANDBOX_MAX_IO_HANDLE_COUNT || io_handle_index < 0) return NULL; return &sandbox->io_handles[io_handle_index].libuv_handle; } - -#endif /* SFRT_SANDBOX_H */ diff --git a/runtime/include/sandbox_completion_queue.h b/runtime/include/sandbox_completion_queue.h index f2d5b59..61aa8a8 100644 --- a/runtime/include/sandbox_completion_queue.h +++ b/runtime/include/sandbox_completion_queue.h @@ -1,10 +1,7 @@ -#ifndef SFRT_SANDBOX_COMPLETION_QUEUE_H -#define SFRT_SANDBOX_COMPLETION_QUEUE_H +#pragma once #include "sandbox.h" void sandbox_completion_queue_add(struct sandbox *sandbox); void sandbox_completion_queue_free(); void sandbox_completion_queue_initialize(); - -#endif /* SFRT_SANDBOX_COMPLETION_QUEUE_H */ \ No newline at end of file diff --git a/runtime/include/sandbox_request.h b/runtime/include/sandbox_request.h index 3d3e03e..96d877f 100644 --- a/runtime/include/sandbox_request.h +++ b/runtime/include/sandbox_request.h @@ -1,5 +1,4 @@ -#ifndef SFRT_SANDBOX_REQUEST_H -#define SFRT_SANDBOX_REQUEST_H +#pragma once #include @@ -48,5 +47,3 @@ sandbox_request_allocate(struct module *module, char *arguments, int socket_desc debuglog("[%p: %s]\n", sandbox_request, sandbox_request->module->name); return sandbox_request; } - -#endif /* SFRT_SANDBOX_REQUEST_H */ \ No newline at end of file diff --git a/runtime/include/sandbox_request_scheduler.h b/runtime/include/sandbox_request_scheduler.h index d5ae5e8..c179776 100644 --- a/runtime/include/sandbox_request_scheduler.h +++ b/runtime/include/sandbox_request_scheduler.h @@ -1,5 +1,4 @@ -#ifndef SFRT_SANDBOX_REQUEST_SCHEDULER_H -#define SFRT_SANDBOX_REQUEST_SCHEDULER_H +#pragma once #include @@ -20,5 +19,3 @@ void sandbox_request_scheduler_initialize(sandbox_request_scheduler_config_t *co sandbox_request_t *sandbox_request_scheduler_add(sandbox_request_t *); sandbox_request_t *sandbox_request_scheduler_remove(); uint64_t sandbox_request_scheduler_peek(); - -#endif /* SFRT_SANDBOX_REQUEST_SCHEDULER_H */ \ No newline at end of file diff --git a/runtime/include/sandbox_request_scheduler_fifo.h b/runtime/include/sandbox_request_scheduler_fifo.h index 29950f5..691fd92 100644 --- a/runtime/include/sandbox_request_scheduler_fifo.h +++ b/runtime/include/sandbox_request_scheduler_fifo.h @@ -1,8 +1,5 @@ -#ifndef SFRT_SANDBOX_REQUEST_SCHEDULER_FIFO_H -#define SFRT_SANDBOX_REQUEST_SCHEDULER_FIFO_H +#pragma once #include void sandbox_request_scheduler_fifo_initialize(); - -#endif /* SFRT_SANDBOX_REQUEST_SCHEDULER_FIFO_H */ \ No newline at end of file diff --git a/runtime/include/sandbox_request_scheduler_ps.h b/runtime/include/sandbox_request_scheduler_ps.h index e4db8de..4189931 100644 --- a/runtime/include/sandbox_request_scheduler_ps.h +++ b/runtime/include/sandbox_request_scheduler_ps.h @@ -1,8 +1,5 @@ -#ifndef SFRT_SANDBOX_REQUEST_SCHEDULER_PS_H -#define SFRT_SANDBOX_REQUEST_SCHEDULER_PS_H +#pragma once #include void sandbox_request_scheduler_ps_initialize(); - -#endif /* SFRT_SANDBOX_REQUEST_SCHEDULER_PS_H */ \ No newline at end of file diff --git a/runtime/include/sandbox_run_queue.h b/runtime/include/sandbox_run_queue.h index b0b779b..7d72582 100644 --- a/runtime/include/sandbox_run_queue.h +++ b/runtime/include/sandbox_run_queue.h @@ -1,5 +1,4 @@ -#ifndef SFRT_SANDBOX_RUN_QUEUE_H -#define SFRT_SANDBOX_RUN_QUEUE_H +#pragma once #include #include @@ -29,6 +28,3 @@ void sandbox_run_queue_delete(struct sandbox *); bool sandbox_run_queue_is_empty(); struct sandbox *sandbox_run_queue_get_next(); void sandbox_run_queue_preempt(ucontext_t *); - - -#endif /* SFRT_SANDBOX_RUN_QUEUE_H */ \ No newline at end of file diff --git a/runtime/include/sandbox_run_queue_fifo.h b/runtime/include/sandbox_run_queue_fifo.h index e1093ed..7c7d39f 100644 --- a/runtime/include/sandbox_run_queue_fifo.h +++ b/runtime/include/sandbox_run_queue_fifo.h @@ -1,8 +1,5 @@ -#ifndef SFRT_SANDBOX_RUN_QUEUE_FIFO_H -#define SFRT_SANDBOX_RUN_QUEUE_FIFO_H +#pragma once #include "sandbox.h" void sandbox_run_queue_fifo_initialize(); - -#endif /* SFRT_SANDBOX_RUN_QUEUE_FIFO_H */ \ No newline at end of file diff --git a/runtime/include/sandbox_run_queue_ps.h b/runtime/include/sandbox_run_queue_ps.h index 3ec0d1e..95ea0e9 100644 --- a/runtime/include/sandbox_run_queue_ps.h +++ b/runtime/include/sandbox_run_queue_ps.h @@ -1,8 +1,5 @@ -#ifndef SFRT_SANDBOX_RUN_QUEUE_PS_H -#define SFRT_SANDBOX_RUN_QUEUE_PS_H +#pragma once #include "sandbox.h" void sandbox_run_queue_ps_initialize(); - -#endif /* SFRT_SANDBOX_RUN_QUEUE_PS_H */ \ No newline at end of file diff --git a/runtime/include/software_interrupt.h b/runtime/include/software_interrupt.h index 7b63c25..b340a03 100644 --- a/runtime/include/software_interrupt.h +++ b/runtime/include/software_interrupt.h @@ -1,5 +1,4 @@ -#ifndef SFRT_SOFTWARE_INTERRUPT_H -#define SFRT_SOFTWARE_INTERRUPT_H +#pragma once #include #include @@ -99,5 +98,3 @@ software_interrupt_unmask_signal(int signal) void software_interrupt_initialize(void); void software_interrupt_arm_timer(void); void software_interrupt_disarm_timer(void); - -#endif /* SFRT_SOFTWARE_INTERRUPT_H */ diff --git a/runtime/include/types.h b/runtime/include/types.h index 13d71e9..5e4136f 100644 --- a/runtime/include/types.h +++ b/runtime/include/types.h @@ -1,5 +1,4 @@ -#ifndef SFRT_TYPES_H -#define SFRT_TYPES_H +#pragma once #include #include @@ -150,6 +149,3 @@ typedef void (*mod_libc_fn_t)(i32, i32); /* If multicore, use all but the dedicated listener core If there are fewer cores than this, main dynamically overrides this and uses all available */ #define WORKER_THREAD_CORE_COUNT (NCORES > 1 ? NCORES - 1 : NCORES) - - -#endif /* SFRT_TYPES_H */ diff --git a/runtime/include/worker_thread.h b/runtime/include/worker_thread.h index de15987..33c8586 100644 --- a/runtime/include/worker_thread.h +++ b/runtime/include/worker_thread.h @@ -1,5 +1,4 @@ -#ifndef SFRT_WORKER_THREAD_H -#define SFRT_WORKER_THREAD_H +#pragma once #include #include "types.h" @@ -56,5 +55,3 @@ worker_thread_get_libuv_handle(void) { return &worker_thread_uvio_handle; } - -#endif /* SFRT_WORKER_THREAD_H */