Re: [PATCH] kthread: Implement park/unpark facility

From: H. Peter Anvin
Date: Wed Jun 06 2012 - 20:05:22 EST


On 06/05/2012 07:05 AM, Peter Zijlstra wrote:
> On Tue, 2012-06-05 at 15:41 +0200, Thomas Gleixner wrote:
>> struct kthread {
>> - int should_stop;
>> + bool should_stop;
>> + bool should_park;
>> + bool is_parked;
>> + bool is_percpu;
>
> bool doesn't have a well specified storage type. I typically try to
> avoid using it in structures for this reason. Others might not care
> though.
>

On all known Linux platforms, bool is implemented as a single byte
having a value of either 0 or 1. However, it might make more sense to
have a flags field here...

-hpa

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