[Xenomai-git] Philippe Gerum : cobalt/thread: fix leakage of XNKICKED status

2014-05-08 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 3902294054710cdbd8f766c04b565010cfd81918
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=3902294054710cdbd8f766c04b565010cfd81918

Author: Philippe Gerum r...@xenomai.org
Date:   Thu May  8 13:09:20 2014 +0200

cobalt/thread: fix leakage of XNKICKED status

Considering the following scenario, on a multi-core system:

1. kernel@CPU0 sends regular linux signal to preempted thread@CPU1
2. thread@CPU1 kicked in ready state (XNREADY|XNKICKED) in sigwake
3. thread@CPU1 regains CPU, invokes linux/lostage syscall next
4. thread@CPU1 relaxes prior to running syscall handler
5. thread@CPU1 skips prepare_for_signal() because in relaxed mode
6. thread@CPU1 handles regular signal on its way back to userland

= XNKICKED set, signal_pending(thread) cleared.

7. thread@CPU1 invokes syscall requiring primary mode (hardens at first pass)
8. thread@CPU1 runs blocking Xenomai syscall, fails due to XNKICKED
9. thread@CPU1 skips prepare_for_signal() because signal_pending() false
10. goto 7

Oops.

The fix is to make sure that a kicked thread about to relax (which
means suspend Xenomai-wise) clears the XNKICKED bit right before
suspending, since it will necessarily traverse the regular signal
handling code on its way back to userland, prior to returning from a
blocking Xenomai service.

---

 kernel/cobalt/thread.c |   20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index 7e4c9de..5887be9 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -810,18 +810,16 @@ void xnthread_suspend(struct xnthread *thread, int mask,
 
/*
 * If attempting to suspend a runnable thread which is pending
-* a forced switch to secondary mode, just raise the break
-* condition and return immediately.
+* a forced switch to secondary mode (XNKICKED), just raise
+* the XNBREAK status and return immediately, except if we
+* are precisely doing such switch by applying XNRELAX.
 *
-* We may end up suspending a kicked thread that has been
-* preempted on its relaxing path, which is a perfectly valid
-* situation: we just ignore the signal notification in
-* primary mode, and rely on the wakeup call pending for that
-* task in the root context, to collect and act upon the
-* pending Linux signal (see handle_sigwake_event()).
+* In the latter case, we also make sure to clear XNKICKED,
+* since we won't go through prepare_for_signal() once
+* relaxed.
 */
-   if ((oldstate  XNTHREAD_BLOCK_BITS) == 0) {
-   if ((mask  XNRELAX) == 0) {
+   if (likely((oldstate  XNTHREAD_BLOCK_BITS) == 0)) {
+   if (likely((mask  XNRELAX) == 0)) {
if (xnthread_test_info(thread, XNKICKED))
goto abort;
if (thread == sched-curr 
@@ -829,7 +827,7 @@ void xnthread_suspend(struct xnthread *thread, int mask,
goto abort;
}
xnthread_clear_info(thread,
-   XNRMID|XNTIMEO|XNBREAK|XNWAKEN|XNROBBED);
+   
XNRMID|XNTIMEO|XNBREAK|XNWAKEN|XNROBBED|XNKICKED);
}
 
/*


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Philippe Gerum : copperplate/notifier: enable notifying remote threads

2014-05-08 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 47488652207cc0f3dc35611c593ff9effed1381b
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=47488652207cc0f3dc35611c593ff9effed1381b

Author: Philippe Gerum r...@xenomai.org
Date:   Wed May  7 18:12:07 2014 +0200

copperplate/notifier: enable notifying remote threads

In shared multi-processing mode, we may have to suspend/resume threads
which belong to sibling processes from the same Copperplate session.

To this end, we drop the local pipe previously used for waiting for
the resume event. The suspended thread now waits for SIGRESM directly
via sigsuspend(), which is async-signal-safe.

As a side-effect, a suspended thread won't be allowed to handle any
blockable signal but SIGRESM until it is resumed, which follows the
principle of least astonishment.

---

 include/copperplate/notifier.h   |7 +-
 include/mercury/boilerplate/signal.h |9 ++-
 lib/copperplate/notifier.c   |  133 --
 lib/copperplate/threadobj.c  |   28 ---
 4 files changed, 61 insertions(+), 116 deletions(-)

diff --git a/include/copperplate/notifier.h b/include/copperplate/notifier.h
index 61e2ec4..011accf 100644
--- a/include/copperplate/notifier.h
+++ b/include/copperplate/notifier.h
@@ -23,7 +23,6 @@
 
 struct notifier {
pid_t owner;
-   int waitfd[2];
struct pvholder link;
 };
 
@@ -33,11 +32,15 @@ extern C {
 
 int notifier_init(struct notifier *nf, pid_t pid);
 
+static inline void notifier_destroy(struct notifier *nf)
+{
+}
+
 void notifier_destroy(struct notifier *nf);
 
 void notifier_signal(struct notifier *nf);
 
-void notifier_wait(const struct notifier *nf);
+void notifier_wait(void);
 
 void notifier_disable(struct notifier *nf);
 
diff --git a/include/mercury/boilerplate/signal.h 
b/include/mercury/boilerplate/signal.h
index df131fa..914c02c 100644
--- a/include/mercury/boilerplate/signal.h
+++ b/include/mercury/boilerplate/signal.h
@@ -24,15 +24,16 @@
 #define sigev_notify_thread_id  _sigev_un._tid
 #endif
 
-#define SIGNOTIFY  (SIGRTMIN + 8) /* Internal notification */
-#define SIGRELS(SIGRTMIN + 9) /* Syscall abort */
-#define SIGRRB (SIGRTMIN + 10) /* Round-robin event */
+#define SIGSUSP(SIGRTMIN + 8)
+#define SIGRESM(SIGRTMIN + 9)
+#define SIGRELS(SIGRTMIN + 10) /* Syscall abort */
+#define SIGRRB (SIGRTMIN + 11) /* Round-robin event */
 
 #define SIGSAFE_LOCK_ENTRY(__safelock) \
do {\
sigset_t __safeset, __oldsafeset;   \
sigemptyset(__safeset);\
-   sigaddset(__safeset, SIGNOTIFY);   \
+   sigaddset(__safeset, SIGSUSP); \
pthread_sigmask(SIG_BLOCK, __safeset, __oldsafeset);  \
push_cleanup_lock(__safelock);  \
write_lock(__safelock);
diff --git a/lib/copperplate/notifier.c b/lib/copperplate/notifier.c
index 0e8c832..0f02059 100644
--- a/lib/copperplate/notifier.c
+++ b/lib/copperplate/notifier.c
@@ -18,140 +18,69 @@
 
 #include signal.h
 #include memory.h
-#include unistd.h
-#include fcntl.h
-#include assert.h
 #include errno.h
 #include copperplate/notifier.h
-#include boilerplate/lock.h
 #include boilerplate/signal.h
-#include copperplate/debug.h
 #include internal.h
 
-static DEFINE_PRIVATE_LIST(notifier_list);
-
-static pthread_mutex_t notifier_lock;
-
-static struct sigaction notifier_old_sa;
-
-static void notifier_sighandler(int sig, siginfo_t *siginfo, void *uc)
+static void suspend_sighandler(int sig)
 {
-   struct notifier *nf;
-   pid_t tid;
-
-   tid = copperplate_get_tid();
-
-   if (pvlist_empty(notifier_list))
-   goto ouch;
-
-   /* We may NOT alter the notifier list, but only scan it. */
-   pvlist_for_each_entry(nf, notifier_list, link) {
-   if (nf-owner == tid) {
-   notifier_wait(nf);
-   return;
-   }
-   }
-ouch:
-   panic(received spurious notification on thread[%d] 
- (sig=%d, code=%d, fd=%d),
- tid, sig, siginfo-si_code, siginfo-si_fd);
+   notifier_wait();
 }
 
-static void lock_notifier_list(sigset_t *oset)
+static void resume_sighandler(int sig)
 {
-   sigset_t set;
-
-   sigemptyset(set);
-   sigaddset(set, SIGNOTIFY);
-   pthread_sigmask(SIG_BLOCK, set, oset);
-   write_lock(notifier_lock);
-}
-
-static void unlock_notifier_list(sigset_t *oset)
-{
-   pthread_sigmask(SIG_SETMASK, oset, NULL);
-   write_unlock(notifier_lock);
+   /* nop */
 }
 
 int notifier_init(struct notifier *nf, pid_t pid)
 {
-   sigset_t oset;
-   int ret;
-
-   if (pipe(nf-waitfd)  0) {
-

[Xenomai-git] Philippe Gerum : copperplate/threadobj: drop useless check from round-robin handler

2014-05-08 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 8d4c1c4785310d6b06d0238b826df70b3db8c851
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=8d4c1c4785310d6b06d0238b826df70b3db8c851

Author: Philippe Gerum r...@xenomai.org
Date:   Thu May  8 15:13:46 2014 +0200

copperplate/threadobj: drop useless check from round-robin handler

Only threads currently undergoing the RR scheduling will receive
SIGRRB, so there is no point in re-checking this fact in the
handler. Besides, such test was racy, since thobj-status must be
accessed under lock.

---

 lib/copperplate/threadobj.c |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/copperplate/threadobj.c b/lib/copperplate/threadobj.c
index 8508444..7a7f970 100644
--- a/lib/copperplate/threadobj.c
+++ b/lib/copperplate/threadobj.c
@@ -396,15 +396,12 @@ static void unblock_sighandler(int sig)
 
 static void roundrobin_handler(int sig)
 {
-   struct threadobj *current = threadobj_current();
-
/*
 * We do manual round-robin over SCHED_FIFO(RT) to allow for
 * multiple arbitrary time slices (i.e. vs the kernel
 * pre-defined and fixed one).
 */
-   if (current  (current-status  __THREAD_S_RR) != 0)
-   sched_yield();
+   sched_yield();
 }
 
 static inline void pkg_init_corespec(void)


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git


[Xenomai-git] Philippe Gerum : copperplate/notifier: merge to threadobj building block

2014-05-08 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: 23b57bd8b3a0a9fbc25c8021b36e876d334e8b3e
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=23b57bd8b3a0a9fbc25c8021b36e876d334e8b3e

Author: Philippe Gerum r...@xenomai.org
Date:   Thu May  8 17:35:46 2014 +0200

copperplate/notifier: merge to threadobj building block

Now that the suspend/resume mechanism for Mercury is trivially simple,
just merge it where it belongs to, i.e. in the threadobj
implementation.

---

 include/copperplate/Makefile.am |1 -
 include/copperplate/Makefile.in |1 -
 include/copperplate/notifier.h  |   55 -
 include/copperplate/threadobj.h |2 -
 lib/copperplate/Makefile.am |1 -
 lib/copperplate/Makefile.in |   50 ---
 lib/copperplate/notifier.c  |  103 ---
 lib/copperplate/threadobj.c |   89 +
 8 files changed, 90 insertions(+), 212 deletions(-)

diff --git a/include/copperplate/Makefile.am b/include/copperplate/Makefile.am
index f721ff8..89b92ff 100644
--- a/include/copperplate/Makefile.am
+++ b/include/copperplate/Makefile.am
@@ -8,7 +8,6 @@ includesub_HEADERS =\
heapobj.h   \
init.h  \
semobj.h\
-   notifier.h  \
reference.h \
registry.h  \
syncobj.h   \
diff --git a/include/copperplate/Makefile.in b/include/copperplate/Makefile.in
index cc060cc..1db15f5 100644
--- a/include/copperplate/Makefile.in
+++ b/include/copperplate/Makefile.in
@@ -345,7 +345,6 @@ includesub_HEADERS = \
heapobj.h   \
init.h  \
semobj.h\
-   notifier.h  \
reference.h \
registry.h  \
syncobj.h   \
diff --git a/include/copperplate/notifier.h b/include/copperplate/notifier.h
deleted file mode 100644
index 011accf..000
--- a/include/copperplate/notifier.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2008 Philippe Gerum r...@xenomai.org.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
- */
-
-#ifndef _COPPERPLATE_NOTIFIER_H
-#define _COPPERPLATE_NOTIFIER_H
-
-#include boilerplate/list.h
-
-struct notifier {
-   pid_t owner;
-   struct pvholder link;
-};
-
-#ifdef __cplusplus
-extern C {
-#endif
-
-int notifier_init(struct notifier *nf, pid_t pid);
-
-static inline void notifier_destroy(struct notifier *nf)
-{
-}
-
-void notifier_destroy(struct notifier *nf);
-
-void notifier_signal(struct notifier *nf);
-
-void notifier_wait(void);
-
-void notifier_disable(struct notifier *nf);
-
-void notifier_release(struct notifier *nf);
-
-void notifier_pkg_init(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _COPPERPLATE_NOTIFIER_H */
diff --git a/include/copperplate/threadobj.h b/include/copperplate/threadobj.h
index 754de3d..fd87829 100644
--- a/include/copperplate/threadobj.h
+++ b/include/copperplate/threadobj.h
@@ -77,14 +77,12 @@ void threadobj_save_timeout(struct threadobj_corespec 
*corespec,
 #else  /* CONFIG_XENO_MERCURY */
 
 #include sys/time.h
-#include copperplate/notifier.h
 
 struct threadobj_corespec {
pthread_cond_t grant_sync;
int policy_unlocked;
int prio_unlocked;
timer_t rr_timer;
-   struct notifier notifier;
struct timespec wakeup;
ticks_t period;
/** Timeout reported by sysregd. */
diff --git a/lib/copperplate/Makefile.am b/lib/copperplate/Makefile.am
index 17ebeb4..2664e53 100644
--- a/lib/copperplate/Makefile.am
+++ b/lib/copperplate/Makefile.am
@@ -46,7 +46,6 @@ clean-local:
 libcopperplate_la_LIBADD = libversion.la
 
 if XENO_MERCURY
-libcopperplate_la_SOURCES += notifier.c
 libcopperplate_la_LIBADD += ../boilerplate/libboilerplate.la
 endif
 
diff --git a/lib/copperplate/Makefile.in b/lib/copperplate/Makefile.in
index a9b360e..0a948fe 100644
--- a/lib/copperplate/Makefile.in
+++ b/lib/copperplate/Makefile.in
@@ -79,17 +79,16 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-@XENO_MERCURY_TRUE@am__append_1 = notifier.c
-@XENO_MERCURY_TRUE@am__append_2 = ../boilerplate/libboilerplate.la

[Xenomai-git] Philippe Gerum : copperplate/notifier: merge to threadobj building block

2014-05-08 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: a36021cdf17298ef27830af5de651b0f92c6c663
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=a36021cdf17298ef27830af5de651b0f92c6c663

Author: Philippe Gerum r...@xenomai.org
Date:   Thu May  8 17:35:46 2014 +0200

copperplate/notifier: merge to threadobj building block

Now that the suspend/resume mechanism for Mercury is trivially simple,
just merge it into where it belongs to, i.e. in the threadobj
implementation.

---

 include/copperplate/Makefile.am |1 -
 include/copperplate/Makefile.in |1 -
 include/copperplate/notifier.h  |   55 -
 include/copperplate/threadobj.h |2 -
 lib/copperplate/Makefile.am |1 -
 lib/copperplate/Makefile.in |   50 ---
 lib/copperplate/notifier.c  |  103 ---
 lib/copperplate/threadobj.c |   89 +
 8 files changed, 90 insertions(+), 212 deletions(-)

diff --git a/include/copperplate/Makefile.am b/include/copperplate/Makefile.am
index f721ff8..89b92ff 100644
--- a/include/copperplate/Makefile.am
+++ b/include/copperplate/Makefile.am
@@ -8,7 +8,6 @@ includesub_HEADERS =\
heapobj.h   \
init.h  \
semobj.h\
-   notifier.h  \
reference.h \
registry.h  \
syncobj.h   \
diff --git a/include/copperplate/Makefile.in b/include/copperplate/Makefile.in
index cc060cc..1db15f5 100644
--- a/include/copperplate/Makefile.in
+++ b/include/copperplate/Makefile.in
@@ -345,7 +345,6 @@ includesub_HEADERS = \
heapobj.h   \
init.h  \
semobj.h\
-   notifier.h  \
reference.h \
registry.h  \
syncobj.h   \
diff --git a/include/copperplate/notifier.h b/include/copperplate/notifier.h
deleted file mode 100644
index 011accf..000
--- a/include/copperplate/notifier.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2008 Philippe Gerum r...@xenomai.org.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
- */
-
-#ifndef _COPPERPLATE_NOTIFIER_H
-#define _COPPERPLATE_NOTIFIER_H
-
-#include boilerplate/list.h
-
-struct notifier {
-   pid_t owner;
-   struct pvholder link;
-};
-
-#ifdef __cplusplus
-extern C {
-#endif
-
-int notifier_init(struct notifier *nf, pid_t pid);
-
-static inline void notifier_destroy(struct notifier *nf)
-{
-}
-
-void notifier_destroy(struct notifier *nf);
-
-void notifier_signal(struct notifier *nf);
-
-void notifier_wait(void);
-
-void notifier_disable(struct notifier *nf);
-
-void notifier_release(struct notifier *nf);
-
-void notifier_pkg_init(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _COPPERPLATE_NOTIFIER_H */
diff --git a/include/copperplate/threadobj.h b/include/copperplate/threadobj.h
index 754de3d..fd87829 100644
--- a/include/copperplate/threadobj.h
+++ b/include/copperplate/threadobj.h
@@ -77,14 +77,12 @@ void threadobj_save_timeout(struct threadobj_corespec 
*corespec,
 #else  /* CONFIG_XENO_MERCURY */
 
 #include sys/time.h
-#include copperplate/notifier.h
 
 struct threadobj_corespec {
pthread_cond_t grant_sync;
int policy_unlocked;
int prio_unlocked;
timer_t rr_timer;
-   struct notifier notifier;
struct timespec wakeup;
ticks_t period;
/** Timeout reported by sysregd. */
diff --git a/lib/copperplate/Makefile.am b/lib/copperplate/Makefile.am
index 17ebeb4..2664e53 100644
--- a/lib/copperplate/Makefile.am
+++ b/lib/copperplate/Makefile.am
@@ -46,7 +46,6 @@ clean-local:
 libcopperplate_la_LIBADD = libversion.la
 
 if XENO_MERCURY
-libcopperplate_la_SOURCES += notifier.c
 libcopperplate_la_LIBADD += ../boilerplate/libboilerplate.la
 endif
 
diff --git a/lib/copperplate/Makefile.in b/lib/copperplate/Makefile.in
index a9b360e..0a948fe 100644
--- a/lib/copperplate/Makefile.in
+++ b/lib/copperplate/Makefile.in
@@ -79,17 +79,16 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-@XENO_MERCURY_TRUE@am__append_1 = notifier.c
-@XENO_MERCURY_TRUE@am__append_2 = ../boilerplate/libboilerplate.la

[Xenomai-git] Philippe Gerum : copperplate/notifier: merge into threadobj building block

2014-05-08 Thread git repository hosting
Module: xenomai-forge
Branch: next
Commit: f88858da3758d4684ece1b267f8c1e9a16d8cc2e
URL:
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=f88858da3758d4684ece1b267f8c1e9a16d8cc2e

Author: Philippe Gerum r...@xenomai.org
Date:   Thu May  8 17:35:46 2014 +0200

copperplate/notifier: merge into threadobj building block

Now that the suspend/resume mechanism for Mercury is trivially simple,
just merge it into the threadobj implementation where it belongs to.

---

 include/copperplate/Makefile.am |1 -
 include/copperplate/Makefile.in |1 -
 include/copperplate/notifier.h  |   55 -
 include/copperplate/threadobj.h |2 -
 lib/copperplate/Makefile.am |1 -
 lib/copperplate/Makefile.in |   50 ---
 lib/copperplate/notifier.c  |  103 ---
 lib/copperplate/threadobj.c |   89 +
 8 files changed, 90 insertions(+), 212 deletions(-)

diff --git a/include/copperplate/Makefile.am b/include/copperplate/Makefile.am
index f721ff8..89b92ff 100644
--- a/include/copperplate/Makefile.am
+++ b/include/copperplate/Makefile.am
@@ -8,7 +8,6 @@ includesub_HEADERS =\
heapobj.h   \
init.h  \
semobj.h\
-   notifier.h  \
reference.h \
registry.h  \
syncobj.h   \
diff --git a/include/copperplate/Makefile.in b/include/copperplate/Makefile.in
index cc060cc..1db15f5 100644
--- a/include/copperplate/Makefile.in
+++ b/include/copperplate/Makefile.in
@@ -345,7 +345,6 @@ includesub_HEADERS = \
heapobj.h   \
init.h  \
semobj.h\
-   notifier.h  \
reference.h \
registry.h  \
syncobj.h   \
diff --git a/include/copperplate/notifier.h b/include/copperplate/notifier.h
deleted file mode 100644
index 011accf..000
--- a/include/copperplate/notifier.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2008 Philippe Gerum r...@xenomai.org.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
- */
-
-#ifndef _COPPERPLATE_NOTIFIER_H
-#define _COPPERPLATE_NOTIFIER_H
-
-#include boilerplate/list.h
-
-struct notifier {
-   pid_t owner;
-   struct pvholder link;
-};
-
-#ifdef __cplusplus
-extern C {
-#endif
-
-int notifier_init(struct notifier *nf, pid_t pid);
-
-static inline void notifier_destroy(struct notifier *nf)
-{
-}
-
-void notifier_destroy(struct notifier *nf);
-
-void notifier_signal(struct notifier *nf);
-
-void notifier_wait(void);
-
-void notifier_disable(struct notifier *nf);
-
-void notifier_release(struct notifier *nf);
-
-void notifier_pkg_init(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _COPPERPLATE_NOTIFIER_H */
diff --git a/include/copperplate/threadobj.h b/include/copperplate/threadobj.h
index 754de3d..fd87829 100644
--- a/include/copperplate/threadobj.h
+++ b/include/copperplate/threadobj.h
@@ -77,14 +77,12 @@ void threadobj_save_timeout(struct threadobj_corespec 
*corespec,
 #else  /* CONFIG_XENO_MERCURY */
 
 #include sys/time.h
-#include copperplate/notifier.h
 
 struct threadobj_corespec {
pthread_cond_t grant_sync;
int policy_unlocked;
int prio_unlocked;
timer_t rr_timer;
-   struct notifier notifier;
struct timespec wakeup;
ticks_t period;
/** Timeout reported by sysregd. */
diff --git a/lib/copperplate/Makefile.am b/lib/copperplate/Makefile.am
index 17ebeb4..2664e53 100644
--- a/lib/copperplate/Makefile.am
+++ b/lib/copperplate/Makefile.am
@@ -46,7 +46,6 @@ clean-local:
 libcopperplate_la_LIBADD = libversion.la
 
 if XENO_MERCURY
-libcopperplate_la_SOURCES += notifier.c
 libcopperplate_la_LIBADD += ../boilerplate/libboilerplate.la
 endif
 
diff --git a/lib/copperplate/Makefile.in b/lib/copperplate/Makefile.in
index a9b360e..0a948fe 100644
--- a/lib/copperplate/Makefile.in
+++ b/lib/copperplate/Makefile.in
@@ -79,17 +79,16 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-@XENO_MERCURY_TRUE@am__append_1 = notifier.c
-@XENO_MERCURY_TRUE@am__append_2 = ../boilerplate/libboilerplate.la

[Xenomai-git] Gilles Chanteperdrix : posix: fix 2.4 config file

2014-05-08 Thread git repository hosting
Module: xenomai-2.6
Branch: master
Commit: 2e728166c8fa568c22925cf9cb7b46afa4761e11
URL:
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=2e728166c8fa568c22925cf9cb7b46afa4761e11

Author: Gilles Chanteperdrix gilles.chanteperd...@xenomai.org
Date:   Thu May  8 20:11:36 2014 +0200

posix: fix 2.4 config file

---

 ksrc/skins/posix/Config.in |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ksrc/skins/posix/Config.in b/ksrc/skins/posix/Config.in
index a403265..470bdc7 100644
--- a/ksrc/skins/posix/Config.in
+++ b/ksrc/skins/posix/Config.in
@@ -12,9 +12,12 @@ if [ $CONFIG_XENO_SKIN_POSIX != n ]; then
else
define_int CONFIG_XENO_OPT_POSIX_PERIOD 0
fi
+   int 'Number of registry slots' CONFIG_XENO_OPT_POSIX_REGISTRY_NRSLOTS 64
+   int 'Number of file descriptors' CONFIG_XENO_OPT_POSIX_REGISTRY_NRDESCS 
128
+   int 'Number of timers' CONFIG_XENO_OPT_POSIX_NRTIMERS 128
bool 'Shared memory' CONFIG_XENO_OPT_POSIX_SHM
bool 'Interrupts' CONFIG_XENO_OPT_POSIX_INTR
-if [ $CONFIG_XENO_SKIN_POSIX != y -o $CONFIG_XENO_SKIN_RTDM != 
m ]; then
+   if [ $CONFIG_XENO_SKIN_POSIX != y -o $CONFIG_XENO_SKIN_RTDM != 
m ]; then
if [ $CONFIG_XENO_OPT_SELECT = n ]; then
comment Support for POSIX skin select needs nucleus 
support for select-like services
else
@@ -23,8 +26,8 @@ if [ $CONFIG_XENO_SKIN_POSIX != n ]; then
else
comment Note: Support for select is not available if the POSIX 
skin
comment is built-in and the RTDM skin is compiled as a module.
-   
-fi
+
+   fi
bool 'Debugging support' CONFIG_XENO_OPT_DEBUG_POSIX
endmenu
 fi


___
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git