mirror of
				https://github.com/python/cpython.git
				synced 2025-10-27 03:34:32 +00:00 
			
		
		
		
	[3.14] gh-133296: Publicly expose critical section API that accepts PyMutex (gh-135899) (#136969)
Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									ddd3413687
								
							
						
					
					
						commit
						11f510167c
					
				
					 8 changed files with 96 additions and 15 deletions
				
			
		|  | @ -130,6 +130,15 @@ PyCriticalSection_Begin(PyCriticalSection *c, PyObject *op) | |||
| #endif | ||||
| } | ||||
| 
 | ||||
| #undef PyCriticalSection_BeginMutex | ||||
| void | ||||
| PyCriticalSection_BeginMutex(PyCriticalSection *c, PyMutex *m) | ||||
| { | ||||
| #ifdef Py_GIL_DISABLED | ||||
|     _PyCriticalSection_BeginMutex(c, m); | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
| #undef PyCriticalSection_End | ||||
| void | ||||
| PyCriticalSection_End(PyCriticalSection *c) | ||||
|  | @ -148,6 +157,15 @@ PyCriticalSection2_Begin(PyCriticalSection2 *c, PyObject *a, PyObject *b) | |||
| #endif | ||||
| } | ||||
| 
 | ||||
| #undef PyCriticalSection2_BeginMutex | ||||
| void | ||||
| PyCriticalSection2_BeginMutex(PyCriticalSection2 *c, PyMutex *m1, PyMutex *m2) | ||||
| { | ||||
| #ifdef Py_GIL_DISABLED | ||||
|     _PyCriticalSection2_BeginMutex(c, m1, m2); | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
| #undef PyCriticalSection2_End | ||||
| void | ||||
| PyCriticalSection2_End(PyCriticalSection2 *c) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Islington (bot)
						Miss Islington (bot)