All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] rtdm_lock_init does not compile with ppc-ipipe-patch 2.0.1
@ 2009-07-15 13:00 roderik.wildenburg
  2009-07-15 13:16 ` Philippe Gerum
  2009-07-15 13:36 ` Wolfgang Grandegger
  0 siblings, 2 replies; 8+ messages in thread
From: roderik.wildenburg @ 2009-07-15 13:00 UTC (permalink / raw)
  To: xenomai

When I try to compile RTnet (for PPC, Xenomai 2.4.8, Ipipe 2.0.1, Kernel
2.4.25) I get the following error message :

In file included from rtdev.c:33:
../stack/include/rtskb.h: In function `rtskb_queue_init':
../stack/include/rtskb.h:289: error: parse error before '{' token
../stack/include/rtskb.h: At top level:
../stack/include/rtskb.h:290: error: parse error before '->' token
../stack/include/rtskb.h: In function `rtskb_prio_queue_init':
../stack/include/rtskb.h:301: error: parse error before '{' token
rtdev.c: In function `rtdev_alloc':
rtdev.c:243: error: parse error before '{' token

I followed the error through a whole bunch of macros and this is what I
figured out:

1) Startpoint of the error is rtdm_lock_init(&queue->lock) which is used
in RTnet (rtskb.h)
2) rtdm_lock_init() is defined in rtdm_driver.h :
   #define rtdm_lock_init(lock) rthal_spin_lock_init(lock)
3) rthal_spin_lock_init(lock) is defined in hal.h :   
   #define rthal_spin_lock_init(lock) *(lock) = IPIPE_SPIN_LOCK_UNLOCKED
   !!(as spin_lock_hw is not defined any more in the 2.0.1 patch !)!! 
4) IPIPE_SPIN_LOCK_UNLOCKED is defined in spinlock.h (patched by the
Ipipe-patch) :
   #define IPIPE_SPIN_LOCK_UNLOCKED { .__lock = SPIN_LOCK_UNLOCKED }
5) SPIN_LOCK_UNLOCKED is defined in spinlock.h :
   #define SPIN_LOCK_UNLOCKED (spinlock_t) { }

so, if I expanded the whole thing correctly I get :
rtdm_lock_init(&queue->lock) ->  
rthal_spin_lock_init(&queue->lock) -> *(&queue->lock) =
IPIPE_SPIN_LOCK_UNLOCKED ->
*(&queue->lock) = { .__lock = SPIN_LOCK_UNLOCKED } ->

*(&queue->lock) = { .__lock = (spinlock_t) { } }
===================================================


Unfortunately my preprocessor knowledge is too poor to decode this line
of code, but I think this is not what is intented by the inventor for
the macro expansion.
Could somebody help me to understand what is going on here or, even
better, correct the Ipipe 2.0.1 patch?

Thank you in advance
Roderik

--------------------------------------------------------
manroland AG
Vorsitzender des Aufsichtsrates: Hanno C. Fiedler
Vorstand: Gerd Finkbeiner (Vorsitzender), Dr. Ingo Koch, Dr. Markus Rall, Paul Steidle   
Sitz der Gesellschaft: Offenbach am Main, Registergericht: Amtsgericht Offenbach HRB-Nr. 42592
USt-Ident-Nr. DE 250200933


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

end of thread, other threads:[~2009-07-17  8:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15 13:00 [Xenomai-help] rtdm_lock_init does not compile with ppc-ipipe-patch 2.0.1 roderik.wildenburg
2009-07-15 13:16 ` Philippe Gerum
2009-07-16 16:22   ` Philippe Gerum
2009-07-17  8:30     ` roderik.wildenburg
2009-07-15 13:36 ` Wolfgang Grandegger
2009-07-15 13:44   ` Wolfgang Grandegger
2009-07-16  5:44     ` roderik.wildenburg
2009-07-16  6:58       ` Wolfgang Grandegger

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.