chore: rename sigint to signal_interrupt in files

main
Sean McBride 5 years ago
parent 7ba5a3acbe
commit 25bdc18118

@ -10,7 +10,7 @@
#include <http_response.h>
#include "module.h"
#include "ps_list.h"
#include "softint.h"
#include "software_interrupt.h"
/**************************
* Structs and Types *

@ -1,5 +1,5 @@
#ifndef SFRT_SOFTINT_H
#define SFRT_SOFTINT_H
#ifndef SFRT_SOFTWARE_INTERRUPT_H
#define SFRT_SOFTWARE_INTERRUPT_H
#include <stdbool.h>
#include <assert.h>
@ -42,12 +42,12 @@ software_interrupt__is_enabled(void)
}
/**
* Blocks a signal on the current thread
* @param signal - the signal you want to block
* Masks a signal on the current thread
* @param signal - the signal you want to mask
* @return 0 on success. Exits program otherwise
**/
static inline int
software_interrupt__mask(int signal)
software_interrupt__mask_signal(int signal)
{
sigset_t set;
int return_code;
@ -67,12 +67,12 @@ software_interrupt__mask(int signal)
}
/**
* Unblocks a signal on the current thread
* @param signal - the signal you want to block
* Unmasks a signal on the current thread
* @param signal - the signal you want to unmask
* @return 0 on success. Exits program otherwise
**/
static inline int
software_interrupt__unmask(int signal)
software_interrupt__unmask_signal(int signal)
{
sigset_t set;
int return_code;
@ -99,4 +99,4 @@ void software_interrupt__initialize(void);
void software_interrupt__arm_timer(void);
void software_interrupt__disarm_timer(void);
#endif /* SFRT_SOFTINT_H */
#endif /* SFRT_SOFTWARE_INTERRUPT_H */

@ -11,7 +11,7 @@
#include <module.h>
#include <runtime.h>
#include <sandbox.h>
#include <softint.h>
#include <software_interrupt.h>
i32 log_file_descriptor = -1;
u32 total_online_processors = 0;

@ -1,19 +1,28 @@
// Something is not idempotent with this or some other include.
// If placed in Local Includes, error is triggered that memset was implicitly declared
#include <runtime.h>
#include <sys/mman.h>
#include <types.h>
#include <sandbox.h>
/***************************
* External Includes *
**************************/
#include <pthread.h> // POSIX Threads
#include <signal.h> // POSIX Signals
#include <sched.h> // Wasmception. Included as submodule
#include <sys/mman.h> // Wasmception. Included as submodule
#include <uv.h> // Libub
/***************************
* Local Includes *
**************************/
#include <arch/context.h>
#include <current_sandbox.h>
#include <http_parser_settings.h>
#include <module.h>
#include <signal.h>
#include <pthread.h>
#include <sched.h>
#include <softint.h>
#include <uv.h>
#include <sandbox.h>
#include <sandbox_request.h>
#include <software_interrupt.h>
#include <types.h>
#include <util.h>
#include <http_parser_settings.h>
#include <current_sandbox.h>
#include "sandbox_request.h"
/***************************
* Shared Process State *
@ -44,8 +53,8 @@ runtime__initialize(void)
deque_init_sandbox(runtime__global_deque, SBOX_MAX_REQS);
// Mask Signals
software_interrupt__mask(SIGUSR1);
software_interrupt__mask(SIGALRM);
software_interrupt__mask_signal(SIGUSR1);
software_interrupt__mask_signal(SIGALRM);
// Initialize http_parser_settings global
http_parser_settings__initialize(&runtime__http_parser_settings);
@ -417,8 +426,8 @@ worker_thread__main(void *return_code)
software_interrupt__is_disabled = 0;
worker_thread__next_context = NULL;
#ifndef PREEMPT_DISABLE
software_interrupt__unmask(SIGALRM);
software_interrupt__unmask(SIGUSR1);
software_interrupt__unmask_signal(SIGALRM);
software_interrupt__unmask_signal(SIGUSR1);
#endif
uv_loop_init(&worker_thread__uvio_handle);
worker_thread__is_in_callback = 0;

@ -11,7 +11,7 @@
#include <sandbox.h>
#include <module.h>
#include <arch/context.h>
#include <softint.h>
#include <software_interrupt.h>
#include <current_sandbox.h>
/***************************************
Loading…
Cancel
Save