53 |
|
#endif |
54 |
|
|
55 |
|
#ifdef ENABLE_VOSF |
56 |
– |
# include <unistd.h> |
57 |
– |
# include <signal.h> |
56 |
|
# include <fcntl.h> |
57 |
|
# include <sys/mman.h> |
58 |
+ |
# include "sigsegv.h" |
59 |
|
#endif |
60 |
|
|
61 |
|
#include "cpu_emulation.h" |
277 |
|
} |
278 |
|
|
279 |
|
static int zero_fd = -1; |
281 |
– |
static bool Screen_fault_handler_init(); |
282 |
– |
static struct sigaction vosf_sa; |
280 |
|
|
281 |
|
#ifdef HAVE_PTHREADS |
282 |
|
static pthread_mutex_t vosf_lock = PTHREAD_MUTEX_INITIALIZER; // Mutex to protect frame buffer (dirtyPages in fact) |
1169 |
|
} |
1170 |
|
|
1171 |
|
// Initialize the handler for SIGSEGV |
1172 |
< |
if (!Screen_fault_handler_init()) { |
1172 |
> |
if (!sigsegv_install_handler(screen_fault_handler)) { |
1173 |
|
// TODO: STR_VOSF_INIT_ERR ? |
1174 |
|
ErrorAlert("Could not initialize Video on SEGV signals"); |
1175 |
|
return false; |