All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] linux/preempt.h needs linux/thread_info.h
@ 2006-12-27  8:17 Horms
  2006-12-27  8:27 ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Horms @ 2006-12-27  8:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial

It seems that linux/preempt.h needs to include linux/thread_info.h
in order to access current_thread_info(), which is used in
preempt_count().

I guess that all callers of preempt_count() must include
both linux/thread_info.h and linux/preempt.h directly or indirectly,
as this does not cause a compile error. I noticed the problem while
working on an unrelated issue in xen-land.

Signed-off-by: Simon Horman <horms@verge.net.au>

Index: linux-2.6/include/linux/preempt.h
===================================================================
--- linux-2.6.orig/include/linux/preempt.h	2006-12-27 16:58:46.000000000 +0900
+++ linux-2.6/include/linux/preempt.h	2006-12-27 17:13:12.000000000 +0900
@@ -8,6 +8,7 @@
 
 #include <linux/thread_info.h>
 #include <linux/linkage.h>
+#include <linux/thread_info.h>
 
 #ifdef CONFIG_DEBUG_PREEMPT
   extern void fastcall add_preempt_count(int val);

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

* Re: [patch] linux/preempt.h needs linux/thread_info.h
  2006-12-27  8:17 [patch] linux/preempt.h needs linux/thread_info.h Horms
@ 2006-12-27  8:27 ` Al Viro
  2006-12-27  9:07   ` Horms
  0 siblings, 1 reply; 3+ messages in thread
From: Al Viro @ 2006-12-27  8:27 UTC (permalink / raw)
  To: Horms; +Cc: linux-kernel, trivial

On Wed, Dec 27, 2006 at 05:17:02PM +0900, Horms wrote:
> It seems that linux/preempt.h needs to include linux/thread_info.h
> in order to access current_thread_info(), which is used in
> preempt_count().
> 
> I guess that all callers of preempt_count() must include
> both linux/thread_info.h and linux/preempt.h directly or indirectly,
> as this does not cause a compile error. I noticed the problem while
> working on an unrelated issue in xen-land.
> 
> Signed-off-by: Simon Horman <horms@verge.net.au>
> 
> Index: linux-2.6/include/linux/preempt.h
> ===================================================================
> --- linux-2.6.orig/include/linux/preempt.h	2006-12-27 16:58:46.000000000 +0900
> +++ linux-2.6/include/linux/preempt.h	2006-12-27 17:13:12.000000000 +0900
> @@ -8,6 +8,7 @@
>  
>  #include <linux/thread_info.h>
>  #include <linux/linkage.h>
> +#include <linux/thread_info.h>

Huh?  It's just been included two lines above...

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

* Re: [patch] linux/preempt.h needs linux/thread_info.h
  2006-12-27  8:27 ` Al Viro
@ 2006-12-27  9:07   ` Horms
  0 siblings, 0 replies; 3+ messages in thread
From: Horms @ 2006-12-27  9:07 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-kernel, trivial

On Wed, Dec 27, 2006 at 08:27:02AM +0000, Al Viro wrote:
> On Wed, Dec 27, 2006 at 05:17:02PM +0900, Horms wrote:
> > It seems that linux/preempt.h needs to include linux/thread_info.h
> > in order to access current_thread_info(), which is used in
> > preempt_count().
> > 
> > I guess that all callers of preempt_count() must include
> > both linux/thread_info.h and linux/preempt.h directly or indirectly,
> > as this does not cause a compile error. I noticed the problem while
> > working on an unrelated issue in xen-land.
> > 
> > Signed-off-by: Simon Horman <horms@verge.net.au>
> > 
> > Index: linux-2.6/include/linux/preempt.h
> > ===================================================================
> > --- linux-2.6.orig/include/linux/preempt.h	2006-12-27 16:58:46.000000000 +0900
> > +++ linux-2.6/include/linux/preempt.h	2006-12-27 17:13:12.000000000 +0900
> > @@ -8,6 +8,7 @@
> >  
> >  #include <linux/thread_info.h>
> >  #include <linux/linkage.h>
> > +#include <linux/thread_info.h>
> 
> Huh?  It's just been included two lines above...

Sorry about that. I mucked around with this for a while
and ended up missing the obvious when doing the forward-port.

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/


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

end of thread, other threads:[~2006-12-27  9:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-27  8:17 [patch] linux/preempt.h needs linux/thread_info.h Horms
2006-12-27  8:27 ` Al Viro
2006-12-27  9:07   ` Horms

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.