mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-30 19:22:28 +00:00 
			
		
		
		
	ensure limit children are safe for race conditions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
		
							parent
							
								
									f8a804ba56
								
							
						
					
					
						commit
						4132fc2d91
					
				
					 6 changed files with 51 additions and 33 deletions
				
			
		|  | @ -27,19 +27,23 @@ class reslimit { | |||
|     uint64          m_limit; | ||||
|     svector<uint64> m_limits; | ||||
|     ptr_vector<reslimit> m_children; | ||||
| 
 | ||||
|     void set_cancel(bool f); | ||||
|      | ||||
| public:     | ||||
|     reslimit(); | ||||
|     void push(unsigned delta_limit); | ||||
|     void pop(); | ||||
|     void push_child(reslimit* r) { m_children.push_back(r); } | ||||
|     void pop_child() { m_children.pop_back(); } | ||||
|     void push_child(reslimit* r); | ||||
|     void pop_child(); | ||||
| 
 | ||||
|     bool inc(); | ||||
|     bool inc(unsigned offset); | ||||
|     uint64 count() const;  | ||||
| 
 | ||||
| 
 | ||||
|     bool cancel_flag_set() { return m_cancel; } | ||||
|     bool get_cancel_flag() const { return m_cancel; } | ||||
|     char const* get_cancel_msg() const; | ||||
|     void cancel(); | ||||
|     void reset_cancel(); | ||||
| }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue