PERFORCE change 42082 for review
Peter Wemm
peter at FreeBSD.org
Tue Nov 11 19:30:26 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=42082
Change 42082 by peter at 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);
More information about the p4-projects
mailing list