Date: Tue, 11 Nov 2003 19:30:24 -0800 (PST) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 42082 for review Message-ID: <200311120330.hAC3UO4I032413@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=42082 Change 42082 by peter@peter_overcee on 2003/11/11 19:29:38 use a void * for the ithread stuff rather than an int so I can try and get some forward progress. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/intr_machdep.c#7 edit .. //depot/projects/hammer/sys/kern/kern_intr.c#16 edit .. //depot/projects/hammer/sys/sys/interrupt.h#5 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/intr_machdep.c#7 (text+ko) ==== @@ -56,7 +56,7 @@ #define MAX_STRAY_LOG 5 -typedef void (*mask_fn)(int vector); +typedef void (*mask_fn)(void *cookie); static int intrcnt_index; static struct intsrc *interrupt_sources[NUM_IO_INTS]; @@ -92,7 +92,7 @@ * that when we enable/disable an interrupt we call the PIC * methods directly. */ - error = ithread_create(&isrc->is_ithread, (intptr_t)isrc, 0, + error = ithread_create(&isrc->is_ithread, isrc, 0, (mask_fn)isrc->is_pic->pic_disable_source, (mask_fn)isrc->is_pic->pic_enable_source, "irq%d:", vector); if (error) ==== //depot/projects/hammer/sys/kern/kern_intr.c#16 (text+ko) ==== @@ -58,7 +58,7 @@ struct int_entropy { struct proc *proc; - int vector; + void *vector; }; void *vm_ih; @@ -169,8 +169,8 @@ } int -ithread_create(struct ithd **ithread, int vector, int flags, - void (*disable)(int), void (*enable)(int), const char *fmt, ...) +ithread_create(struct ithd **ithread, void *vector, int flags, + void (*disable)(void *), void (*enable)(void *), const char *fmt, ...) { struct ithd *ithd; struct thread *td; @@ -435,7 +435,7 @@ if ((ithd->it_flags & IT_SOFT) == 0) return(EINVAL); } else { - error = ithread_create(&ithd, pri, IT_SOFT, NULL, NULL, + error = ithread_create(&ithd, (void *)(uintptr_t)pri, IT_SOFT, NULL, NULL, "swi%d:", pri); if (error) return (error); ==== //depot/projects/hammer/sys/sys/interrupt.h#5 (text+ko) ==== @@ -67,12 +67,12 @@ LIST_ENTRY(ithd) it_list; /* All interrupt threads. */ TAILQ_HEAD(, intrhand) it_handlers; /* Interrupt handlers. */ struct ithd *it_interrupted; /* Who we interrupted. */ - void (*it_disable)(int); /* Enable interrupt source. */ - void (*it_enable)(int); /* Disable interrupt source. */ + void (*it_disable)(void *); /* Enable interrupt source. */ + void (*it_enable)(void *); /* Disable interrupt source. */ void *it_md; /* Hook for MD interrupt code. */ int it_flags; /* Interrupt-specific flags. */ int it_need; /* Needs service. */ - int it_vector; + void *it_vector; char it_name[MAXCOMLEN + 1]; }; @@ -114,8 +114,8 @@ #ifdef DDB void db_dump_ithread(struct ithd *ithd, int handlers); #endif -int ithread_create(struct ithd **ithread, int vector, int flags, - void (*disable)(int), void (*enable)(int), const char *fmt, ...) +int ithread_create(struct ithd **ithread, void *vector, int flags, + void (*disable)(void *), void (*enable)(void *), const char *fmt, ...) __printflike(6, 7); int ithread_destroy(struct ithd *ithread); u_char ithread_priority(enum intr_type flags);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311120330.hAC3UO4I032413>