void factor_vm::open_console()
{
- assert(!stdin_thread_initialized_p);
+ FACTOR_ASSERT(!stdin_thread_initialized_p);
safe_pipe(&control_read,&control_write);
safe_pipe(&size_read,&size_write);
safe_pipe(&stdin_read,&stdin_write);
void factor_vm::lock_console()
{
- assert(stdin_thread_initialized_p);
+ FACTOR_ASSERT(stdin_thread_initialized_p);
/* Lock the stdin_mutex and send the stdin_loop thread a signal to interrupt
any read() it has in progress. When the stdin loop iterates again, it will
try to lock the same mutex and wait until unlock_console() is called. */
void factor_vm::unlock_console()
{
- assert(stdin_thread_initialized_p);
+ FACTOR_ASSERT(stdin_thread_initialized_p);
pthread_mutex_unlock(&stdin_mutex);
}
sigaction_safe(SIGINT,&fep_sigaction,NULL);
}
-void factor_vm::abort()
+void abort()
{
sig_t ret;
do
}
while(ret == SIG_ERR && errno == EINTR);
- close_console();
+ factor_vm::close_console();
::abort();
}