mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Add get_cpu() and put_cpu().
MFC after: 1 week
This commit is contained in:
parent
6ab9e0df87
commit
d6c8335623
1 changed files with 8 additions and 0 deletions
|
|
@ -37,4 +37,12 @@ int linux_wbinvd_on_all_cpus(void);
|
|||
|
||||
#endif
|
||||
|
||||
#define get_cpu() ({ \
|
||||
sched_pin(); \
|
||||
PCPU_GET(cpuid); \
|
||||
})
|
||||
|
||||
#define put_cpu() \
|
||||
sched_unpin()
|
||||
|
||||
#endif /* _ASM_SMP_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue