Improvements/tests for SEM_LIVE locking
This commit is contained in:
		
							parent
							
								
									3aeebd1a4a
								
							
						
					
					
						commit
						bafe30e234
					
				
					 5 changed files with 53 additions and 28 deletions
				
			
		|  | @ -109,7 +109,7 @@ namespace Mist{ | |||
|       if (!myMeta.vod){ | ||||
|         static char liveSemName[NAME_BUFFER_SIZE]; | ||||
|         snprintf(liveSemName, NAME_BUFFER_SIZE, SEM_LIVE, streamName.c_str()); | ||||
|         liveSem = new IPC::semaphore(liveSemName, O_RDWR, ACCESSPERMS, 1, !myMeta.live); | ||||
|         liveSem = new IPC::semaphore(liveSemName, O_RDWR, ACCESSPERMS, 8, !myMeta.live); | ||||
|         if (*liveSem){ | ||||
|           liveSem->wait(); | ||||
|         }else{ | ||||
|  | @ -1411,7 +1411,7 @@ namespace Mist{ | |||
|           IPC::semaphore * liveSem = 0; | ||||
|           static char liveSemName[NAME_BUFFER_SIZE]; | ||||
|           snprintf(liveSemName, NAME_BUFFER_SIZE, SEM_LIVE, streamName.c_str()); | ||||
|           liveSem = new IPC::semaphore(liveSemName, O_RDWR, ACCESSPERMS, 1, !myMeta.live); | ||||
|           liveSem = new IPC::semaphore(liveSemName, O_RDWR, ACCESSPERMS, 8, !myMeta.live); | ||||
|           if (*liveSem){ | ||||
|             liveSem->wait(); | ||||
|           }else{ | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thulinma
						Thulinma