Re: [PATCH 2/2] workqueue: debug work related deadlocks with lockdep

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

 



On 07/05, Johannes Berg wrote:
>
> +#define __WORK_INIT_LOCKDEP_MAP(n, k) \
> +	.lockdep_map = STATIC_LOCKDEP_MAP_INIT(n, k),
> +#else
> +#define __WORK_INIT_LOCKDEP_MAP(n, k)
> +#endif
> +
>  #define __WORK_INITIALIZER(n, f) {				\
>  	.data = WORK_DATA_INIT(),				\
>  	.entry	= { &(n).entry, &(n).entry },			\
>  	.func = (f),						\
> +	__WORK_INIT_LOCKDEP_MAP(#n, &(n))			\

[...snip...]

> +#define STATIC_LOCKDEP_MAP_INIT(_name, _key) \
> +	{ .name = (_name), .key = (void *)(_key), }

Hmm... Can't understand, please help!

So, __WORK_INITIALIZER() uses work_struct itself as a "struct lock_class_key" ?
How so?

Oleg.

-
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]
  Powered by Linux