* [ltt-dev] [PATCH] Lib urcu commit 453629a9317adef5b96c3d55e4dcd98db680997a moved container_of definition to urcu/compiler.h Since, multiple warnings about redefinition of container_of appears.
@ 2010-08-16 1:01 David Goulet
2010-08-16 4:24 ` Mathieu Desnoyers
0 siblings, 1 reply; 4+ messages in thread
From: David Goulet @ 2010-08-16 1:01 UTC (permalink / raw)
Removed macro definition from ust core header and kcompat.
Now using lib urcu macro definition which is the same.
Signed-off-by: David Goulet <david.goulet at polymtl.ca>
---
include/ust/core.h | 4 ----
include/ust/kcompat/simple.h | 12 ------------
2 files changed, 0 insertions(+), 16 deletions(-)
diff --git a/include/ust/core.h b/include/ust/core.h
index 0172614..b538e81 100644
--- a/include/ust/core.h
+++ b/include/ust/core.h
@@ -141,8 +141,4 @@ static __inline__ int get_count_order(unsigned int count)
return order;
}
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
-
#endif /* UST_CORE_H */
diff --git a/include/ust/kcompat/simple.h b/include/ust/kcompat/simple.h
index 762d802..38a9be5 100644
--- a/include/ust/kcompat/simple.h
+++ b/include/ust/kcompat/simple.h
@@ -21,18 +21,6 @@
#ifndef KCOMPAT_SIMPLE_H
#define KCOMPAT_SIMPLE_H
-/**
- * container_of - cast a member of a structure out to the containing structure
- * @ptr: the pointer to the member.
- * @type: the type of the container struct this is embedded in.
- * @member: the name of the member within the struct.
- *
- */
-#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (ptr); \
- (type *)( (char *)__mptr - offsetof(type,member) );})
-
-
/* libkcompat: from rcupdate.h */
struct rcu_head {
--
1.7.0.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ltt-dev] [PATCH] Lib urcu commit 453629a9317adef5b96c3d55e4dcd98db680997a moved container_of definition to urcu/compiler.h Since, multiple warnings about redefinition of container_of appears.
2010-08-16 1:01 [ltt-dev] [PATCH] Lib urcu commit 453629a9317adef5b96c3d55e4dcd98db680997a moved container_of definition to urcu/compiler.h Since, multiple warnings about redefinition of container_of appears David Goulet
@ 2010-08-16 4:24 ` Mathieu Desnoyers
2010-08-16 12:52 ` David Goulet
0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Desnoyers @ 2010-08-16 4:24 UTC (permalink / raw)
* David Goulet (david.goulet at polymtl.ca) wrote:
> Removed macro definition from ust core header and kcompat.
> Now using lib urcu macro definition which is the same.
Hrm, there is a dependency on the latest unreleased urcu git head.
To make the transition easier, please wrap it into a
#ifndef container_of
...
#endif
instead of removing it from ust.
Thanks,
Mathieu
>
> Signed-off-by: David Goulet <david.goulet at polymtl.ca>
> ---
> include/ust/core.h | 4 ----
> include/ust/kcompat/simple.h | 12 ------------
> 2 files changed, 0 insertions(+), 16 deletions(-)
>
> diff --git a/include/ust/core.h b/include/ust/core.h
> index 0172614..b538e81 100644
> --- a/include/ust/core.h
> +++ b/include/ust/core.h
> @@ -141,8 +141,4 @@ static __inline__ int get_count_order(unsigned int count)
> return order;
> }
>
> -#define container_of(ptr, type, member) ({ \
> - const typeof( ((type *)0)->member ) *__mptr = (ptr); \
> - (type *)( (char *)__mptr - offsetof(type,member) );})
> -
> #endif /* UST_CORE_H */
> diff --git a/include/ust/kcompat/simple.h b/include/ust/kcompat/simple.h
> index 762d802..38a9be5 100644
> --- a/include/ust/kcompat/simple.h
> +++ b/include/ust/kcompat/simple.h
> @@ -21,18 +21,6 @@
> #ifndef KCOMPAT_SIMPLE_H
> #define KCOMPAT_SIMPLE_H
>
> -/**
> - * container_of - cast a member of a structure out to the containing structure
> - * @ptr: the pointer to the member.
> - * @type: the type of the container struct this is embedded in.
> - * @member: the name of the member within the struct.
> - *
> - */
> -#define container_of(ptr, type, member) ({ \
> - const typeof( ((type *)0)->member ) *__mptr = (ptr); \
> - (type *)( (char *)__mptr - offsetof(type,member) );})
> -
> -
> /* libkcompat: from rcupdate.h */
>
> struct rcu_head {
> --
> 1.7.0.4
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ltt-dev] [PATCH] Lib urcu commit 453629a9317adef5b96c3d55e4dcd98db680997a moved container_of definition to urcu/compiler.h Since, multiple warnings about redefinition of container_of appears.
2010-08-16 4:24 ` Mathieu Desnoyers
@ 2010-08-16 12:52 ` David Goulet
2010-08-16 13:55 ` Mathieu Desnoyers
0 siblings, 1 reply; 4+ messages in thread
From: David Goulet @ 2010-08-16 12:52 UTC (permalink / raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10-08-16 12:24 AM, Mathieu Desnoyers wrote:
> * David Goulet (david.goulet at polymtl.ca) wrote:
>> Removed macro definition from ust core header and kcompat.
>> Now using lib urcu macro definition which is the same.
>
> Hrm, there is a dependency on the latest unreleased urcu git head.
>
> To make the transition easier, please wrap it into a
>
> #ifndef container_of
> ...
> #endif
>
> instead of removing it from ust.
Right. Quite "smoother" that way!
Should we wait until the next urcu release ?
David
>
> Thanks,
>
> Mathieu
>
>>
>> Signed-off-by: David Goulet <david.goulet at polymtl.ca>
>> ---
>> include/ust/core.h | 4 ----
>> include/ust/kcompat/simple.h | 12 ------------
>> 2 files changed, 0 insertions(+), 16 deletions(-)
>>
>> diff --git a/include/ust/core.h b/include/ust/core.h
>> index 0172614..b538e81 100644
>> --- a/include/ust/core.h
>> +++ b/include/ust/core.h
>> @@ -141,8 +141,4 @@ static __inline__ int get_count_order(unsigned int count)
>> return order;
>> }
>>
>> -#define container_of(ptr, type, member) ({ \
>> - const typeof( ((type *)0)->member ) *__mptr = (ptr); \
>> - (type *)( (char *)__mptr - offsetof(type,member) );})
>> -
>> #endif /* UST_CORE_H */
>> diff --git a/include/ust/kcompat/simple.h b/include/ust/kcompat/simple.h
>> index 762d802..38a9be5 100644
>> --- a/include/ust/kcompat/simple.h
>> +++ b/include/ust/kcompat/simple.h
>> @@ -21,18 +21,6 @@
>> #ifndef KCOMPAT_SIMPLE_H
>> #define KCOMPAT_SIMPLE_H
>>
>> -/**
>> - * container_of - cast a member of a structure out to the containing structure
>> - * @ptr: the pointer to the member.
>> - * @type: the type of the container struct this is embedded in.
>> - * @member: the name of the member within the struct.
>> - *
>> - */
>> -#define container_of(ptr, type, member) ({ \
>> - const typeof( ((type *)0)->member ) *__mptr = (ptr); \
>> - (type *)( (char *)__mptr - offsetof(type,member) );})
>> -
>> -
>> /* libkcompat: from rcupdate.h */
>>
>> struct rcu_head {
>> --
>> 1.7.0.4
>>
>
- --
David Goulet
LTTng project, DORSAL Lab.
1024D/16BD8563
BE3C 672B 9331 9796 291A 14C6 4AF7 C14B 16BD 8563
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkxpNHgACgkQSvfBSxa9hWP1QQCgoo8nkCcqKjri6V8c4QVcGhsR
YcEAn1YVUJWGF8MSU8h+G8h5Vmopcj24
=RkHi
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ltt-dev] [PATCH] Lib urcu commit 453629a9317adef5b96c3d55e4dcd98db680997a moved container_of definition to urcu/compiler.h Since, multiple warnings about redefinition of container_of appears.
2010-08-16 12:52 ` David Goulet
@ 2010-08-16 13:55 ` Mathieu Desnoyers
0 siblings, 0 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2010-08-16 13:55 UTC (permalink / raw)
* David Goulet (david.goulet at polymtl.ca) wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
>
> On 10-08-16 12:24 AM, Mathieu Desnoyers wrote:
> > * David Goulet (david.goulet at polymtl.ca) wrote:
> >> Removed macro definition from ust core header and kcompat.
> >> Now using lib urcu macro definition which is the same.
> >
> > Hrm, there is a dependency on the latest unreleased urcu git head.
> >
> > To make the transition easier, please wrap it into a
> >
> > #ifndef container_of
> > ...
> > #endif
> >
> > instead of removing it from ust.
>
> Right. Quite "smoother" that way!
>
> Should we wait until the next urcu release ?
No, please repost with ifdefs as soon as you can, so there won't be any warning
between the newer urcu and ust.
Thanks,
Mathieu
>
> David
>
> >
> > Thanks,
> >
> > Mathieu
> >
> >>
> >> Signed-off-by: David Goulet <david.goulet at polymtl.ca>
> >> ---
> >> include/ust/core.h | 4 ----
> >> include/ust/kcompat/simple.h | 12 ------------
> >> 2 files changed, 0 insertions(+), 16 deletions(-)
> >>
> >> diff --git a/include/ust/core.h b/include/ust/core.h
> >> index 0172614..b538e81 100644
> >> --- a/include/ust/core.h
> >> +++ b/include/ust/core.h
> >> @@ -141,8 +141,4 @@ static __inline__ int get_count_order(unsigned int count)
> >> return order;
> >> }
> >>
> >> -#define container_of(ptr, type, member) ({ \
> >> - const typeof( ((type *)0)->member ) *__mptr = (ptr); \
> >> - (type *)( (char *)__mptr - offsetof(type,member) );})
> >> -
> >> #endif /* UST_CORE_H */
> >> diff --git a/include/ust/kcompat/simple.h b/include/ust/kcompat/simple.h
> >> index 762d802..38a9be5 100644
> >> --- a/include/ust/kcompat/simple.h
> >> +++ b/include/ust/kcompat/simple.h
> >> @@ -21,18 +21,6 @@
> >> #ifndef KCOMPAT_SIMPLE_H
> >> #define KCOMPAT_SIMPLE_H
> >>
> >> -/**
> >> - * container_of - cast a member of a structure out to the containing structure
> >> - * @ptr: the pointer to the member.
> >> - * @type: the type of the container struct this is embedded in.
> >> - * @member: the name of the member within the struct.
> >> - *
> >> - */
> >> -#define container_of(ptr, type, member) ({ \
> >> - const typeof( ((type *)0)->member ) *__mptr = (ptr); \
> >> - (type *)( (char *)__mptr - offsetof(type,member) );})
> >> -
> >> -
> >> /* libkcompat: from rcupdate.h */
> >>
> >> struct rcu_head {
> >> --
> >> 1.7.0.4
> >>
> >
>
> - --
> David Goulet
> LTTng project, DORSAL Lab.
>
> 1024D/16BD8563
> BE3C 672B 9331 9796 291A 14C6 4AF7 C14B 16BD 8563
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkxpNHgACgkQSvfBSxa9hWP1QQCgoo8nkCcqKjri6V8c4QVcGhsR
> YcEAn1YVUJWGF8MSU8h+G8h5Vmopcj24
> =RkHi
> -----END PGP SIGNATURE-----
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-16 13:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-16 1:01 [ltt-dev] [PATCH] Lib urcu commit 453629a9317adef5b96c3d55e4dcd98db680997a moved container_of definition to urcu/compiler.h Since, multiple warnings about redefinition of container_of appears David Goulet
2010-08-16 4:24 ` Mathieu Desnoyers
2010-08-16 12:52 ` David Goulet
2010-08-16 13:55 ` Mathieu Desnoyers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox