All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] POSIX headers and PTHREAD_IPROPAGATE
@ 2006-11-01 23:46 Jeff Webb
  2006-11-02  8:46 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Webb @ 2006-11-01 23:46 UTC (permalink / raw)
  To: Xenomai help

If I attempt to use PTHREAD_IPROPAGATE in my userspace POSIX skin Xenomai program, I get the following:

irqtest.c: In function ‘main’:
irqtest.c:278: error: ‘XN_ISR_PROPAGATE’ undeclared (first use in this function)irqtest.c:278: error: (Each undeclared identifier is reported only once
irqtest.c:278: error: for each function it appears in.)

Including <nucleus/intr.h> fixes the problem.  I assume there should be a #include in one of the POSIX header files.

-Jeff



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-help] POSIX headers and PTHREAD_IPROPAGATE
  2006-11-01 23:46 [Xenomai-help] POSIX headers and PTHREAD_IPROPAGATE Jeff Webb
@ 2006-11-02  8:46 ` Gilles Chanteperdrix
  2006-11-02  9:10   ` Philippe Gerum
  0 siblings, 1 reply; 3+ messages in thread
From: Gilles Chanteperdrix @ 2006-11-02  8:46 UTC (permalink / raw)
  To: Jeff Webb; +Cc: Xenomai help

Jeff Webb wrote:
> If I attempt to use PTHREAD_IPROPAGATE in my userspace POSIX skin 
> Xenomai program, I get the following:
> 
> irqtest.c: In function ‘main’:
> irqtest.c:278: error: ‘XN_ISR_PROPAGATE’ undeclared (first use in this 
> function)irqtest.c:278: error: (Each undeclared identifier is reported 
> only once
> irqtest.c:278: error: for each function it appears in.)
> 
> Including <nucleus/intr.h> fixes the problem.  I assume there should be 
> a #include in one of the POSIX header files.

I checked the trunk and the v2.2.x branch, and pthread.h includes
nucleus/xenomai.h which includes nucleus/intr.h, so including directly
nucleus/intr.h should not be necessary.

-- 
                                                  Gilles Chanteperdrix


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-help] POSIX headers and PTHREAD_IPROPAGATE
  2006-11-02  8:46 ` Gilles Chanteperdrix
@ 2006-11-02  9:10   ` Philippe Gerum
  0 siblings, 0 replies; 3+ messages in thread
From: Philippe Gerum @ 2006-11-02  9:10 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Xenomai help

On Thu, 2006-11-02 at 09:46 +0100, Gilles Chanteperdrix wrote:
> Jeff Webb wrote:
> > If I attempt to use PTHREAD_IPROPAGATE in my userspace POSIX skin 
> > Xenomai program, I get the following:
> > 
> > irqtest.c: In function ‘main’:
> > irqtest.c:278: error: ‘XN_ISR_PROPAGATE’ undeclared (first use in this 
> > function)irqtest.c:278: error: (Each undeclared identifier is reported 
> > only once
> > irqtest.c:278: error: for each function it appears in.)
> > 
> > Including <nucleus/intr.h> fixes the problem.  I assume there should be 
> > a #include in one of the POSIX header files.
> 
> I checked the trunk and the v2.2.x branch, and pthread.h includes
> nucleus/xenomai.h which includes nucleus/intr.h, so including directly
> nucleus/intr.h should not be necessary.
> 

The main header is not included in the user-space case. The patch below
should fix this:

--- include/posix/pthread.h	(revision 1786)
+++ include/posix/pthread.h	(working copy)
@@ -147,10 +147,11 @@
 #include <sched.h>
 #include_next <pthread.h>
 #include <nucleus/thread.h>
+#include <nucleus/intr.h>
 
 struct timespec;
 
-#endif /* !(__KERNEL__ || __XENO_SIM__) */
+#endif /* __KERNEL__ || __XENO_SIM__ */
 
 #define PTHREAD_PRIO_NONE    0
 #define PTHREAD_PRIO_INHERIT 1
@@ -497,6 +498,6 @@
 }
 #endif
 
-#endif /* !(__KERNEL__ || __XENO_SIM__) */
+#endif /* __KERNEL__ || __XENO_SIM__ */
 
 #endif /* _XENO_POSIX_PTHREAD_H */


-- 
Philippe.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-11-02  9:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-01 23:46 [Xenomai-help] POSIX headers and PTHREAD_IPROPAGATE Jeff Webb
2006-11-02  8:46 ` Gilles Chanteperdrix
2006-11-02  9:10   ` Philippe Gerum

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.