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)


------------------------------------------------------------------------

_______________________________________________
Adeos-main mailing list
Adeos-main@gna.org
https://mail.gna.org/listinfo/adeos-main


--

Philippe.

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to