1 /* Declarations of processor-related types/macros.
2 Copyright (C) 2008 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 #ifndef _SYS_PROCESSOR_H
21 #define _SYS_PROCESSOR_H
24 #include <sys/procset.h>
26 typedef int processorid_t;
32 char pi_processor_type[PI_TYPELEN];
34 char pi_fputypes[PI_FPUTYPE];
38 /* p_online flag values */
42 #define P_OFFLINE P_OFFLINE
44 #define P_ONLINE P_ONLINE
46 #define P_STATUS P_STATUS
48 #define P_FAULTED P_FAULTED
49 #define P_BAD P_FAULTED
51 #define P_POWEROFF P_POWEROFF
53 #define P_NOINTR P_NOINTR
55 #define P_SPARE P_SPARE
57 #define P_FORCED P_FORCED
60 #define PS_OFFLINE "off-line"
61 #define PS_ONLINE "on-line"
62 #define PS_FAULTED "faulted"
63 #define PS_POWEROFF "powered-off"
64 #define PS_NOINTR "no-intr"
65 #define PS_SPARE "spare"
68 #define PBIND_QUERY -2
71 #define PBIND_QUERY_TYPE -5
75 extern int processor_info (processorid_t processorid, processor_info_t *infop);
76 extern int processor_bind (idtype_t idtype, id_t id, processorid_t processorid,
77 processorid_t *obind);
78 extern int p_online (processorid_t processorid, int flag);
79 extern processorid_t getcpuid (void);
83 #endif /* _SYS_PROCESSOR_H */