All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: rpm@xenomai.org
Cc: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] Re: libnative versioning
Date: Tue, 05 Dec 2006 17:44:25 +0100	[thread overview]
Message-ID: <4575A1E9.80105@domain.hid> (raw)
In-Reply-To: <1164992204.4952.109.camel@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]

Philippe Gerum wrote:
> On Fri, 2006-12-01 at 16:39 +0100, Jan Kiszka wrote:
>> Hi,
>>
>> we just had some fun here with incompatible native libraries. A program
>> was built against some 2.2 release and was then started on a target with
>> 2.3 libs installed. The result: undefined symbol rt_mutex_lock. The
>> reason: this function was renamed to rt_mutex_acquire in trunk to
>> resolve a naming conflict in recent kernels.
>>
>> So we now have incompatible libraries and should either increment some
>> version number of libnative or export the necessary aliases for
>> lock/unlock. What is preferred?
> 
> The Xenomai ABI has been kept compatible between versions, so we want to
> provide the proper aliases for user-space; the conflict is kernel-space
> only, and there is no reason to ask user-space apps to conform to some
> obscure change that took place within the vanilla kernel API. Actually,
> I already wrappers in include/native/mutex.h, but unfortunately as
> macros, so dynamic binding could not work. I'm fixing this. Thanks.

And this fixes the fix (/wrt C++ users).

Jan

[-- Attachment #2: fix-mutex-c++.patch --]
[-- Type: text/plain, Size: 649 bytes --]

Index: include/native/mutex.h
===================================================================
--- include/native/mutex.h	(revision 1920)
+++ include/native/mutex.h	(working copy)
@@ -121,10 +121,6 @@ int rt_mutex_release(RT_MUTEX *mutex);
 int rt_mutex_inquire(RT_MUTEX *mutex,
 		     RT_MUTEX_INFO *info);
 
-#ifdef __cplusplus
-}
-#endif
-
 #ifdef __KERNEL__
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
 static inline int __deprecated_call__ rt_mutex_lock(RT_MUTEX *mutex, RTIME timeout)
@@ -146,4 +142,8 @@ int rt_mutex_unlock(RT_MUTEX *mutex);
 
 #endif /* __KERNEL__ */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* !_XENO_MUTEX_H */

  parent reply	other threads:[~2006-12-05 16:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-01 15:39 [Xenomai-core] libnative versioning Jan Kiszka
2006-12-01 16:56 ` Philippe Gerum
2006-12-01 17:44   ` Gilles Chanteperdrix
2006-12-01 18:00     ` Philippe Gerum
2006-12-04  8:46       ` Gilles Chanteperdrix
2006-12-05 16:44   ` Jan Kiszka [this message]
2006-12-06 17:08     ` [Xenomai-core] " Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4575A1E9.80105@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=rpm@xenomai.org \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.