[Xenomai-git] Philippe Gerum : nucleus, posix: use fast APC scheduling call
Module: xenomai-head Branch: master Commit: 6a020f5a89955a42f1e03621ae6c63a587e9c75c URL: http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=6a020f5a89955a42f1e03621ae6c63a587e9c75c Author: Philippe Gerum Date: Sat Aug 28 13:04:45 2010 +0200 nucleus, posix: use fast APC scheduling call --- ksrc/nucleus/pipe.c | 16 ksrc/nucleus/registry.c |4 ++-- ksrc/nucleus/select.c |3 +-- ksrc/nucleus/shadow.c |4 ++-- ksrc/skins/posix/apc.c |3 +-- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/ksrc/nucleus/pipe.c b/ksrc/nucleus/pipe.c index b0fd80c..b8abd56 100644 --- a/ksrc/nucleus/pipe.c +++ b/ksrc/nucleus/pipe.c @@ -215,9 +215,9 @@ static void xnpipe_wakeup_proc(void *cookie) xnlock_put_irqrestore(&nklock, s); } -static inline void xnpipe_schedule_request(void) +static inline void xnpipe_schedule_request(void) /* hw IRQs off */ { - rthal_apc_schedule(xnpipe_wakeup_apc); + __rthal_apc_schedule(xnpipe_wakeup_apc); } static inline ssize_t xnpipe_flush_bufq(void (*fn)(void *buf, void *xstate), @@ -347,11 +347,11 @@ int xnpipe_connect(int minor, struct xnpipe_operations *ops, void *xstate) } } - xnlock_put_irqrestore(&nklock, s); - if (need_sched) xnpipe_schedule_request(); + xnlock_put_irqrestore(&nklock, s); + return minor; } EXPORT_SYMBOL_GPL(xnpipe_connect); @@ -416,11 +416,11 @@ cleanup: xnpipe_minor_free(minor); } - xnlock_put_irqrestore(&nklock, s); - if (need_sched) xnpipe_schedule_request(); + xnlock_put_irqrestore(&nklock, s); + return 0; } EXPORT_SYMBOL_GPL(xnpipe_disconnect); @@ -475,11 +475,11 @@ ssize_t xnpipe_send(int minor, struct xnpipe_mh *mh, size_t size, int flags) need_sched = 1; } - xnlock_put_irqrestore(&nklock, s); - if (need_sched) xnpipe_schedule_request(); + xnlock_put_irqrestore(&nklock, s); + return (ssize_t) size; } EXPORT_SYMBOL_GPL(xnpipe_send); diff --git a/ksrc/nucleus/registry.c b/ksrc/nucleus/registry.c index 7dc7cf0..6977132 100644 --- a/ksrc/nucleus/registry.c +++ b/ksrc/nucleus/registry.c @@ -405,7 +405,7 @@ static inline void registry_proc_export(xnobject_t *object, xnpnode_t *pnode) object->pnode = pnode; removeq(®istry_obj_busyq, &object->link); appendq(®istry_obj_procq, &object->link); - rthal_apc_schedule(registry_proc_apc); + __rthal_apc_schedule(registry_proc_apc); } static inline void registry_proc_unexport(xnobject_t *object) @@ -413,7 +413,7 @@ static inline void registry_proc_unexport(xnobject_t *object) if (object->proc != XNOBJECT_PROC_RESERVED1) { removeq(®istry_obj_busyq, &object->link); appendq(®istry_obj_procq, &object->link); - rthal_apc_schedule(registry_proc_apc); + __rthal_apc_schedule(registry_proc_apc); } else { /* Unexporting before the lower stage has had a chance to export. Move back the object to the busyq just like if no diff --git a/ksrc/nucleus/select.c b/ksrc/nucleus/select.c index 656671d..6ba59cd 100644 --- a/ksrc/nucleus/select.c +++ b/ksrc/nucleus/select.c @@ -405,9 +405,8 @@ void xnselector_destroy(struct xnselector *selector) inith(&selector->destroy_link); xnlock_get_irqsave(&nklock, s); appendq(&xnselectors, &selector->destroy_link); + __rthal_apc_schedule(xnselect_apc); xnlock_put_irqrestore(&nklock, s); - - rthal_apc_schedule(xnselect_apc); } EXPORT_SYMBOL_GPL(xnselector_destroy); diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c index c15e6e1..fe1ba64 100644 --- a/ksrc/nucleus/shadow.c +++ b/ksrc/nucleus/shadow.c @@ -895,9 +895,9 @@ static void schedule_linux_call(int type, struct task_struct *p, int arg) rq->req[reqnum].task = p; rq->req[reqnum].arg = arg; - splexit(s); + __rthal_apc_schedule(lostage_apc); - rthal_apc_schedule(lostage_apc); + splexit(s); } static inline int normalize_priority(int prio) diff --git a/ksrc/skins/posix/apc.c b/ksrc/skins/posix/apc.c index 9092d5d..176687e 100644 --- a/ksrc/skins/posix/apc.c +++ b/ksrc/skins/posix/apc.c @@ -47,9 +47,8 @@ void pse51_schedule_lostage(int request, void *arg, size_t size) rq->req[reqnum].arg = arg; rq->req[reqnum].size = size; rq->in = (reqnum + 1) & (PSE51_LO_MAX_REQUESTS - 1); + __rthal_apc_schedule(pse51_lostage_apc); splexit(s); - - rthal_apc_schedule(pse51_lostage_apc); } static void pse51_lostage_handle_request(void *cookie) ___ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : nucleus, posix: use fast APC scheduling call
Module: xenomai-head Branch: master Commit: 6310b2822e0efcbabe50bc46f81316f4726b9f38 URL: http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=6310b2822e0efcbabe50bc46f81316f4726b9f38 Author: Philippe Gerum Date: Sat Aug 28 13:04:45 2010 +0200 nucleus, posix: use fast APC scheduling call --- ksrc/nucleus/pipe.c | 16 ksrc/nucleus/registry.c |4 ++-- ksrc/nucleus/select.c |3 +-- ksrc/nucleus/shadow.c |4 ++-- ksrc/skins/posix/apc.c |3 +-- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/ksrc/nucleus/pipe.c b/ksrc/nucleus/pipe.c index 303dce9..7dc32a3 100644 --- a/ksrc/nucleus/pipe.c +++ b/ksrc/nucleus/pipe.c @@ -214,9 +214,9 @@ static void xnpipe_wakeup_proc(void *cookie) xnlock_put_irqrestore(&nklock, s); } -static inline void xnpipe_schedule_request(void) +static inline void xnpipe_schedule_request(void) /* hw IRQs off */ { - rthal_apc_schedule(xnpipe_wakeup_apc); + __rthal_apc_schedule(xnpipe_wakeup_apc); } static inline ssize_t xnpipe_flush_bufq(void (*fn)(void *buf, void *xstate), @@ -346,11 +346,11 @@ int xnpipe_connect(int minor, struct xnpipe_operations *ops, void *xstate) } } - xnlock_put_irqrestore(&nklock, s); - if (need_sched) xnpipe_schedule_request(); + xnlock_put_irqrestore(&nklock, s); + return minor; } EXPORT_SYMBOL_GPL(xnpipe_connect); @@ -415,11 +415,11 @@ cleanup: xnpipe_minor_free(minor); } - xnlock_put_irqrestore(&nklock, s); - if (need_sched) xnpipe_schedule_request(); + xnlock_put_irqrestore(&nklock, s); + return 0; } EXPORT_SYMBOL_GPL(xnpipe_disconnect); @@ -474,11 +474,11 @@ ssize_t xnpipe_send(int minor, struct xnpipe_mh *mh, size_t size, int flags) need_sched = 1; } - xnlock_put_irqrestore(&nklock, s); - if (need_sched) xnpipe_schedule_request(); + xnlock_put_irqrestore(&nklock, s); + return (ssize_t) size; } EXPORT_SYMBOL_GPL(xnpipe_send); diff --git a/ksrc/nucleus/registry.c b/ksrc/nucleus/registry.c index 9896c37..9a6f66e 100644 --- a/ksrc/nucleus/registry.c +++ b/ksrc/nucleus/registry.c @@ -485,7 +485,7 @@ static inline void registry_export_pnode(struct xnobject *object, object->pnode = pnode; removeq(®istry_obj_busyq, &object->link); appendq(®istry_obj_procq, &object->link); - rthal_apc_schedule(registry_proc_apc); + __rthal_apc_schedule(registry_proc_apc); } static inline void registry_unexport_pnode(struct xnobject *object) @@ -501,7 +501,7 @@ static inline void registry_unexport_pnode(struct xnobject *object) object->pnode->ops->touch(object); removeq(®istry_obj_busyq, &object->link); appendq(®istry_obj_procq, &object->link); - rthal_apc_schedule(registry_proc_apc); + __rthal_apc_schedule(registry_proc_apc); } else { /* * Unexporting before the lower stage has had a chance diff --git a/ksrc/nucleus/select.c b/ksrc/nucleus/select.c index 656671d..6ba59cd 100644 --- a/ksrc/nucleus/select.c +++ b/ksrc/nucleus/select.c @@ -405,9 +405,8 @@ void xnselector_destroy(struct xnselector *selector) inith(&selector->destroy_link); xnlock_get_irqsave(&nklock, s); appendq(&xnselectors, &selector->destroy_link); + __rthal_apc_schedule(xnselect_apc); xnlock_put_irqrestore(&nklock, s); - - rthal_apc_schedule(xnselect_apc); } EXPORT_SYMBOL_GPL(xnselector_destroy); diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c index 609151e..5f2a6be 100644 --- a/ksrc/nucleus/shadow.c +++ b/ksrc/nucleus/shadow.c @@ -903,9 +903,9 @@ static void schedule_linux_call(int type, struct task_struct *p, int arg) rq->req[reqnum].task = p; rq->req[reqnum].arg = arg; - splexit(s); + __rthal_apc_schedule(lostage_apc); - rthal_apc_schedule(lostage_apc); + splexit(s); } static inline int normalize_priority(int prio) diff --git a/ksrc/skins/posix/apc.c b/ksrc/skins/posix/apc.c index 9092d5d..176687e 100644 --- a/ksrc/skins/posix/apc.c +++ b/ksrc/skins/posix/apc.c @@ -47,9 +47,8 @@ void pse51_schedule_lostage(int request, void *arg, size_t size) rq->req[reqnum].arg = arg; rq->req[reqnum].size = size; rq->in = (reqnum + 1) & (PSE51_LO_MAX_REQUESTS - 1); + __rthal_apc_schedule(pse51_lostage_apc); splexit(s); - - rthal_apc_schedule(pse51_lostage_apc); } static void pse51_lostage_handle_request(void *cookie) ___ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : nucleus, posix: use fast APC scheduling call
Module: xenomai-2.5 Branch: master Commit: 6a020f5a89955a42f1e03621ae6c63a587e9c75c URL: http://git.xenomai.org/?p=xenomai-2.5.git;a=commit;h=6a020f5a89955a42f1e03621ae6c63a587e9c75c Author: Philippe Gerum Date: Sat Aug 28 13:04:45 2010 +0200 nucleus, posix: use fast APC scheduling call --- ksrc/nucleus/pipe.c | 16 ksrc/nucleus/registry.c |4 ++-- ksrc/nucleus/select.c |3 +-- ksrc/nucleus/shadow.c |4 ++-- ksrc/skins/posix/apc.c |3 +-- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/ksrc/nucleus/pipe.c b/ksrc/nucleus/pipe.c index b0fd80c..b8abd56 100644 --- a/ksrc/nucleus/pipe.c +++ b/ksrc/nucleus/pipe.c @@ -215,9 +215,9 @@ static void xnpipe_wakeup_proc(void *cookie) xnlock_put_irqrestore(&nklock, s); } -static inline void xnpipe_schedule_request(void) +static inline void xnpipe_schedule_request(void) /* hw IRQs off */ { - rthal_apc_schedule(xnpipe_wakeup_apc); + __rthal_apc_schedule(xnpipe_wakeup_apc); } static inline ssize_t xnpipe_flush_bufq(void (*fn)(void *buf, void *xstate), @@ -347,11 +347,11 @@ int xnpipe_connect(int minor, struct xnpipe_operations *ops, void *xstate) } } - xnlock_put_irqrestore(&nklock, s); - if (need_sched) xnpipe_schedule_request(); + xnlock_put_irqrestore(&nklock, s); + return minor; } EXPORT_SYMBOL_GPL(xnpipe_connect); @@ -416,11 +416,11 @@ cleanup: xnpipe_minor_free(minor); } - xnlock_put_irqrestore(&nklock, s); - if (need_sched) xnpipe_schedule_request(); + xnlock_put_irqrestore(&nklock, s); + return 0; } EXPORT_SYMBOL_GPL(xnpipe_disconnect); @@ -475,11 +475,11 @@ ssize_t xnpipe_send(int minor, struct xnpipe_mh *mh, size_t size, int flags) need_sched = 1; } - xnlock_put_irqrestore(&nklock, s); - if (need_sched) xnpipe_schedule_request(); + xnlock_put_irqrestore(&nklock, s); + return (ssize_t) size; } EXPORT_SYMBOL_GPL(xnpipe_send); diff --git a/ksrc/nucleus/registry.c b/ksrc/nucleus/registry.c index 7dc7cf0..6977132 100644 --- a/ksrc/nucleus/registry.c +++ b/ksrc/nucleus/registry.c @@ -405,7 +405,7 @@ static inline void registry_proc_export(xnobject_t *object, xnpnode_t *pnode) object->pnode = pnode; removeq(®istry_obj_busyq, &object->link); appendq(®istry_obj_procq, &object->link); - rthal_apc_schedule(registry_proc_apc); + __rthal_apc_schedule(registry_proc_apc); } static inline void registry_proc_unexport(xnobject_t *object) @@ -413,7 +413,7 @@ static inline void registry_proc_unexport(xnobject_t *object) if (object->proc != XNOBJECT_PROC_RESERVED1) { removeq(®istry_obj_busyq, &object->link); appendq(®istry_obj_procq, &object->link); - rthal_apc_schedule(registry_proc_apc); + __rthal_apc_schedule(registry_proc_apc); } else { /* Unexporting before the lower stage has had a chance to export. Move back the object to the busyq just like if no diff --git a/ksrc/nucleus/select.c b/ksrc/nucleus/select.c index 656671d..6ba59cd 100644 --- a/ksrc/nucleus/select.c +++ b/ksrc/nucleus/select.c @@ -405,9 +405,8 @@ void xnselector_destroy(struct xnselector *selector) inith(&selector->destroy_link); xnlock_get_irqsave(&nklock, s); appendq(&xnselectors, &selector->destroy_link); + __rthal_apc_schedule(xnselect_apc); xnlock_put_irqrestore(&nklock, s); - - rthal_apc_schedule(xnselect_apc); } EXPORT_SYMBOL_GPL(xnselector_destroy); diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c index c15e6e1..fe1ba64 100644 --- a/ksrc/nucleus/shadow.c +++ b/ksrc/nucleus/shadow.c @@ -895,9 +895,9 @@ static void schedule_linux_call(int type, struct task_struct *p, int arg) rq->req[reqnum].task = p; rq->req[reqnum].arg = arg; - splexit(s); + __rthal_apc_schedule(lostage_apc); - rthal_apc_schedule(lostage_apc); + splexit(s); } static inline int normalize_priority(int prio) diff --git a/ksrc/skins/posix/apc.c b/ksrc/skins/posix/apc.c index 9092d5d..176687e 100644 --- a/ksrc/skins/posix/apc.c +++ b/ksrc/skins/posix/apc.c @@ -47,9 +47,8 @@ void pse51_schedule_lostage(int request, void *arg, size_t size) rq->req[reqnum].arg = arg; rq->req[reqnum].size = size; rq->in = (reqnum + 1) & (PSE51_LO_MAX_REQUESTS - 1); + __rthal_apc_schedule(pse51_lostage_apc); splexit(s); - - rthal_apc_schedule(pse51_lostage_apc); } static void pse51_lostage_handle_request(void *cookie) ___ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : nucleus, posix: use fast APC scheduling call
Module: xenomai-rpm Branch: for-upstream Commit: 6a020f5a89955a42f1e03621ae6c63a587e9c75c URL: http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=6a020f5a89955a42f1e03621ae6c63a587e9c75c Author: Philippe Gerum Date: Sat Aug 28 13:04:45 2010 +0200 nucleus, posix: use fast APC scheduling call --- ksrc/nucleus/pipe.c | 16 ksrc/nucleus/registry.c |4 ++-- ksrc/nucleus/select.c |3 +-- ksrc/nucleus/shadow.c |4 ++-- ksrc/skins/posix/apc.c |3 +-- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/ksrc/nucleus/pipe.c b/ksrc/nucleus/pipe.c index b0fd80c..b8abd56 100644 --- a/ksrc/nucleus/pipe.c +++ b/ksrc/nucleus/pipe.c @@ -215,9 +215,9 @@ static void xnpipe_wakeup_proc(void *cookie) xnlock_put_irqrestore(&nklock, s); } -static inline void xnpipe_schedule_request(void) +static inline void xnpipe_schedule_request(void) /* hw IRQs off */ { - rthal_apc_schedule(xnpipe_wakeup_apc); + __rthal_apc_schedule(xnpipe_wakeup_apc); } static inline ssize_t xnpipe_flush_bufq(void (*fn)(void *buf, void *xstate), @@ -347,11 +347,11 @@ int xnpipe_connect(int minor, struct xnpipe_operations *ops, void *xstate) } } - xnlock_put_irqrestore(&nklock, s); - if (need_sched) xnpipe_schedule_request(); + xnlock_put_irqrestore(&nklock, s); + return minor; } EXPORT_SYMBOL_GPL(xnpipe_connect); @@ -416,11 +416,11 @@ cleanup: xnpipe_minor_free(minor); } - xnlock_put_irqrestore(&nklock, s); - if (need_sched) xnpipe_schedule_request(); + xnlock_put_irqrestore(&nklock, s); + return 0; } EXPORT_SYMBOL_GPL(xnpipe_disconnect); @@ -475,11 +475,11 @@ ssize_t xnpipe_send(int minor, struct xnpipe_mh *mh, size_t size, int flags) need_sched = 1; } - xnlock_put_irqrestore(&nklock, s); - if (need_sched) xnpipe_schedule_request(); + xnlock_put_irqrestore(&nklock, s); + return (ssize_t) size; } EXPORT_SYMBOL_GPL(xnpipe_send); diff --git a/ksrc/nucleus/registry.c b/ksrc/nucleus/registry.c index 7dc7cf0..6977132 100644 --- a/ksrc/nucleus/registry.c +++ b/ksrc/nucleus/registry.c @@ -405,7 +405,7 @@ static inline void registry_proc_export(xnobject_t *object, xnpnode_t *pnode) object->pnode = pnode; removeq(®istry_obj_busyq, &object->link); appendq(®istry_obj_procq, &object->link); - rthal_apc_schedule(registry_proc_apc); + __rthal_apc_schedule(registry_proc_apc); } static inline void registry_proc_unexport(xnobject_t *object) @@ -413,7 +413,7 @@ static inline void registry_proc_unexport(xnobject_t *object) if (object->proc != XNOBJECT_PROC_RESERVED1) { removeq(®istry_obj_busyq, &object->link); appendq(®istry_obj_procq, &object->link); - rthal_apc_schedule(registry_proc_apc); + __rthal_apc_schedule(registry_proc_apc); } else { /* Unexporting before the lower stage has had a chance to export. Move back the object to the busyq just like if no diff --git a/ksrc/nucleus/select.c b/ksrc/nucleus/select.c index 656671d..6ba59cd 100644 --- a/ksrc/nucleus/select.c +++ b/ksrc/nucleus/select.c @@ -405,9 +405,8 @@ void xnselector_destroy(struct xnselector *selector) inith(&selector->destroy_link); xnlock_get_irqsave(&nklock, s); appendq(&xnselectors, &selector->destroy_link); + __rthal_apc_schedule(xnselect_apc); xnlock_put_irqrestore(&nklock, s); - - rthal_apc_schedule(xnselect_apc); } EXPORT_SYMBOL_GPL(xnselector_destroy); diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c index c15e6e1..fe1ba64 100644 --- a/ksrc/nucleus/shadow.c +++ b/ksrc/nucleus/shadow.c @@ -895,9 +895,9 @@ static void schedule_linux_call(int type, struct task_struct *p, int arg) rq->req[reqnum].task = p; rq->req[reqnum].arg = arg; - splexit(s); + __rthal_apc_schedule(lostage_apc); - rthal_apc_schedule(lostage_apc); + splexit(s); } static inline int normalize_priority(int prio) diff --git a/ksrc/skins/posix/apc.c b/ksrc/skins/posix/apc.c index 9092d5d..176687e 100644 --- a/ksrc/skins/posix/apc.c +++ b/ksrc/skins/posix/apc.c @@ -47,9 +47,8 @@ void pse51_schedule_lostage(int request, void *arg, size_t size) rq->req[reqnum].arg = arg; rq->req[reqnum].size = size; rq->in = (reqnum + 1) & (PSE51_LO_MAX_REQUESTS - 1); + __rthal_apc_schedule(pse51_lostage_apc); splexit(s); - - rthal_apc_schedule(pse51_lostage_apc); } static void pse51_lostage_handle_request(void *cookie) ___ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git