On Tue, 17 Aug 1999, Jeremy Fitzhardinge wrote:
>#define SET_TASK_STATE(s) do { current->state = (s); mb(); } while(0)
>
>and replace all the explicit assignments with the macro?
Replacing all the explicit assignments would be wrong. My patch only fixes
the places that are buggy. Lots of places (like in drivers/sound/*.c)
doesn't need any explicit serialization (they are just safe).
So we can use two macros like set_state and _set_state where the former
flush the task-state into memory and the latter doesn't enforce any order,
but you must be aware of these SMP issues to choose between one of the two
functions anyway.
I'll wait an ack from Linus before redo the patch with _set_state and
set_state.
Another option could be to apply my mb()-patch and also define the two
set_state/_set_state in sched.h for future coding (as Ingo did with the
wait_event interface).
Andrea
-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/mentre/smp-faq/
To Unsubscribe: send "unsubscribe linux-smp" to [EMAIL PROTECTED]