Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcd497f9 authored by Jesper Juhl's avatar Jesper Juhl Committed by Linus Torvalds
Browse files

[PATCH] streamline preempt_count type across archs



The preempt_count member of struct thread_info is currently either defined
as int, unsigned int or __s32 depending on arch.  This patch makes the type
of preempt_count an int on all archs.

Having preempt_count be an unsigned type prevents the catching of
preempt_count < 0 bugs, and using int on some archs and __s32 on others is
not exactely "neat" - much nicer when it's just int all over.

A previous version of this patch was already ACK'ed by Robert Love, and the
only change in this version of the patch compared to the one he ACK'ed is
that this one also makes sure the preempt_count member is consistently
commented.

Signed-off-by: default avatarJesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 35a82d1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ struct cpu_context_save {
 */
struct thread_info {
	unsigned long		flags;		/* low level flags */
	__s32			preempt_count;	/* 0 => preemptable, <0 => bug */
	int			preempt_count;	/* 0 => preemptable, <0 => bug */
	mm_segment_t		addr_limit;	/* address limit */
	struct task_struct	*task;		/* main task structure */
	struct exec_domain	*exec_domain;	/* execution domain */
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ struct cpu_context_save {
 */
struct thread_info {
	unsigned long		flags;		/* low level flags */
	__s32			preempt_count;	/* 0 => preemptable, <0 => bug */
	int			preempt_count;	/* 0 => preemptable, <0 => bug */
	mm_segment_t		addr_limit;	/* address limit */
	struct task_struct	*task;		/* main task structure */
	struct exec_domain      *exec_domain;   /* execution domain */
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ struct thread_info {
	struct exec_domain	*exec_domain;	/* execution domain */
	unsigned long		flags;		/* low level flags */
	__u32			cpu;		/* current CPU */
	__s32			preempt_count; /* 0 => preemptable, <0 => BUG */
	int			preempt_count;	/* 0 => preemptable, <0 => BUG */

	mm_segment_t		addr_limit;	/* thread address space:
					 	   0-0xBFFFFFFF for user-thead
+1 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ struct thread_info {
	unsigned long		flags;		/* low level flags */
	unsigned long		status;		/* thread-synchronous flags */
	__u32			cpu;		/* current CPU */
	__s32			preempt_count;	/* 0 => preemptable, <0 => BUG */
	int			preempt_count;	/* 0 => preemptable, <0 => BUG */

	mm_segment_t		addr_limit;	/* thread address space:
					 	   0-0xBFFFFFFF for user-thead
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ struct thread_info {
	unsigned long		flags;		/* low level flags */
	unsigned long		status;		/* thread-synchronous flags */
	__u32			cpu;		/* current CPU */
	__s32			preempt_count; /* 0 => preemptable, <0 => BUG */
	int			preempt_count;	/* 0 => preemptable, <0 => BUG */


	mm_segment_t		addr_limit;	/* thread address space:
Loading