mirror of
				https://git.proxmox.com/git/qemu
				synced 2025-10-31 18:49:42 +00:00 
			
		
		
		
	 38b14db34e
			
		
	
	
		38b14db34e
		
	
	
	
	
		
			
			The new thread pool will use semaphores instead of condition variables, because QemuCond does not have qemu_cond_timedwait. (I also like it more this way). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
		
			
				
	
	
		
			30 lines
		
	
	
		
			499 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			499 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #ifndef __QEMU_THREAD_WIN32_H
 | |
| #define __QEMU_THREAD_WIN32_H 1
 | |
| #include "windows.h"
 | |
| 
 | |
| struct QemuMutex {
 | |
|     CRITICAL_SECTION lock;
 | |
|     LONG owner;
 | |
| };
 | |
| 
 | |
| struct QemuCond {
 | |
|     LONG waiters, target;
 | |
|     HANDLE sema;
 | |
|     HANDLE continue_event;
 | |
| };
 | |
| 
 | |
| struct QemuSemaphore {
 | |
|     HANDLE sema;
 | |
| };
 | |
| 
 | |
| typedef struct QemuThreadData QemuThreadData;
 | |
| struct QemuThread {
 | |
|     QemuThreadData *data;
 | |
|     unsigned tid;
 | |
| };
 | |
| 
 | |
| /* Only valid for joinable threads.  */
 | |
| HANDLE qemu_thread_get_handle(QemuThread *thread);
 | |
| 
 | |
| #endif
 |