| @@ -717,7 +717,7 @@ namespace disvm · 716 unmodified lines |
| 717 | exiting, // exit instruction | 717 | exiting, // exit instruction |
| 718 | empty_stack, | 718 | empty_stack, |
| 719 | | 719 | |
| 720 | broken, // thread crashed | 720 | broken, // thread crashed - the scheduler is free to terminate the entire VM if any thread enters this state. |
| 721 | }; | 721 | }; |
| 722 | | 722 | |
| 723 | // Forward declaration | 723 | // Forward declaration |
| @@ -787,6 +787,10 @@ namespace disvm · 63 unmodified lines |
| 787 | | 787 | |
| 788 | vm_thread_state_t get_state() const; | 788 | vm_thread_state_t get_state() const; |
| 789 | | 789 | |
| | 790 | // This function will only return a non-null |
| | 791 | // value if this thread is in the broken state. |
| | 792 | const char *get_error_message() const; |
| | 793 | |
| 790 | uint32_t get_thread_id() const; | 794 | uint32_t get_thread_id() const; |
| 791 | | 795 | |
| 792 | uint32_t get_parent_thread_id() const; | 796 | uint32_t get_parent_thread_id() const; |
| @@ -794,9 +798,10 @@ namespace disvm · 1 unmodified line |
| 794 | const vm_registers_t& get_registers() const; | 798 | const vm_registers_t& get_registers() const; |
| 795 | | 799 | |
| 796 | private: | 800 | private: |
| | 801 | vm_registers_t _registers; |
| 797 | const uint32_t _thread_id; | 802 | const uint32_t _thread_id; |
| 798 | const uint32_t _parent_thread_id; | 803 | const uint32_t _parent_thread_id; |
| 799 | vm_registers_t _registers; | 804 | char *_error_message; |
| 800 | }; | 805 | }; |
| 801 | | 806 | |
| 802 | // | 807 | // |