mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 16:48:26 +02:00 
			
		
		
		
	 c7f005f70d
			
		
	
	
		c7f005f70d
		
	
	
	
	
		
			
			Introduce `CpuId::current()`, a constructor that wraps the C function `raw_smp_processor_id()` to retrieve the current CPU identifier without guaranteeing stability. This function should be used only when the caller can ensure that the CPU ID won't change unexpectedly due to preemption or migration. Suggested-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
		
			
				
	
	
		
			8 lines
		
	
	
	
		
			149 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
	
		
			149 B
		
	
	
	
		
			C
		
	
	
	
	
	
| // SPDX-License-Identifier: GPL-2.0
 | |
| 
 | |
| #include <linux/smp.h>
 | |
| 
 | |
| unsigned int rust_helper_raw_smp_processor_id(void)
 | |
| {
 | |
| 	return raw_smp_processor_id();
 | |
| }
 |