You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					17 lines
				
				442 B
			
		
		
			
		
	
	
					17 lines
				
				442 B
			| 
								 
											5 years ago
										 
									 | 
							
								#!/usr/bin/env python3
							 | 
						||
| 
								 | 
							
								import time
							 | 
						||
| 
								 | 
							
								from common.realtime import set_core_affinity, set_realtime_priority
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								# RT shield - ensure CPU 3 always remains available for RT processes
							 | 
						||
| 
								 | 
							
								#   runs as SCHED_FIFO with minimum priority to ensure kthreads don't
							 | 
						||
| 
								 | 
							
								#   get scheduled onto CPU 3, but it's always preemptible by realtime
							 | 
						||
| 
								 | 
							
								#   openpilot processes
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								def main():
							 | 
						||
| 
								 | 
							
								  set_core_affinity(3)
							 | 
						||
| 
								 | 
							
								  set_realtime_priority(1)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								  while True:
							 | 
						||
| 
								 | 
							
								    time.sleep(0.000001)
							 |