From a36bdc0606a8d14be70d86fff441a08a4b2f9116 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sat, 20 Mar 2004 20:41:40 +0000 Subject: [PATCH] Introduce the cpumask_t type. The purpose of the type is to create a level of abstraction for any and all CPU mask and CPU bitmap variables so that platforms have the ability to break free from the hard limit of 32 CPUs, simply because we don't have more bits in an u_int. Note that the type is not supposed to solve massive parallelism, where the number of CPUs can be larger than the width of the widest integral type. As such, cpumask_t is not supposed to be a compound type. If such would be necessary in the future, we can deal with the issues then and there. For now, it can be assumed that the type is integral and unsigned. With this commit, all MD definitions start off as u_int. This allows us to phase-in cpumask_t at our leasure without breaking anything. Once cpumask_t is used consistently, platforms can switch to wider (or smaller) types if such would be beneficial (or not; whatever :-) Compile-tested on: i386 --- sys/alpha/include/_types.h | 1 + sys/amd64/include/_types.h | 1 + sys/arm/include/_types.h | 1 + sys/i386/include/_types.h | 1 + sys/ia64/include/_types.h | 1 + sys/powerpc/include/_types.h | 1 + sys/sparc64/include/_types.h | 1 + sys/sys/types.h | 1 + 8 files changed, 8 insertions(+) diff --git a/sys/alpha/include/_types.h b/sys/alpha/include/_types.h index 4b7249c1dfe..885b2415935 100644 --- a/sys/alpha/include/_types.h +++ b/sys/alpha/include/_types.h @@ -55,6 +55,7 @@ typedef unsigned long __uint64_t; * Standard type definitions. */ typedef __int32_t __clock_t; /* clock()... */ +typedef unsigned int __cpumask_t; typedef __int64_t __critical_t; typedef double __double_t; typedef float __float_t; diff --git a/sys/amd64/include/_types.h b/sys/amd64/include/_types.h index 446a2d02e53..4a7b6e7edcd 100644 --- a/sys/amd64/include/_types.h +++ b/sys/amd64/include/_types.h @@ -55,6 +55,7 @@ typedef unsigned long __uint64_t; * Standard type definitions. */ typedef __int32_t __clock_t; /* clock()... */ +typedef unsigned int __cpumask_t; typedef __int64_t __critical_t; typedef double __double_t; typedef double __float_t; diff --git a/sys/arm/include/_types.h b/sys/arm/include/_types.h index f7618352055..3c6cf695ab9 100644 --- a/sys/arm/include/_types.h +++ b/sys/arm/include/_types.h @@ -63,6 +63,7 @@ typedef unsigned long long __uint64_t; * Standard type definitions. */ typedef __uint32_t __clock_t; /* clock()... */ +typedef unsigned int __cpumask_t; typedef __int32_t __critical_t; typedef __int32_t __intfptr_t; typedef __int64_t __intmax_t; diff --git a/sys/i386/include/_types.h b/sys/i386/include/_types.h index 69f439d891c..aa240d05e10 100644 --- a/sys/i386/include/_types.h +++ b/sys/i386/include/_types.h @@ -68,6 +68,7 @@ typedef unsigned long long __uint64_t; * Standard type definitions. */ typedef unsigned long __clock_t; /* clock()... */ +typedef unsigned int __cpumask_t; typedef __int32_t __critical_t; typedef double __double_t; typedef double __float_t; diff --git a/sys/ia64/include/_types.h b/sys/ia64/include/_types.h index 9c15ef6576d..5809f630d88 100644 --- a/sys/ia64/include/_types.h +++ b/sys/ia64/include/_types.h @@ -55,6 +55,7 @@ typedef unsigned long __uint64_t; * Standard type definitions. */ typedef __int32_t __clock_t; /* clock()... */ +typedef unsigned int __cpumask_t; typedef __int64_t __critical_t; typedef double __double_t; typedef float __float_t; diff --git a/sys/powerpc/include/_types.h b/sys/powerpc/include/_types.h index e86ee8d8c46..32fe2e3f1e6 100644 --- a/sys/powerpc/include/_types.h +++ b/sys/powerpc/include/_types.h @@ -68,6 +68,7 @@ typedef unsigned long long __uint64_t; * Standard type definitions. */ typedef __uint32_t __clock_t; /* clock()... */ +typedef unsigned int __cpumask_t; typedef __int32_t __critical_t; typedef double __double_t; typedef double __float_t; diff --git a/sys/sparc64/include/_types.h b/sys/sparc64/include/_types.h index 5c9ceec7e65..688d986c1e8 100644 --- a/sys/sparc64/include/_types.h +++ b/sys/sparc64/include/_types.h @@ -55,6 +55,7 @@ typedef unsigned long __uint64_t; * Standard type definitions. */ typedef __int32_t __clock_t; /* clock()... */ +typedef unsigned int __cpumask_t; typedef __int64_t __critical_t; typedef double __double_t; typedef float __float_t; diff --git a/sys/sys/types.h b/sys/sys/types.h index d20581ce741..ac31bb7810b 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -255,6 +255,7 @@ typedef __vm_size_t vm_size_t; #ifdef _KERNEL typedef int boolean_t; +typedef __cpumask_t cpumask_t; typedef __intfptr_t intfptr_t; /*-