Hi all,

Looking through 'server/mpm/worker/worker.c' I have found such a combination of TODO/FIXME comments:
1)
/* TODO: requests_this_child should be synchronized - aaron */
if (requests_this_child <= 0) {
2)
requests_this_child--; /* FIXME: should be synchronized - aaron */

And I can not see any point here. These are one word CPU operations, thus there is no way to preempt inside this kind of operation. So, one CPU is safe by nature of basic operation. If we have several CPUs they will synchronize caches any way, thus we will never get inconsistent state here. We can only lose time trying to synchronize it in code. Am I not right?

PS My assumptions are several threads of the same process are dealing with one word of common memory.

--
Best regards,
Dmytro

Reply via email to