From 74c88020bd325865fe26ed25ea8ad0ace0924136 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 31 Mar 2013 19:23:18 +0000 Subject: [PATCH] sched: Kill old ->post_select variant. It has no more users. --- aacdec_filter.c | 1 - afh_recv.c | 1 - afs.c | 2 -- alsa_write.c | 1 - amp_filter.c | 1 - ao_write.c | 1 - audioc.c | 1 - audiod.c | 19 ++----------------- client.c | 2 -- client_common.c | 1 - compress_filter.c | 1 - dccp_recv.c | 1 - fecdec_filter.c | 1 - file_write.c | 1 - filter.c | 8 +------- filter.h | 2 -- flacdec_filter.c | 1 - grab_client.c | 1 - http_recv.c | 1 - interactive.c | 1 - mp3dec_filter.c | 1 - oggdec_filter.c | 1 - oss_write.c | 1 - osx_write.c | 1 - play.c | 17 ++--------------- prebuffer_filter.c | 1 - recv.c | 8 +------- recv.h | 2 -- resample_filter.c | 1 - sched.c | 16 +++------------- sched.h | 6 ------ server.c | 2 -- spxdec_filter.c | 1 - stdin.c | 1 - stdout.c | 1 - udp_recv.c | 1 - vss.c | 1 - wav_filter.c | 1 - wmadec_filter.c | 1 - write.h | 2 -- write_common.c | 8 +------- 41 files changed, 10 insertions(+), 112 deletions(-) diff --git a/aacdec_filter.c b/aacdec_filter.c index 9cea8980..71654bf3 100644 --- a/aacdec_filter.c +++ b/aacdec_filter.c @@ -219,6 +219,5 @@ void aacdec_filter_init(struct filter *f) f->close = aacdec_close; f->pre_select = generic_filter_pre_select; f->new_post_select = aacdec_post_select; - f->post_select = NULL; f->execute = aacdec_execute; } diff --git a/afh_recv.c b/afh_recv.c index 6eeb08aa..aa27c8b5 100644 --- a/afh_recv.c +++ b/afh_recv.c @@ -253,7 +253,6 @@ void afh_recv_init(struct receiver *r) r->close = afh_recv_close; r->pre_select = afh_recv_pre_select; r->new_post_select = afh_recv_post_select; - r->post_select = NULL; r->parse_config = afh_recv_parse_config; r->free_config = afh_recv_free_config; r->execute = afh_execute; diff --git a/afs.c b/afs.c index 9daf7241..9cc075f6 100644 --- a/afs.c +++ b/afs.c @@ -762,7 +762,6 @@ static void register_signal_task(struct sched *s) st->task.pre_select = signal_pre_select; st->task.new_post_select = afs_signal_post_select; - st->task.post_select = NULL; sprintf(st->task.status, "signal task"); register_task(s, &st->task); } @@ -973,7 +972,6 @@ static void register_command_task(uint32_t cookie, struct sched *s) ct->task.pre_select = command_pre_select; ct->task.new_post_select = command_post_select; - ct->task.post_select = NULL; sprintf(ct->task.status, "afs command task"); register_task(s, &ct->task); } diff --git a/alsa_write.c b/alsa_write.c index c99f26e4..04a94f73 100644 --- a/alsa_write.c +++ b/alsa_write.c @@ -358,7 +358,6 @@ void alsa_write_init(struct writer *w) w->close = alsa_close; w->pre_select = alsa_write_pre_select; w->new_post_select = alsa_write_post_select; - w->post_select = NULL; w->parse_config_or_die = alsa_parse_config_or_die; w->free_config = alsa_free_config; w->help = (struct ggo_help) { diff --git a/amp_filter.c b/amp_filter.c index 78a70f97..186f87a5 100644 --- a/amp_filter.c +++ b/amp_filter.c @@ -135,7 +135,6 @@ void amp_filter_init(struct filter *f) f->close = amp_close; f->pre_select = generic_filter_pre_select; f->new_post_select = amp_post_select; - f->post_select = NULL; f->parse_config = amp_parse_config; f->free_config = amp_free_config; f->help = (struct ggo_help) { diff --git a/ao_write.c b/ao_write.c index 3f681eb8..65ad02c0 100644 --- a/ao_write.c +++ b/ao_write.c @@ -369,7 +369,6 @@ void ao_write_init(struct writer *w) w->close = aow_close; w->pre_select = aow_pre_select; w->new_post_select = aow_post_select; - w->post_select = NULL; w->parse_config_or_die = aow_parse_config_or_die; w->free_config = aow_free_config; w->help = (struct ggo_help) { diff --git a/audioc.c b/audioc.c index 3cbd8a82..f0c61cdf 100644 --- a/audioc.c +++ b/audioc.c @@ -138,7 +138,6 @@ static struct audioc_task audioc_task = { .task = { .pre_select = audioc_pre_select, .new_post_select = audioc_post_select, - .post_select = NULL, .status = "audioc task" }, }, *at = &audioc_task; diff --git a/audiod.c b/audiod.c index f412dc6d..0ff92e6f 100644 --- a/audiod.c +++ b/audiod.c @@ -495,13 +495,7 @@ static void open_filters(struct slot_info *s) fn->filter_num = a->filter_nums[i]; fn->conf = a->filter_conf[i]; fn->task.pre_select = f->pre_select; - if (f->new_post_select) { - fn->task.new_post_select = f->new_post_select; - fn->task.post_select = NULL; - } else { - fn->task.new_post_select = NULL; - fn->task.post_select = f->post_select; - } + fn->task.new_post_select = f->new_post_select; fn->btrn = btr_new_node(&(struct btr_node_description) EMBRACE(.name = f->name, .parent = parent, .handler = f->execute, .context = fn)); @@ -565,13 +559,7 @@ static int open_receiver(int format) PARA_NOTICE_LOG("started %s: %s receiver in slot %d\n", audio_formats[format], r->name, slot_num); rn->task.pre_select = r->pre_select; - if (r->new_post_select) { - rn->task.new_post_select = r->new_post_select; - rn->task.post_select = NULL; - } else { - rn->task.new_post_select = NULL; - rn->task.post_select = r->post_select; - } + rn->task.new_post_select = r->new_post_select; sprintf(rn->task.status, "%s receiver node", r->name); register_task(&sched, &rn->task); return slot_num; @@ -1022,7 +1010,6 @@ static void signal_setup_default(struct signal_task *st) { st->task.pre_select = signal_pre_select; st->task.new_post_select = signal_post_select; - st->task.post_select = NULL; sprintf(st->task.status, "signal task"); } @@ -1056,7 +1043,6 @@ static void init_command_task(struct command_task *ct) { ct->task.pre_select = command_pre_select; ct->task.new_post_select = command_post_select; - ct->task.post_select = NULL; ct->task.error = 0; ct->fd = audiod_get_socket(); /* doesn't return on errors */ sprintf(ct->task.status, "command task"); @@ -1287,7 +1273,6 @@ static void init_status_task(struct status_task *st) memset(st, 0, sizeof(struct status_task)); st->task.pre_select = status_pre_select; st->task.new_post_select = status_post_select; - st->task.post_select = NULL; st->sa_time_diff_sign = 1; st->clock_diff_count = conf.clock_diff_count_arg; st->current_audio_format_num = -1; diff --git a/client.c b/client.c index 89171a23..da075e09 100644 --- a/client.c +++ b/client.c @@ -96,7 +96,6 @@ static int execute_client_command(const char *cmd, char **result) .task = { .pre_select = exec_pre_select, .new_post_select = exec_post_select, - .post_select = NULL, .status = "client exec task", }, .result_buf = para_strdup(""), @@ -550,7 +549,6 @@ static int supervisor_post_select(struct sched *s, __a_unused struct task *t) static struct task svt = { .new_post_select = supervisor_post_select, - .post_select = NULL, .status = "supervisor task" }; diff --git a/client_common.c b/client_common.c index 3e20eafd..8958cace 100644 --- a/client_common.c +++ b/client_common.c @@ -602,7 +602,6 @@ int client_connect(struct client_task *ct, struct sched *s, EMBRACE(.name = "client", .parent = parent, .child = child)); ct->task.pre_select = client_pre_select; ct->task.new_post_select = client_post_select; - ct->task.post_select = NULL; ct->task.error = 0; sprintf(ct->task.status, "client"); register_task(s, &ct->task); diff --git a/compress_filter.c b/compress_filter.c index 85c365ca..a10e7c35 100644 --- a/compress_filter.c +++ b/compress_filter.c @@ -151,7 +151,6 @@ void compress_filter_init(struct filter *f) f->close = compress_close; f->pre_select = generic_filter_pre_select; f->new_post_select = compress_post_select; - f->post_select = NULL; f->parse_config = compress_parse_config; f->free_config = compress_free_config; f->help = (struct ggo_help) { diff --git a/dccp_recv.c b/dccp_recv.c index 7b1f04ef..d5f3cadb 100644 --- a/dccp_recv.c +++ b/dccp_recv.c @@ -178,7 +178,6 @@ void dccp_recv_init(struct receiver *r) r->open = dccp_recv_open; r->close = dccp_recv_close; r->pre_select = dccp_recv_pre_select; - r->post_select = NULL; r->new_post_select = dccp_recv_post_select; r->parse_config = dccp_recv_parse_config; r->free_config = dccp_recv_free_config; diff --git a/fecdec_filter.c b/fecdec_filter.c index c65ff89d..f1bd8859 100644 --- a/fecdec_filter.c +++ b/fecdec_filter.c @@ -492,5 +492,4 @@ void fecdec_filter_init(struct filter *f) f->open = fecdec_open; f->pre_select = generic_filter_pre_select; f->new_post_select = fecdec_post_select; - f->post_select = NULL; } diff --git a/file_write.c b/file_write.c index 41298a74..c758dc11 100644 --- a/file_write.c +++ b/file_write.c @@ -154,7 +154,6 @@ void file_write_init(struct writer *w) file_write_cmdline_parser_init(&dummy); w->pre_select = file_write_pre_select; w->new_post_select = file_write_post_select; - w->post_select = NULL; w->parse_config_or_die = file_write_parse_config_or_die; w->free_config = file_write_free_config; w->close = file_write_close; diff --git a/filter.c b/filter.c index 07b78aed..7a95b1eb 100644 --- a/filter.c +++ b/filter.c @@ -140,13 +140,7 @@ int main(int argc, char *argv[]) EMBRACE(.name = f->name, .parent = parent, .handler = f->execute, .context = fn)); fn->task.pre_select = f->pre_select; - if (f->new_post_select) { - fn->task.new_post_select = f->new_post_select; - fn->task.post_select = NULL; - } else { - fn->task.new_post_select = NULL; - fn->task.post_select = f->post_select; - } + fn->task.new_post_select = f->new_post_select; f->open(fn); register_task(&s, &fn->task); parent = fn->btrn; diff --git a/filter.h b/filter.h index f7376452..31f3ef15 100644 --- a/filter.h +++ b/filter.h @@ -109,8 +109,6 @@ struct filter { * post_select function is supposed to set t->error to a (negative) * error code. */ - void (*post_select)(struct sched *s, struct task *t); - /** New variant, see sched.h. */ int (*new_post_select)(struct sched *s, struct task *t); /** * Answer a buffer tree query. diff --git a/flacdec_filter.c b/flacdec_filter.c index 363c73bb..d739094a 100644 --- a/flacdec_filter.c +++ b/flacdec_filter.c @@ -297,6 +297,5 @@ void flacdec_filter_init(struct filter *f) f->close = flacdec_close; f->pre_select = flacdec_pre_select; f->new_post_select = flacdec_post_select; - f->post_select = NULL; f->execute = flacdec_execute; } diff --git a/grab_client.c b/grab_client.c index 31340422..39e95471 100644 --- a/grab_client.c +++ b/grab_client.c @@ -131,7 +131,6 @@ static void gc_activate(struct grab_client *gc, struct sched *s) EMBRACE(.name = name, .parent = parent)); gc->task.pre_select = gc_pre_select; gc->task.new_post_select = gc_post_select; - gc->task.post_select = NULL; snprintf(gc->task.status, sizeof(gc->task.status) - 1, "%s", name); gc->task.status[sizeof(gc->task.status) - 1] = '\0'; gc->task.error = 0; diff --git a/http_recv.c b/http_recv.c index 80f0b168..ad8e213c 100644 --- a/http_recv.c +++ b/http_recv.c @@ -192,7 +192,6 @@ void http_recv_init(struct receiver *r) r->open = http_recv_open; r->close = http_recv_close; r->pre_select = http_recv_pre_select; - r->post_select = NULL; r->new_post_select = http_recv_post_select; r->parse_config = http_recv_parse_config; r->free_config = http_recv_free_config; diff --git a/interactive.c b/interactive.c index 14186cd2..cfc1d606 100644 --- a/interactive.c +++ b/interactive.c @@ -448,7 +448,6 @@ int i9e_open(struct i9e_client_info *ici, struct sched *s) return ret; i9ep->task.pre_select = i9e_pre_select; i9ep->task.new_post_select = i9e_post_select; - i9ep->task.post_select = NULL; sprintf(i9ep->task.status, "i9e"); register_task(s, &i9ep->task); rl_readline_name = "para_i9e"; diff --git a/mp3dec_filter.c b/mp3dec_filter.c index 0e8c5681..b6e6e362 100644 --- a/mp3dec_filter.c +++ b/mp3dec_filter.c @@ -220,7 +220,6 @@ void mp3dec_filter_init(struct filter *f) f->free_config = mp3dec_free_config; f->pre_select = generic_filter_pre_select; f->new_post_select = mp3dec_post_select; - f->post_select = NULL; f->execute = mp3dec_execute; f->help = (struct ggo_help) { .short_help = mp3dec_filter_args_info_help, diff --git a/oggdec_filter.c b/oggdec_filter.c index 791be276..b30abaa1 100644 --- a/oggdec_filter.c +++ b/oggdec_filter.c @@ -273,6 +273,5 @@ void oggdec_filter_init(struct filter *f) f->close = ogg_close; f->pre_select = ogg_pre_select; f->new_post_select = ogg_post_select; - f->post_select = NULL; f->execute = oggdec_execute; } diff --git a/oss_write.c b/oss_write.c index 0b8f1b5f..8a48b07a 100644 --- a/oss_write.c +++ b/oss_write.c @@ -233,7 +233,6 @@ void oss_write_init(struct writer *w) w->close = oss_close; w->pre_select = oss_pre_select; w->new_post_select = oss_post_select; - w->post_select = NULL; w->parse_config_or_die = oss_parse_config_or_die; w->free_config = oss_free_config; w->help = (struct ggo_help) { diff --git a/osx_write.c b/osx_write.c index 53e57fa9..f961ca56 100644 --- a/osx_write.c +++ b/osx_write.c @@ -364,7 +364,6 @@ void osx_write_init(struct writer *w) w->close = osx_write_close; w->pre_select = osx_write_pre_select; w->new_post_select = osx_write_post_select; - w->post_select = NULL; w->parse_config_or_die = osx_write_parse_config_or_die; w->free_config = osx_free_config; w->help = (struct ggo_help) { diff --git a/play.c b/play.c index 50db73a6..96395010 100644 --- a/play.c +++ b/play.c @@ -368,13 +368,7 @@ static int open_new_file(struct play_task *pt) tmp = NULL; } pt->rn.task.pre_select = afh_recv->pre_select; - if (afh_recv->new_post_select) { - pt->rn.task.new_post_select = afh_recv->new_post_select; - pt->rn.task.post_select = NULL; - } else { - pt->rn.task.post_select = NULL; - pt->rn.task.new_post_select = afh_recv->new_post_select; - } + pt->rn.task.new_post_select = afh_recv->new_post_select; sprintf(pt->rn.task.status, "%s receiver node", afh_recv->name); return 1; fail: @@ -415,13 +409,7 @@ static int load_file(struct play_task *pt) pt->fn.filter_num = ret; decoder = filters + ret; pt->fn.task.pre_select = decoder->pre_select; - if (decoder->new_post_select) { - pt->fn.task.new_post_select = decoder->new_post_select; - pt->fn.task.post_select = NULL; - } else { - pt->fn.task.new_post_select = NULL; - pt->fn.task.post_select = decoder->post_select; - } + pt->fn.task.new_post_select = decoder->new_post_select; sprintf(pt->fn.task.status, "%s decoder", af); pt->fn.btrn = btr_new_node(&(struct btr_node_description) EMBRACE(.name = decoder->name, .parent = pt->rn.btrn, @@ -1283,7 +1271,6 @@ int main(int argc, char *argv[]) pt->playing = true; pt->task.pre_select = play_pre_select; pt->task.new_post_select = play_post_select; - pt->task.post_select = NULL; sprintf(pt->task.status, "play task"); register_task(&sched, &pt->task); ret = schedule(&sched); diff --git a/prebuffer_filter.c b/prebuffer_filter.c index c849424a..5ccfa456 100644 --- a/prebuffer_filter.c +++ b/prebuffer_filter.c @@ -123,7 +123,6 @@ void prebuffer_filter_init(struct filter *f) f->free_config = prebuffer_free_config; f->pre_select = prebuffer_pre_select; f->new_post_select = prebuffer_post_select; - f->post_select = NULL; f->help = (struct ggo_help) { .short_help = prebuffer_filter_args_info_help, .detailed_help = prebuffer_filter_args_info_detailed_help diff --git a/recv.c b/recv.c index 4458021c..e46fa1a3 100644 --- a/recv.c +++ b/recv.c @@ -109,13 +109,7 @@ int main(int argc, char *argv[]) register_task(&s, &sot.task); rn.task.pre_select = r->pre_select; - if (r->new_post_select) { - rn.task.new_post_select = r->new_post_select; - rn.task.post_select = NULL; - } else { - rn.task.new_post_select = NULL; - rn.task.post_select = r->post_select;; - } + rn.task.new_post_select = r->new_post_select; sprintf(rn.task.status, "%s", r->name); register_task(&s, &rn.task); diff --git a/recv.h b/recv.h index c48a6b36..6222b93c 100644 --- a/recv.h +++ b/recv.h @@ -115,8 +115,6 @@ struct receiver { * * \sa select(2), struct receiver. */ - void (*post_select)(struct sched *s, struct task *t); - /** New variant, see sched.h. */ int (*new_post_select)(struct sched *s, struct task *t); /** The two help texts of this receiver. */ diff --git a/resample_filter.c b/resample_filter.c index 383332b2..2055f69c 100644 --- a/resample_filter.c +++ b/resample_filter.c @@ -307,7 +307,6 @@ void resample_filter_init(struct filter *f) f->open = resample_open; f->pre_select = resample_pre_select; f->new_post_select = resample_post_select; - f->post_select = NULL; f->parse_config = resample_parse_config; f->free_config = resample_free_config; f->execute = resample_execute; diff --git a/sched.c b/sched.c index 2501b50c..50e87b54 100644 --- a/sched.c +++ b/sched.c @@ -36,7 +36,7 @@ static void unregister_task(struct task *t) para_strerror(-t->error)); if (t->pre_select) list_del(&t->pre_select_node); - if (t->new_post_select || t->post_select) + if (t->new_post_select) list_del(&t->post_select_node); } @@ -62,20 +62,13 @@ static void sched_preselect(struct sched *s) static inline void call_post_select(struct sched *s, struct task *t) { #ifndef SCHED_DEBUG - if (t->new_post_select) { - t->error = t->new_post_select(s, t); - return; - } - return t->post_select(s, t); + t->error = t->new_post_select(s, t); #else struct timeval t1, t2, diff; unsigned long pst; clock_get_realtime(&t1); - if (t->new_post_select) - t->error = t->new_post_select(s, t); - else - t->post_select(s, t); + t->error = t->new_post_select(s, t); clock_get_realtime(&t2); tv_diff(&t1, &t2, &diff); pst = tv2ms(&diff); @@ -175,9 +168,6 @@ void register_task(struct sched *s, struct task *t) if (t->new_post_select) { PARA_DEBUG_LOG("post_select: %p\n", &t->new_post_select); list_add_tail(&t->post_select_node, &s->post_select_list); - } else if ((t->post_select)) { - PARA_DEBUG_LOG("post_select: %p\n", &t->post_select); - list_add_tail(&t->post_select_node, &s->post_select_list); } } diff --git a/sched.h b/sched.h index 907e5fb7..da20e303 100644 --- a/sched.h +++ b/sched.h @@ -54,12 +54,6 @@ struct task { * scheduler and to decrease the select timeout if necessary. */ void (*pre_select)(struct sched *s, struct task *t); - /** - * The postselect hook of \a t. - * - * Evaluate and act upon the results of the previous select call. - */ - void (*post_select)(struct sched *s, struct task *t); /** * The newer variant of the post select hook of \a t. * diff --git a/server.c b/server.c index 8ad2ccb6..e963da77 100644 --- a/server.c +++ b/server.c @@ -339,7 +339,6 @@ static void init_signal_task(void) st->task.pre_select = signal_pre_select; st->task.new_post_select = signal_post_select; - st->task.post_select = NULL; sprintf(st->task.status, "signal task"); PARA_NOTICE_LOG("setting up signal handling\n"); @@ -424,7 +423,6 @@ static void init_server_command_task(int argc, char **argv) PARA_NOTICE_LOG("initializing tcp command socket\n"); sct->task.pre_select = command_pre_select; sct->task.new_post_select = command_post_select; - sct->task.post_select = NULL; sct->argc = argc; sct->argv = argv; ret = para_listen_simple(IPPROTO_TCP, conf.port_arg); diff --git a/spxdec_filter.c b/spxdec_filter.c index 3bf547e0..e9c6df11 100644 --- a/spxdec_filter.c +++ b/spxdec_filter.c @@ -305,6 +305,5 @@ void spxdec_filter_init(struct filter *f) f->close = speexdec_close; f->pre_select = generic_filter_pre_select; f->new_post_select = speexdec_post_select; - f->post_select = NULL; f->execute = speexdec_execute; } diff --git a/stdin.c b/stdin.c index b52123d3..ccd4487a 100644 --- a/stdin.c +++ b/stdin.c @@ -101,7 +101,6 @@ void stdin_set_defaults(struct stdin_task *sit) sit->task.pre_select = stdin_pre_select; sit->task.new_post_select = stdin_post_select; - sit->task.post_select = NULL; sit->btrp = btr_pool_new("stdin", 128 * 1024); sprintf(sit->task.status, "stdin reader"); ret = mark_fd_nonblocking(STDIN_FILENO); diff --git a/stdout.c b/stdout.c index 92707ba9..a0bbeb3e 100644 --- a/stdout.c +++ b/stdout.c @@ -90,7 +90,6 @@ void stdout_set_defaults(struct stdout_task *sot) sot->task.pre_select = stdout_pre_select; sot->task.new_post_select = stdout_post_select; - sot->task.post_select = NULL; sprintf(sot->task.status, "stdout"); ret = mark_fd_nonblocking(STDOUT_FILENO); if (ret >= 0) diff --git a/udp_recv.c b/udp_recv.c index 47078697..27a392d5 100644 --- a/udp_recv.c +++ b/udp_recv.c @@ -223,7 +223,6 @@ void udp_recv_init(struct receiver *r) r->open = udp_recv_open; r->close = udp_recv_close; r->pre_select = udp_recv_pre_select; - r->post_select = NULL; r->new_post_select = udp_recv_post_select; r->parse_config = udp_recv_parse_config; r->free_config = udp_recv_free_config; diff --git a/vss.c b/vss.c index 5b8c687d..e643805c 100644 --- a/vss.c +++ b/vss.c @@ -1175,7 +1175,6 @@ void init_vss_task(int afs_socket, struct sched *s) vsst->afs_socket = afs_socket; vsst->task.pre_select = vss_pre_select; vsst->task.new_post_select = vss_post_select; - vsst->task.post_select = NULL; ms2tv(announce_time, &vsst->announce_tv); PARA_INFO_LOG("announce timeval: %lums\n", tv2ms(&vsst->announce_tv)); INIT_LIST_HEAD(&fec_client_list); diff --git a/wav_filter.c b/wav_filter.c index ccf923e9..c2a9329f 100644 --- a/wav_filter.c +++ b/wav_filter.c @@ -132,5 +132,4 @@ void wav_filter_init(struct filter *f) f->open = wav_open; f->pre_select = wav_pre_select; f->new_post_select = wav_post_select; - f->post_select = NULL; } diff --git a/wmadec_filter.c b/wmadec_filter.c index 1beeb5ac..e4592dda 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -1286,5 +1286,4 @@ void wmadec_filter_init(struct filter *f) f->execute = wmadec_execute; f->pre_select = generic_filter_pre_select; f->new_post_select = wmadec_post_select; - f->post_select = NULL; } diff --git a/write.h b/write.h index bac94431..896f974c 100644 --- a/write.h +++ b/write.h @@ -65,8 +65,6 @@ struct writer { * * Called from the post_select function of the writer node's task. */ - void (*post_select)(struct sched *s, struct task *t); - /** New variant, see sched.h. */ int (*new_post_select)(struct sched *s, struct task *t); /** * Close one instance of the writer. diff --git a/write_common.c b/write_common.c index a1aac65e..db4374fa 100644 --- a/write_common.c +++ b/write_common.c @@ -114,13 +114,7 @@ void register_writer_node(struct writer_node *wn, struct btr_node *parent, strcpy(wn->task.status, name); free(name); wn->task.pre_select = w->pre_select; - if (w->new_post_select) { - wn->task.new_post_select = w->new_post_select; - wn->task.post_select = NULL; - } else { - wn->task.new_post_select = NULL; - wn->task.post_select = w->post_select; - } + wn->task.new_post_select = w->new_post_select; register_task(s, &wn->task); } -- 2.39.2