summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_smp.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-03-27 18:21:24 +0000
committermarcel <marcel@FreeBSD.org>2004-03-27 18:21:24 +0000
commitfb520fa8601bde156dded0cc31041563198d394a (patch)
treec101622f609c2f4a9be9e77e8a51b404af6d05da /sys/kern/subr_smp.c
parentd00cd2e215da68f95aaeba84ada4b94b203c0f98 (diff)
downloadFreeBSD-src-fb520fa8601bde156dded0cc31041563198d394a.zip
FreeBSD-src-fb520fa8601bde156dded0cc31041563198d394a.tar.gz
Change the type of the various CPU masks to cpumask_t. Note that as
long as there are still explicit uses of int, whether in types or in function names (such as atomic_set_int() in sched_ule.c), we can not change cpumask_t to be anything other than u_int. See also the commit log for sys/sys/types.h, revision 1.84.
Diffstat (limited to 'sys/kern/subr_smp.c')
-rw-r--r--sys/kern/subr_smp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index cc5a98b..b1790b4 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -50,8 +50,8 @@ __FBSDID("$FreeBSD$");
#include <machine/smp.h>
#ifdef SMP
-volatile u_int stopped_cpus;
-volatile u_int started_cpus;
+volatile cpumask_t stopped_cpus;
+volatile cpumask_t started_cpus;
void (*cpustop_restartfunc)(void);
#endif
@@ -62,7 +62,7 @@ int mp_maxcpus = MAXCPU;
struct cpu_top *smp_topology;
volatile int smp_started;
-u_int all_cpus;
+cpumask_t all_cpus;
u_int mp_maxid;
SYSCTL_NODE(_kern, OID_AUTO, smp, CTLFLAG_RD, NULL, "Kernel SMP");
@@ -214,7 +214,7 @@ forward_roundrobin(void)
{
struct pcpu *pc;
struct thread *td;
- u_int id, map;
+ cpumask_t id, map;
mtx_assert(&sched_lock, MA_OWNED);
@@ -255,7 +255,7 @@ forward_roundrobin(void)
* from executing at same time.
*/
int
-stop_cpus(u_int map)
+stop_cpus(cpumask_t map)
{
int i;
@@ -266,7 +266,7 @@ stop_cpus(u_int map)
/* send the stop IPI to all CPUs in map */
ipi_selected(map, IPI_STOP);
-
+
i = 0;
while ((atomic_load_acq_int(&stopped_cpus) & map) != map) {
/* spin */
@@ -297,7 +297,7 @@ stop_cpus(u_int map)
* 1: ok
*/
int
-restart_cpus(u_int map)
+restart_cpus(cpumask_t map)
{
if (!smp_started)
OpenPOWER on IntegriCloud