Include the CPU id in the per-CPU timer swi thread descriptions.

Original patch by:	jhb
This commit is contained in:
Adrian Chadd 2014-02-14 23:19:51 +00:00
parent 06db1b4a59
commit f44e2a4c0f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261906

View File

@ -352,12 +352,14 @@ static void
start_softclock(void *dummy)
{
struct callout_cpu *cc;
char name[MAXCOMLEN];
#ifdef SMP
int cpu;
#endif
cc = CC_CPU(timeout_cpu);
if (swi_add(&clk_intr_event, "clock", softclock, cc, SWI_CLOCK,
snprintf(name, sizeof(name), "clock (%d)", timeout_cpu);
if (swi_add(&clk_intr_event, name, softclock, cc, SWI_CLOCK,
INTR_MPSAFE, &cc->cc_cookie))
panic("died while creating standard software ithreads");
#ifdef SMP
@ -367,7 +369,8 @@ start_softclock(void *dummy)
cc = CC_CPU(cpu);
cc->cc_callout = NULL; /* Only cpu0 handles timeout(9). */
callout_cpu_init(cc);
if (swi_add(NULL, "clock", softclock, cc, SWI_CLOCK,
snprintf(name, sizeof(name), "clock (%d)", cpu);
if (swi_add(NULL, name, softclock, cc, SWI_CLOCK,
INTR_MPSAFE, &cc->cc_cookie))
panic("died while creating standard software ithreads");
}