1/* 2 * Copyright 2014-2019, Haiku, Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef _FBSD_COMPAT_SYS_SMP_H_ 6#define _FBSD_COMPAT_SYS_SMP_H_ 7 8 9extern u_int mp_maxid; 10extern int mp_ncpus; 11 12 13static inline int 14cpu_first(void) 15{ 16 return 0; 17} 18 19static inline int 20cpu_next(int i) 21{ 22 i++; 23 if (i > (int)mp_maxid) 24 i = 0; 25 return i; 26} 27 28#define CPU_FIRST() cpu_first() 29#define CPU_NEXT(i) cpu_next((i)) 30 31#define MAXCPU 1 32#define curcpu 0 33 34 35#endif 36