Change usleep() to sleep_us() in RT tests
This commit is contained in:
		
							parent
							
								
									4993197fb9
								
							
						
					
					
						commit
						3e7006cec7
					
				| @ -3,13 +3,14 @@ | ||||
| 
 | ||||
| #define _GNU_SOURCE | ||||
| #include <unistd.h> | ||||
| #include "compat.h" | ||||
| 
 | ||||
| int | ||||
| main(void) | ||||
| { | ||||
| 	#pragma oss task if (0) | ||||
| 	{ | ||||
| 		usleep(1000); | ||||
| 		sleep_us(1000); | ||||
| 	} | ||||
| 	return 0; | ||||
| } | ||||
|  | ||||
| @ -3,13 +3,14 @@ | ||||
| 
 | ||||
| #define _GNU_SOURCE | ||||
| #include <unistd.h> | ||||
| #include "compat.h" | ||||
| 
 | ||||
| int | ||||
| main(void) | ||||
| { | ||||
| 	#pragma oss task for | ||||
| 	for (int i = 0; i < 1024; i++) | ||||
| 		usleep(1000); | ||||
| 		sleep_us(1000); | ||||
| 
 | ||||
| 	return 0; | ||||
| } | ||||
|  | ||||
| @ -9,6 +9,7 @@ | ||||
| #include <unistd.h> | ||||
| 
 | ||||
| #include "common.h" | ||||
| #include "compat.h" | ||||
| 
 | ||||
| #define NTASKS 200 | ||||
| atomic_int ncompleted = 0; | ||||
| @ -46,7 +47,7 @@ main(void) | ||||
| 		nosv_submit(tasks[i], 0); | ||||
| 
 | ||||
| 	while (atomic_load(&ncompleted) != NTASKS) | ||||
| 		usleep(1000); | ||||
| 		sleep_us(1000); | ||||
| 
 | ||||
| 	for (int i = 0; i < NTASKS; i++) | ||||
| 		nosv_destroy(tasks[i], 0); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Raúl Peñacoba Veigas
						Raúl Peñacoba Veigas