@@ -166,23 +166,23 @@ void
166166ithread_forkall (void )
167167{
168168 struct intrsource * is ;
169- static int softs ;
169+ struct intrhand * ih ;
170170 char name [MAXCOMLEN + 1 ];
171171
172172 TAILQ_FOREACH (is , & ithreads , entry ) {
173173 DPRINTF (1 , "ithread forking intrsource pin %d\n" , is -> is_pin );
174-
175- if (is -> is_pic == & softintr_pic ) {
176- snprintf (name , sizeof name , "ithread soft %d" ,
177- softs ++ );
178- if (kthread_create (ithread , is , & is -> is_proc , name ))
179- panic ("ithread_forkall" );
180- } else {
181- snprintf (name , sizeof name , "ithread pin %d" ,
182- is -> is_pin );
183- if (kthread_create (ithread , is , & is -> is_proc , name ))
184- panic ("ithread_forkall" );
174+ for (ih = is -> is_handlers ; ih != NULL ; ih = ih -> ih_next ) {
175+ KASSERT (ih -> ih_count .ec_name != NULL );
176+ if (ih == is -> is_handlers ) {
177+ strlcpy (name , ih -> ih_count .ec_name ,
178+ sizeof (name ));
179+ continue ;
180+ }
181+ strlcat (name , "," , sizeof (name ));
182+ strlcat (name , ih -> ih_count .ec_name , sizeof (name ));
185183 }
184+ if (kthread_create (ithread , is , & is -> is_proc , name ))
185+ panic ("ithread_forkall" );
186186 }
187187}
188188
0 commit comments