remarkable-linux/include
David Howells 65f27f3844 WorkStruct: Pass the work_struct pointer instead of context data
Pass the work_struct pointer to the work function rather than context data.
The work function can use container_of() to work out the data.

For the cases where the container of the work_struct may go away the moment the
pending bit is cleared, it is made possible to defer the release of the
structure by deferring the clearing of the pending bit.

To make this work, an extra flag is introduced into the management side of the
work_struct.  This governs auto-release of the structure upon execution.

Ordinarily, the work queue executor would release the work_struct for further
scheduling or deallocation by clearing the pending bit prior to jumping to the
work function.  This means that, unless the driver makes some guarantee itself
that the work_struct won't go away, the work function may not access anything
else in the work_struct or its container lest they be deallocated..  This is a
problem if the auxiliary data is taken away (as done by the last patch).

However, if the pending bit is *not* cleared before jumping to the work
function, then the work function *may* access the work_struct and its container
with no problems.  But then the work function must itself release the
work_struct by calling work_release().

In most cases, automatic release is fine, so this is the default.  Special
initiators exist for the non-auto-release case (ending in _NAR).


Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:55:48 +00:00
..
acpi ACPI: Processor native C-states using MWAIT 2006-10-14 00:35:39 -04:00
asm-alpha [PATCH] Consolidate check_signature 2006-10-11 11:14:23 -07:00
asm-arm [ARM] 3919/1: Fixed definition of some PXA270 CIF related registers 2006-11-03 19:52:52 +00:00
asm-arm26 fix file specification in comments 2006-10-03 23:01:26 +02:00
asm-avr32 AVR32: Wire up sys_epoll_pwait 2006-11-06 14:07:15 +01:00
asm-cris [PATCH] remove remaining errno and __KERNEL_SYSCALLS__ references 2006-10-02 07:57:23 -07:00
asm-frv [PATCH] FRV: Use the correct preemption primitives in kmap_atomic() and co 2006-10-16 08:32:29 -07:00
asm-generic Add "pure_initcall" for static variable initialization 2006-11-20 11:47:18 -08:00
asm-h8300 [PATCH] remove remaining errno and __KERNEL_SYSCALLS__ references 2006-10-02 07:57:23 -07:00
asm-i386 [PATCH] x86: Add acpi_user_timer_override option for Asus boards 2006-11-14 16:57:46 +01:00
asm-ia64 [PATCH] mspec driver build fix 2006-11-13 07:40:42 -08:00
asm-m32r [PATCH] Consolidate check_signature 2006-10-11 11:14:23 -07:00
asm-m68k [PATCH] sun3_ioremap() prototype 2006-10-15 11:00:58 -07:00
asm-m68knommu [PATCH] m68knommu: fix up for the irq_handler_t changes 2006-11-20 10:16:49 -08:00
asm-mips [MIPS] Make irq number allocator generally available for fixing EV64120. 2006-11-06 20:55:38 +00:00
asm-parisc [PARISC] pdc_init no longer exists 2006-10-07 05:22:30 -06:00
asm-powerpc [POWERPC] Revert "[POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class" 2006-11-22 12:13:36 +11:00
asm-ppc [PATCH] Consolidate check_signature 2006-10-11 11:14:23 -07:00
asm-s390 [S390] Fix pte type checking. 2006-10-18 18:30:51 +02:00
asm-sh sh: Fix IPR-IRQ's for IRQ-chip change breakage. 2006-10-31 12:53:28 +09:00
asm-sh64 [PATCH] Consolidate check_signature 2006-10-11 11:14:23 -07:00
asm-sparc [SPARC]: Fix robust futex syscalls and wire up migrate_pages. 2006-11-05 16:51:03 -08:00
asm-sparc64 [SPARC]: Fix robust futex syscalls and wire up migrate_pages. 2006-11-05 16:51:03 -08:00
asm-um [PATCH] uml: add INITCALLS 2006-10-31 08:07:00 -08:00
asm-v850 [PATCH] remove remaining errno and __KERNEL_SYSCALLS__ references 2006-10-02 07:57:23 -07:00
asm-x86_64 [PATCH] x86-64: Fix race in exit_idle 2006-11-14 16:57:46 +01:00
asm-xtensa fix file specification in comments 2006-10-03 23:01:26 +02:00
crypto [CRYPTO] digest: Added user API for new hash type 2006-09-21 11:46:17 +10:00
keys [PATCH] keys: discard the contents of a key on revocation 2006-06-26 09:58:18 -07:00
linux WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
math-emu
media V4L/DVB (4666): Ensure the WM8775 driver is loaded generically for any board. 2006-10-03 15:13:48 -03:00
mtd Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-10-01 17:55:53 +01:00
net WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
pcmcia
rdma RDMA/addr: Use client registration to fix module unload race 2006-11-02 14:26:04 -08:00
rxrpc
scsi [SCSI] replace u8 and u32 with __u8 and __u32 in scsi.h for user space 2006-10-25 15:14:34 -07:00
sound [ALSA] version 1.0.13 2006-10-22 10:56:24 +02:00
video fix file specification in comments 2006-10-03 23:01:26 +02:00
Kbuild [HEADERS] One line per header in Kbuild files to reduce conflicts 2006-09-19 12:43:58 +01:00