]> git.tuebingen.mpg.de Git - paraslash.git/commit
sched: Allow more than one running scheduler instance.
authorAndre Noll <maan@systemlinux.org>
Fri, 2 Sep 2011 16:27:29 +0000 (18:27 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 20 Nov 2011 14:08:41 +0000 (15:08 +0100)
commit8aa0f575bcca12ab63ab53141c2144448c457478
tree959e2a3c8998fbfecf649dfefb9e8017be6cc8bf
parent09a69f08d83ad23e806f0412fbc3f98b1410b115
sched: Allow more than one running scheduler instance.

The interactive completion code must be able to run a second,
independent scheduler instance for generating the possible completions.
This is currently not possible because the pre_select and post_select
list heads of the scheduler are defined globally in sched.c.

This patch moves these list heads from sched.c to struct sched. This
leaves only the global "now" variable in sched.c, but it is OK to
update this from all scheduler instances, so it can stay.

Moving the two list heads to struct sched requires that several
public functions, among them register_task(), grow an additional
parameter. The (mostly trivial) changes that update all callers to
provide the new argument make the patch rather invasive, unfortunately.
23 files changed:
afs.c
audiod.c
audiod_command.c
client.c
client.h
client_common.c
command.c
dccp_send.c
filter.c
grab_client.c
grab_client.h
http_send.c
recv.c
sched.c
sched.h
send_common.c
server.c
udp_send.c
vss.c
vss.h
write.c
write_common.c
write_common.h