Samuel Thibault <[email protected]> writes:
> [email protected] via Bug reports for the GNU Hurd, le sam. 12
> oct. 2024 10:36:50 -0400, a ecrit:
Ok, for some reason I thought you needed to know struct irq.
>> +`struct irq`'s definition is:
>> +
>> + struct irq {
>> + void (*handler)(void *);
>> + void *context;
>> + int gsi;
>> + mach_port_t port;
>> + bool enabled;
>> + bool shutdown;
>> + pthread_mutex_t irqlock;
>> + pthread_cond_t irqcond;
>> + };
>
> I don't think we want to provide the struct irq content, since it's
> private data.
>
>> -If you want to use pthread, then set up this function, which installs
>> -the handlers via pthread. `arg` is a `struct irc *`.
+This function can be called explicitly from an existing thread.
Hopefully that's better. If it's not, then I'll let you rewrite it ok?
I'm not sure what irqhelp_server_loop does, or is for.
>> +
>> + void * irqhelp_server_loop (void *arg);
>
> You have to use this function anyway, otherwise irqhelper won't work at
> all. It's ready for use with pthread_create, but it could also be called
> explicitly in e.g. an existing thread.
>
> Samuel
>
--
Joshua Branson
Sent from the Hurd