xref: /f-stack/tools/compat/include/sys/_cpuset.h (revision 1eaf0ac3)
1*1eaf0ac3Slogwang /*-
2*1eaf0ac3Slogwang  * Copyright (c) 2008,	Jeffrey Roberson <[email protected]>
3*1eaf0ac3Slogwang  * All rights reserved.
4*1eaf0ac3Slogwang  *
5*1eaf0ac3Slogwang  * Copyright (c) 2008 Nokia Corporation
6*1eaf0ac3Slogwang  * All rights reserved.
7*1eaf0ac3Slogwang  *
8*1eaf0ac3Slogwang  * Redistribution and use in source and binary forms, with or without
9*1eaf0ac3Slogwang  * modification, are permitted provided that the following conditions
10*1eaf0ac3Slogwang  * are met:
11*1eaf0ac3Slogwang  * 1. Redistributions of source code must retain the above copyright
12*1eaf0ac3Slogwang  *    notice unmodified, this list of conditions, and the following
13*1eaf0ac3Slogwang  *    disclaimer.
14*1eaf0ac3Slogwang  * 2. Redistributions in binary form must reproduce the above copyright
15*1eaf0ac3Slogwang  *    notice, this list of conditions and the following disclaimer in the
16*1eaf0ac3Slogwang  *    documentation and/or other materials provided with the distribution.
17*1eaf0ac3Slogwang  *
18*1eaf0ac3Slogwang  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19*1eaf0ac3Slogwang  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20*1eaf0ac3Slogwang  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21*1eaf0ac3Slogwang  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22*1eaf0ac3Slogwang  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23*1eaf0ac3Slogwang  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24*1eaf0ac3Slogwang  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25*1eaf0ac3Slogwang  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26*1eaf0ac3Slogwang  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27*1eaf0ac3Slogwang  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*1eaf0ac3Slogwang  *
29*1eaf0ac3Slogwang  * $FreeBSD$
30*1eaf0ac3Slogwang  */
31*1eaf0ac3Slogwang 
32*1eaf0ac3Slogwang #ifndef _SYS__CPUSET_H_
33*1eaf0ac3Slogwang #define	_SYS__CPUSET_H_
34*1eaf0ac3Slogwang 
35*1eaf0ac3Slogwang #include <sys/_types.h>
36*1eaf0ac3Slogwang #include <sys/_bitset.h>
37*1eaf0ac3Slogwang 
38*1eaf0ac3Slogwang #ifdef _KERNEL
39*1eaf0ac3Slogwang #define	CPU_SETSIZE	MAXCPU
40*1eaf0ac3Slogwang #endif
41*1eaf0ac3Slogwang 
42*1eaf0ac3Slogwang #define	CPU_MAXSIZE	256
43*1eaf0ac3Slogwang 
44*1eaf0ac3Slogwang #ifndef	CPU_SETSIZE
45*1eaf0ac3Slogwang #define	CPU_SETSIZE	CPU_MAXSIZE
46*1eaf0ac3Slogwang #endif
47*1eaf0ac3Slogwang 
48*1eaf0ac3Slogwang BITSET_DEFINE(_cpuset, CPU_SETSIZE);
49*1eaf0ac3Slogwang typedef struct _cpuset cpuset_t;
50*1eaf0ac3Slogwang 
51*1eaf0ac3Slogwang #endif /* !_SYS__CPUSET_H_ */
52