On Mon, 20 Nov 2006 14:27:20 +0000 David Howells wrote:
> Reclaim a word from the size of the work_struct by folding the pending bit and
> the wq_data pointer together. This shouldn't cause misalignment problems as
> all pointers should be at least 4-byte aligned.
>
> Signed-Off-By: David Howells <[email protected]>
> ---
>
> drivers/block/floppy.c | 4 ++--
> include/linux/workqueue.h | 19 +++++++++++++++----
> kernel/workqueue.c | 41 ++++++++++++++++++++++++++++++++---------
> 3 files changed, 49 insertions(+), 15 deletions(-)
>
> diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
> index 0d5bbd4..67e6a7f 100644
> --- a/include/linux/workqueue.h
> +++ b/include/linux/workqueue.h
> @@ -14,11 +14,15 @@ struct workqueue_struct;
> typedef void (*work_func_t)(void *data);
>
> struct work_struct {
> - unsigned long pending;
> + /* the first word is the work queue pointer and the pending flag
> + * rolled into one */
> + unsigned long management;
> +#define WORK_STRUCT_PENDING 0 /* T if work item pending execution */
Does 'T' mean true? I think Linus's comment applies here also.
> +#define WORK_STRUCT_FLAG_MASK (3UL)
> +#define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK)
> struct list_head entry;
> work_func_t func;
> void *data;
> - void *wq_data;
> };
>
> struct dwork_struct {
---
~Randy
-
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]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]