/**/ /***************************************************************************/ /** **/ /** © Copyright 2010, Hewlett-Packard Development Company, L.P. **/ /** **/ /** Confidential computer software. Valid license from HP and/or **/ /** its subsidiaries required for possession, use, or copying. **/ /** **/ /** Consistent with FAR 12.211 and 12.212, Commercial Computer Software, **/ /** Computer Software Documentation, and Technical Data for Commercial **/ /** Items are licensed to the U.S. Government under vendor's standard **/ /** commercial license. **/ /** **/ /** Neither HP nor any of its subsidiaries shall be liable for technical **/ /** or editorial errors or omissions contained herein. The information **/ /** in this document is provided "as is" without warranty of any kind and **/ /** is subject to change without notice. The warranties for HP products **/ /** are set forth in the express limited warranty statements accompanying **/ /** such products. Nothing herein should be construed as constituting an **/ /** additional warranty. **/ /** **/ /***************************************************************************/ /********************************************************************************************************************************/ /* Created: 30-Mar-2010 17:27:04 by OpenVMS SDL EV3-3 */ /* Source: 11-AUG-2005 14:45:38 $1$DGA7274:[LIB_H.SRC]CPBDEF.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE $CPBDEF ***/ #ifndef __CPBDEF_LOADED #define __CPBDEF_LOADED 1 #pragma __nostandard /* This file uses non-ANSI-Standard features */ #pragma __member_alignment __save #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif #ifdef __cplusplus extern "C" { #define __unknown_params ... #define __optional_params ... #else #define __unknown_params #define __optional_params ... #endif #ifndef __struct #if !defined(__VAXC) #define __struct struct #else #define __struct variant_struct #endif #endif #ifndef __union #if !defined(__VAXC) #define __union union #else #define __union variant_union #endif #endif /*+ */ /* */ /* Constants defining CPU capability numbers and flags for routines */ /* */ #define CPB$C_PRIMARY 0 /* Primary CPU (aka TIMEKEEPER) */ #define CPB$C_NS 1 /* future */ #define CPB$C_QUORUM 2 /* Cluster quorum required */ #define CPB$C_RUN 3 /* Run capability */ #define CPB$C_IMPLICIT_AFFINITY 4 /* Implicit affinity */ #define CPB$C_SOFT_RAD_AFFINITY 5 /* If set, need to check further for soft RAD affinity */ #define CPB$C_RAD_0 6 #define CPB$C_RAD_1 7 #define CPB$C_RAD_2 8 #define CPB$C_RAD_3 9 #define CPB$C_RAD_4 10 #define CPB$C_RAD_5 11 #define CPB$C_RAD_6 12 #define CPB$C_RAD_7 13 #define CPB$C_MAX 32 #define CPB$C_MAX_SYSTEM_BITS 16 #define CPB$C_MAX_USER_BITS 16 #define CPB$C_VECTOR 1 /* equate NS with VECTOR */ #define CPB$M_PRIMARY 0x1 #define CPB$M_VECTOR 0x2 #define CPB$M_QUORUM 0x4 #define CPB$M_RUN 0x8 #define CPB$M_IMPLICIT_AFFINITY 0x10 #define CPB$M_SOFT_RAD_AFFINITY 0x20 #define CPB$M_RAD_0 0x40 #define CPB$M_RAD_1 0x80 #define CPB$M_RAD_2 0x100 #define CPB$M_RAD_3 0x200 #define CPB$M_RAD_4 0x400 #define CPB$M_RAD_5 0x800 #define CPB$M_RAD_6 0x1000 #define CPB$M_RAD_7 0x2000 #define CPB$M_THDS_IDLE 0x4000 #define CPB$S_CPBDEF 4 typedef struct _cpb { __union { unsigned int cpb$l_cpb; __struct { unsigned cpb$v_primary : 1; /* Primary (timekeeper) */ unsigned cpb$v_vector : 1; /* Vector processor */ unsigned cpb$v_quorum : 1; /* Cluster quorum required */ unsigned cpb$v_run : 1; /* CPU can run processes */ unsigned cpb$v_implicit_affinity : 1; /* Extended cap - implicit aff */ unsigned cpb$v_soft_rad_affinity : 1; /* Extended cap - Soft RAD affinity */ unsigned cpb$v_rad_0 : 1; /* RAD in which a CPU resides. MUST REMAIN IN ORDER */ unsigned cpb$v_rad_1 : 1; unsigned cpb$v_rad_2 : 1; unsigned cpb$v_rad_3 : 1; unsigned cpb$v_rad_4 : 1; unsigned cpb$v_rad_5 : 1; unsigned cpb$v_rad_6 : 1; unsigned cpb$v_rad_7 : 1; unsigned cpb$v_thds_idle : 1; /* KTB must be alone on a core. Other CPU thds must be idle. */ unsigned cpb$v_fill_1 : 17; } cpb$r_fill_1_; } cpb$r_fill_0_; } CPB; #if !defined(__VAXC) #define cpb$v_primary cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_primary #define cpb$v_vector cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_vector #define cpb$v_quorum cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_quorum #define cpb$v_run cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_run #define cpb$v_implicit_affinity cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_implicit_affinity #define cpb$v_soft_rad_affinity cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_soft_rad_affinity #define cpb$v_rad_0 cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_rad_0 #define cpb$v_rad_1 cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_rad_1 #define cpb$v_rad_2 cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_rad_2 #define cpb$v_rad_3 cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_rad_3 #define cpb$v_rad_4 cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_rad_4 #define cpb$v_rad_5 cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_rad_5 #define cpb$v_rad_6 cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_rad_6 #define cpb$v_rad_7 cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_rad_7 #define cpb$v_thds_idle cpb$r_fill_0_.cpb$r_fill_1_.cpb$v_thds_idle #endif /* #if !defined(__VAXC) */ #define CPB$M_FLAG_CHECK_CPU 0x1 #define CPB$M_FLAG_PERMANENT 0x2 #define CPB$M_FLAG_PRIMARY 0x4 #define CPB$M_FLAG_CHECK_CPU_ACTIVE 0x8 #define CPB$S_CPB_FLAGSDEF 1 typedef struct _cpb_flags { __struct { unsigned cpb$v_flag_check_cpu : 1; /* Check that process can run */ unsigned cpb$v_flag_permanent : 1; /* Affect process permanent mask */ unsigned cpb$v_flag_primary : 1; /* Request to run on primary cpu */ unsigned cpb$v_flag_check_cpu_active : 1; /* Check all selected CPUs active */ unsigned cpb$v_flag_filler : 4; /**** ADD ALL NEW BITFIELDS BEFORE THIS DECLARATION */ /**** THIS FIELD IS USED TO ASSURE MASKS ARE WITHIN RANGE */ } cpb$r_cpb_flags; } CPB_FLAGS; #if !defined(__VAXC) #define cpb$v_flag_check_cpu cpb$r_cpb_flags.cpb$v_flag_check_cpu #define cpb$v_flag_permanent cpb$r_cpb_flags.cpb$v_flag_permanent #define cpb$v_flag_primary cpb$r_cpb_flags.cpb$v_flag_primary #define cpb$v_flag_check_cpu_active cpb$r_cpb_flags.cpb$v_flag_check_cpu_active #define cpb$v_flag_filler cpb$r_cpb_flags.cpb$v_flag_filler #endif /* #if !defined(__VAXC) */ #pragma __member_alignment __restore #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __CPBDEF_LOADED */