Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

[patch] linux/preempt.h needs linux/thread_info.h

 
   Soft32 Home -> Linux -> Kernel RSS
Next:  problem with starting an application daemon from ..  
Author Message
Horms

External


Since: Nov 23, 2006
Posts: 38



(Msg. 1) Posted: Wed Dec 27, 2006 3:20 am
Post subject: [patch] linux/preempt.h needs linux/thread_info.h
Archived from groups: linux>kernel (more info?)

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.DeleteThis@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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.DeleteThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Al Viro

External


Since: Nov 09, 2006
Posts: 428



(Msg. 2) Posted: Wed Dec 27, 2006 3:30 am
Post subject: Re: [patch] linux/preempt.h needs linux/thread_info.h [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 RemoveThis @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...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo RemoveThis @vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Horms

External


Since: Nov 23, 2006
Posts: 38



(Msg. 3) Posted: Wed Dec 27, 2006 4:10 am
Post subject: Re: [patch] linux/preempt.h needs linux/thread_info.h [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.RemoveThis@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/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo.RemoveThis@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[PATCH 1/2] wrap access to thread_info - Recently a few direct accesses to the thread_info in the task structure snuck back, so this wraps them with the..

[PATCH 2/2] rename thread_info to stack - This finally renames the thread_info field in task structure to stack, so that the assumptions about this field are gon...

[PATCH] include linux/fs.h in linux/cdev.h for struct inode - --- include/linux/cdev.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/cdev.h...

[patch] pull in the linux/input.h header in linux/uinput.h - uinput.h relies on structures only found in input.h, so pull in the header Signed-off-by: Mike Frysinger..

[PATCH 1/4] linux/audit.h needs linux/types.h - Include linux/types.h here because we need a definition of __u32. This file appears not be exported verbatim by libc,....

[PATCH] Don't include linux/mtd/map.h from linux/mtd/physm.. - Replace the inclusion of linux/mtd/map.h with a forward-declaration of struct map_info. This allows linux/mtd/physmap.h...
       Soft32 Home -> Linux -> Kernel All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]