]> git.tuebingen.mpg.de Git - paraslash.git/commit
Simplify the scheduling code.
authorAndre Noll <maan@systemlinux.org>
Sun, 30 Mar 2008 20:56:16 +0000 (22:56 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 30 Mar 2008 20:56:16 +0000 (22:56 +0200)
commit335730538150250f32c0df0b184fb494e2bb0df3
tree8ae6390110791be99b1db3004807051d4978ec4a
parent428f82b63776bd8902c5e29659236f3a79ded8ca
Simplify the scheduling code.

- Get rid of sched->select_ret. Tasks shouldn't care about the
return value of the select call.

- Kill task->private_data. Use container_of() instead.

- Remove task->event_handler. It is never necessary and only
makes the code more convoluted. The scheduler unregisters
tasks as soon as either the pre_select or the post_select
functions return an error.

- Rename task->ret to task->error and get rid of a couple
of error fields in other structs that usually only contained
a copy of the task's error value.

This conversion likely introduces many bugs that have to be
shaken out in subsequent patches. Hopefully it will result in
less error-prone code in the long run.
24 files changed:
afs.c
audiod.c
audiod.h
client.c
client.h
client_common.c
dccp_recv.c
error.h
filter.c
filter.h
filter_chain.c
http_recv.c
ortp_recv.c
recv.c
recv.h
sched.c
sched.h
stdin.c
stdin.h
stdout.c
stdout.h
write.c
write.h
write_common.c