From owner-p4-projects@FreeBSD.ORG Tue Nov 11 19:30:26 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0B25C16A4DD; Tue, 11 Nov 2003 19:30:26 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B6F2216A4DC for ; Tue, 11 Nov 2003 19:30:25 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85DC543FBF for ; Tue, 11 Nov 2003 19:30:24 -0800 (PST) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hAC3UOXJ032418 for ; Tue, 11 Nov 2003 19:30:24 -0800 (PST) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hAC3UO4I032413 for perforce@freebsd.org; Tue, 11 Nov 2003 19:30:24 -0800 (PST) (envelope-from peter@freebsd.org) Date: Tue, 11 Nov 2003 19:30:24 -0800 (PST) Message-Id: <200311120330.hAC3UO4I032413@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 42082 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2003 03:30:26 -0000 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);