Re: [PATCH 10/19] workqueue: update cwq alignement and make one more flag bit available

From: David Howells
Date: Thu Oct 01 2009 - 09:08:49 EST


Tejun Heo <tj@xxxxxxxxxx> wrote:

> +enum {
> + WORK_STRUCT_PENDING = 0, /* work item is pending execution */
> +
> + /*
> + * Reserve 3bits off of cwq pointer. This is enough and
> + * provides acceptable alignment on both 32 and 64bit
> + * machines.
> + */
> + WORK_STRUCT_FLAG_BITS = 3,
> +
> + WORK_STRUCT_FLAG_MASK = (1UL << WORK_STRUCT_FLAG_BITS) - 1,
> + WORK_STRUCT_WQ_DATA_MASK = ~WORK_STRUCT_FLAG_MASK,
> +};

There's some great enum abuse going on here:-)

David
--
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/