Re: [PATCH] fix TASK_STOPPED vs TASK_NONINTERACTIVE interaction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 29 Sep 2005, Roland McGrath wrote:
>
> I am dubious about this change.  I don't see a corresponding change to
> fs/proc/array.c where it knows what all the bit values are.

You're right. Not only that, but "TASK_NONINTERACTIVE" is special in that 
it's an _additional_ flag to the task state, not an independent flag at 
all.

Ie it's _really_ only valid as a bitmask.

So I think we're better off reverting that ordering change, and testing 
the bitmap properly.

> Any tests using < TASK_STOPPED or the like are left over from the time when
> the TASK_ZOMBIE and TASK_DEAD bits were in the same word, and it served to
> check for "stopped or dead".

Correct again.

Btw, that brings up another thing: those EXIT_ZOMBIE/EXIT_DEAD flags are 
really really confusing. 

It's two different words, but the way we use them in get_task_state(), 
they are or'ed together, which is why they need to have non-overlapping 
bit definitions. But there's no comment about that anywhere.

I'll add a comment to <linux/sched.h> about it.

Thanks,

		Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux