summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2003-02-05 23:39:31 -0800
committerChristoph Hellwig <hch@lab343.munich.sgi.com>2003-02-05 23:39:31 -0800
commit202b74ebfa3aa288b3a306160febf478978ecee4 (patch)
tree12991171b0106b8953886a673f71770056cdaa2a /include
parent477c16ff9201e948366081cf944518d666093e0b (diff)
[PATCH] Make sys_wait4() more readable
I cleaned up sys_wait4; it was straightforward and I think a definite improvement. While at it, I noticed that one of the races I fixed in the TASK_STOPPED case actually can happen earlier. Between read_unlock and write_lock_irq, another thread could reap the process and make P invalid, so now I do get_task_struct before read_unlock and then the existing race checks catch all scenarios. Aside from the aforementioned race tweak, the code should be the same as in the previous patch (that Ingo and I have tested more thoroughly) modulo being moved into functions and some reformatting and comment changes. Oh, my old patch had one case where it failed to retake the read lock after a race bailout that I just noticed reading over it. That's fixed too. These exit fixes were something I noticed incidentally and spent less time on than the signals changes. Another few passes of eyeballs over them are certainly warranted. (In particular, there are code paths like that one that check for specific races that have probably never been seen in practice, so those code paths have never run once.)
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions