|
Re: [Adeos-main] [PATCH] let ipipe_catch_event return old handler: msg#00182linux.real-time.xenomai.devel
Philippe Gerum wrote: > Jan Kiszka wrote: > > <snip> > > Don't you mean this instead? > >> -int ipipe_catch_event(struct ipipe_domain *ipd, >> - unsigned event, >> - int (*handler)(unsigned event, struct ipipe_domain >> *ipd, void *data)) >> +ipipe_event_handler_t ipipe_catch_event(struct ipipe_domain *ipd, >> + unsigned event, >> + ipipe_event_handler_t handler) >> { > + ipipe_event_handler_t old_handler; >> int self = 0; >> >> @@ -278,7 +278,7 @@ >> } >> >> if (event >= IPIPE_NR_EVENTS) >> - return -EINVAL; >> + return NULL; >> > - if (!xchg(&ipd->evhand[event],handler)) { > + if (!(old_handler = xchg(&ipd->evhand[event],handler))) { >> if (handler) { >> @@ -301,7 +301,7 @@ >> ipd->evself |= (1LL << event); >> } >> >> - return 0; >> + return handler; > - return handler; > + return old_handler; >> } >> >> cpumask_t ipipe_set_irq_affinity (unsigned irq, cpumask_t cpumask) >> >> Ouch, obviously. A quick hack which was only tested for not breaking existing software. Jan
Xenomai-core mailing list Xenomai-core@xxxxxxx https://mail.gna.org/listinfo/xenomai-core |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [RFC] shadow threads with prio 0 / SCHED_NORMAL: 00182, Gilles Chanteperdrix |
|---|---|
| Next by Date: | Re: Xenomai on Freescale i.MX21 (ARM926J): 00182, Philippe Gerum |
| Previous by Thread: | Re: [Adeos-main] [PATCH] let ipipe_catch_event return old handleri: 00182, Philippe Gerum |
| Next by Thread: | Re: [Adeos-main] [PATCH] let ipipe_catch_event return old handler: 00182, Philippe Gerum |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |