libcruft/misc/quit.h File Reference

#include <stdio.h>
#include <signal.h>
#include <setjmp.h>

Go to the source code of this file.

Defines

#define octave_quit_h   1
#define octave_set_current_context   setjmp (current_context)
#define OCTAVE_QUIT
#define BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE
#define BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE_1
#define BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE_2
#define END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE

Typedefs

typedef jmp_buf octave_jmp_buf

Functions

CRUFT_API void octave_save_current_context (void *)
CRUFT_API void octave_restore_current_context (void *)
CRUFT_API void octave_jump_to_enclosing_context (void) GCC_ATTR_NORETURN
CRUFT_API void octave_save_signal_mask (void)
CRUFT_API void octave_restore_signal_mask (void)
CRUFT_API void octave_handle_signal (void)
CRUFT_API void octave_throw_interrupt_exception (void) GCC_ATTR_NORETURN
CRUFT_API void octave_throw_bad_alloc (void) GCC_ATTR_NORETURN

Variables

CRUFT_API octave_jmp_buf current_context
CRUFT_API sig_atomic_t octave_interrupt_immediately
CRUFT_API sig_atomic_t octave_interrupt_state
CRUFT_API sig_atomic_t octave_allocation_error
CRUFT_API sig_atomic_t octave_signal_caught


Define Documentation

#define BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE_1

Value:

do \
    { \
      octave_jmp_buf saved_context; \
 \
      octave_save_current_context (saved_context); \
 \
      if (octave_set_current_context) \
        { \
          octave_restore_current_context (saved_context)

Definition at line 133 of file quit.h.

#define BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE_2

Value:

Definition at line 144 of file quit.h.

#define OCTAVE_QUIT

Value:

do \
    { \
      if (octave_signal_caught) \
        { \
          octave_signal_caught = 0; \
          octave_handle_signal (); \
        } \
    } \
  while (0)

Definition at line 101 of file quit.h.

Referenced by tree_matrix::all_elements_are_constant(), any_element_greater_than(), any_element_less_than(), assign(), assign1(), atan2(), SparseQR::SparseQR_rep::C(), SparseComplexQR::SparseComplexQR_rep::C(), calc_degrees(), octave_value::complex_vector_value(), octave_sparse_matrix::convert_to_str_internal(), octave_matrix::convert_to_str_internal(), octave_base_int_matrix< T >::convert_to_str_internal(), DEFCMD(), DEFUN_DLD(), dmsolve_extract(), dmsolve_insert(), dmsolve_permute(), do_catch_code(), octave_base_stream::do_printf(), octave_base_stream::do_scanf(), elem_xpow(), tree_statement_list::eval(), Matrix::expm(), ComplexMatrix::expm(), filter(), find_nonzero_elem_idx(), find_starting_node(), NDArray::fourier(), Matrix::fourier(), ComplexNDArray::fourier(), ComplexMatrix::fourier(), NDArray::fourier2d(), Matrix::fourier2d(), ComplexNDArray::fourier2d(), ComplexMatrix::fourier2d(), NDArray::fourierNd(), ComplexNDArray::fourierNd(), get_lines_and_columns(), get_user_input(), gnu_readline(), tree_matrix::has_magic_end(), NDArray::ifourier(), Matrix::ifourier(), ComplexNDArray::ifourier(), ComplexMatrix::ifourier(), NDArray::ifourier2d(), Matrix::ifourier2d(), ComplexNDArray::ifourier2d(), ComplexMatrix::ifourier2d(), NDArray::ifourierNd(), ComplexNDArray::ifourierNd(), Sparse< T >::index(), tm_const::init(), tm_row_const::tm_row_const_rep::init(), Sparse< T >::insert(), int_array2_to_matrix(), int_arrayN_to_array(), octave_value::int_vector_value(), kron(), octave_sparse_matrix::load_binary(), octave_sparse_complex_matrix::load_binary(), octave_sparse_bool_matrix::load_binary(), main_loop(), map_d_m(), map_m_d(), map_m_m(), max(), Sparse< T >::maybe_delete_elements(), min(), octave_gets(), octave_print_internal(), octave_print_internal_template(), octregexp_list(), octregexprep(), operator+=(), operator-=(), operator<<(), parse_and_execute(), Array< T >::permute(), octave_cell::print_raw(), octave_base_sparse< T >::print_raw(), qrsolve(), quit_loop_now(), read_mat_ascii_data(), file_ops::recursive_rmdir(), tree_matrix::rvalue(), octave_sparse_matrix::save_binary(), octave_sparse_complex_matrix::save_binary(), octave_sparse_bool_matrix::save_binary(), Sparse< T >::Sparse(), sparse_find_non_zero_elem_idx(), octave_cell::subsref(), SparseMatrix::tinverse(), SparseComplexMatrix::tinverse(), transpose(), octave_value::vector_value(), and x_el_div().

#define octave_quit_h   1

Definition at line 24 of file quit.h.

#define octave_set_current_context   setjmp (current_context)

Definition at line 59 of file quit.h.


Typedef Documentation

typedef jmp_buf octave_jmp_buf

Definition at line 57 of file quit.h.


Function Documentation

CRUFT_API void octave_handle_signal ( void   ) 

CRUFT_API void octave_jump_to_enclosing_context ( void   ) 

Definition at line 217 of file cquit.c.

References current_context.

Referenced by F77_FUNC(), and user_abort().

CRUFT_API void octave_restore_current_context ( void *   ) 

Definition at line 41 of file cquit.c.

References current_context, and memcpy.

CRUFT_API void octave_restore_signal_mask ( void   ) 

Definition at line 247 of file cquit.c.

Referenced by recover_from_exception().

CRUFT_API void octave_save_current_context ( void *   ) 

Definition at line 35 of file cquit.c.

References current_context, and memcpy.

CRUFT_API void octave_save_signal_mask ( void   ) 

Definition at line 239 of file cquit.c.

Referenced by execute_command_line_file(), execute_eval_option_code(), and main_loop().

CRUFT_API void octave_throw_bad_alloc ( void   ) 

Definition at line 61 of file quit.cc.

References octave_bad_alloc_hook.

CRUFT_API void octave_throw_interrupt_exception ( void   ) 

Definition at line 52 of file quit.cc.

References octave_interrupt_hook.

Referenced by octave_handle_signal().


Variable Documentation

CRUFT_API sig_atomic_t octave_allocation_error

Definition at line 258 of file cquit.c.

Referenced by recover_from_exception().

CRUFT_API sig_atomic_t octave_interrupt_immediately

Definition at line 254 of file cquit.c.

Referenced by do_catch_code(), recover_from_exception(), and user_abort().

CRUFT_API sig_atomic_t octave_interrupt_state

Definition at line 256 of file cquit.c.

Referenced by do_catch_code(), octave_handle_signal(), recover_from_exception(), and user_abort().

CRUFT_API sig_atomic_t octave_signal_caught

Definition at line 260 of file cquit.c.

Referenced by recover_from_exception(), and user_abort().