summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/kern/kern_timeout.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-08-09 14:02:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-09-21 10:29:38 +0200
commitbb80d9df8bac71eedee1a6787ca63aef972a7e48 (patch)
tree1b5cb9443c5ead5706c35afb618abbbd1592315e /freebsd/sys/kern/kern_timeout.c
parentUpdate to FreeBSD head 2017-10-01 (diff)
downloadrtems-libbsd-bb80d9df8bac71eedee1a6787ca63aef972a7e48.tar.bz2
Update to FreeBSD head 2017-12-01
Git mirror commit e724f51f811a4b2bd29447f8b85ab5c2f9b88266. Update #3472.
Diffstat (limited to 'freebsd/sys/kern/kern_timeout.c')
-rw-r--r--freebsd/sys/kern/kern_timeout.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/freebsd/sys/kern/kern_timeout.c b/freebsd/sys/kern/kern_timeout.c
index e1f6209d..d33c158a 100644
--- a/freebsd/sys/kern/kern_timeout.c
+++ b/freebsd/sys/kern/kern_timeout.c
@@ -1,6 +1,8 @@
#include <machine/rtems-bsd-kernel-space.h>
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1982, 1986, 1991, 1993
* The Regents of the University of California. All rights reserved.
* (c) UNIX System Laboratories, Inc.
@@ -300,7 +302,7 @@ cc_cce_migrating(struct callout_cpu *cc, int direct)
/*
* Kernel low level callwheel initialization
- * called on cpu0 during kernel startup.
+ * called on the BSP during kernel startup.
*/
#ifdef __rtems__
static void rtems_bsd_timeout_init_early(void *);
@@ -357,7 +359,7 @@ callout_callwheel_init(void *dummy)
* XXX: Clip callout to result of previous function of maxusers
* maximum 384. This is still huge, but acceptable.
*/
- memset(CC_CPU(0), 0, sizeof(cc_cpu));
+ memset(CC_CPU(curcpu), 0, sizeof(cc_cpu));
#ifndef __rtems__
ncallout = imin(16 + maxproc + maxfiles, 18508);
TUNABLE_INT_FETCH("kern.ncallout", &ncallout);
@@ -381,7 +383,7 @@ callout_callwheel_init(void *dummy)
#endif /* __rtems__ */
/*
- * Only cpu0 handles timeout(9) and receives a preallocation.
+ * Only BSP handles timeout(9) and receives a preallocation.
*
* XXX: Once all timeout(9) consumers are converted this can
* be removed.
@@ -427,7 +429,7 @@ callout_cpu_init(struct callout_cpu *cc, int cpu)
snprintf(cc->cc_ktr_event_name, sizeof(cc->cc_ktr_event_name),
"callwheel cpu %d", cpu);
#ifndef __rtems__
- if (cc->cc_callout == NULL) /* Only cpu0 handles timeout(9) */
+ if (cc->cc_callout == NULL) /* Only BSP handles timeout(9) */
return;
#endif /* __rtems__ */
for (i = 0; i < ncallout; i++) {
@@ -499,7 +501,7 @@ start_softclock(void *dummy)
if (cpu == timeout_cpu)
continue;
cc = CC_CPU(cpu);
- cc->cc_callout = NULL; /* Only cpu0 handles timeout(9). */
+ cc->cc_callout = NULL; /* Only BSP handles timeout(9). */
callout_cpu_init(cc, cpu);
snprintf(name, sizeof(name), "clock (%d)", cpu);
ie = NULL;