]> git.tue.mpg.de Git - paraslash.git/commitdiff
Skip btr suffix from {pre,post}_select_btr().
authorAndre Noll <maan@systemlinux.org>
Wed, 13 Jan 2010 22:39:32 +0000 (23:39 +0100)
committerAndre Noll <maan@systemlinux.org>
Wed, 13 Jan 2010 22:39:32 +0000 (23:39 +0100)
Everything uses btr now, so there's no need for a suffix any more.
Update the documentation a bit.

alsa_write.c
file_write.c
oss_write.c
write.h
write_common.c

index 7362c42bdaefe57ae485fa7ec202212eaa6cfa12..8bc12a90fa89fc6ec532fe3d61721a6369d8aee1 100644 (file)
@@ -136,7 +136,7 @@ static int alsa_open(struct writer_node *wn)
        return 1;
 }
 
-static void alsa_write_pre_select_btr(struct sched *s, struct task *t)
+static void alsa_write_pre_select(struct sched *s, struct task *t)
 {
        struct writer_node *wn = container_of(t, struct writer_node, task);
        struct private_alsa_write_data *pad = wn->private_data;
@@ -209,7 +209,7 @@ static void alsa_close(struct writer_node *wn)
        free(pad);
 }
 
-static void alsa_write_post_select_btr(__a_unused struct sched *s,
+static void alsa_write_post_select(__a_unused struct sched *s,
                struct task *t)
 {
        struct writer_node *wn = container_of(t, struct writer_node, task);
@@ -319,8 +319,8 @@ void alsa_write_init(struct writer *w)
        alsa_cmdline_parser_init(&dummy);
        w->open = alsa_open;
        w->close = alsa_close;
-       w->pre_select_btr = alsa_write_pre_select_btr;
-       w->post_select_btr = alsa_write_post_select_btr;
+       w->pre_select = alsa_write_pre_select;
+       w->post_select = alsa_write_post_select;
        w->parse_config = alsa_parse_config;
        w->shutdown = NULL; /* nothing to do */
        w->free_config = alsa_free_config;
index 2a53499abf532c05717afe5351b6ad72c3730b39..b12d07d5fbc8c71df0584bbf67b0bf7dc2d80ea6 100644 (file)
@@ -71,7 +71,7 @@ static int file_write_open(struct writer_node *wn)
        return -E_FW_OPEN;
 }
 
-static void file_write_pre_select_btr(struct sched *s, struct task *t)
+static void file_write_pre_select(struct sched *s, struct task *t)
 {
        struct writer_node *wn = container_of(t, struct writer_node, task);
        struct private_file_write_data *pfwd = wn->private_data;
@@ -93,7 +93,7 @@ static void file_write_close(struct writer_node *wn)
        free(pfwd);
 }
 
-static void file_write_post_select_btr(__a_unused struct sched *s,
+static void file_write_post_select(__a_unused struct sched *s,
                struct task *t)
 {
        struct writer_node *wn = container_of(t, struct writer_node, task);
@@ -147,8 +147,8 @@ void file_write_init(struct writer *w)
 
        file_cmdline_parser_init(&dummy);
        w->open = file_write_open;
-       w->pre_select_btr = file_write_pre_select_btr;
-       w->post_select_btr = file_write_post_select_btr;
+       w->pre_select = file_write_pre_select;
+       w->post_select = file_write_post_select;
        w->parse_config = file_write_parse_config;
        w->free_config = file_write_free_config;
        w->close = file_write_close;
index b002113caeb5e3c7dd75c78080a4fb9cead20510..8426753e1355dcf7424f140e281683ea580eb693 100644 (file)
@@ -36,7 +36,7 @@ struct private_oss_write_data {
        int bytes_per_frame;
 };
 
-static void oss_pre_select_btr(struct sched *s, struct task *t)
+static void oss_pre_select(struct sched *s, struct task *t)
 {
        struct writer_node *wn = container_of(t, struct writer_node, task);
        struct private_oss_write_data *powd = wn->private_data;
@@ -141,7 +141,7 @@ err:
        return ret;
 }
 
-static void oss_post_select_btr(__a_unused struct sched *s,
+static void oss_post_select(__a_unused struct sched *s,
                struct task *t)
 {
        struct writer_node *wn = container_of(t, struct writer_node, task);
@@ -236,8 +236,8 @@ void oss_write_init(struct writer *w)
        oss_cmdline_parser_init(&dummy);
        w->open = oss_open;
        w->close = oss_close;
-       w->pre_select_btr = oss_pre_select_btr;
-       w->post_select_btr = oss_post_select_btr;
+       w->pre_select = oss_pre_select;
+       w->post_select = oss_post_select;
        w->parse_config = oss_parse_config;
        w->free_config = oss_free_config;
        w->shutdown = NULL;
diff --git a/write.h b/write.h
index 4a17270990583dfa15fd007ae55dfad92ec9a384..936d99c0a45cc1bcc166e97fbb4552d2545182ca 100644 (file)
--- a/write.h
+++ b/write.h
@@ -54,24 +54,16 @@ struct writer {
        /**
         * Prepare the fd sets for select.
         *
-        * This is called from the writer node group task's pre_select(). It
-        * may use the sched pointer to add any file descriptors or to decrease
-        * the select timeout. It must return positive on success and negative
-        * on errors.
+        * This is called from scheduler. It may use the sched pointer to add
+        * any file descriptors or to decrease the select timeout.
         */
-       int (*pre_select)(struct sched *s, struct writer_node *wn);
-       void (*pre_select_btr)(struct sched *s, struct task *t);
+       void (*pre_select)(struct sched *s, struct task *t);
        /**
         * Write audio data.
         *
-        * Called from the post_select function of the wng task. It must keep
-        * track of the number of bytes consumed from the wng's buffer via
-        * the \p wn->written variable (which may be modified by the wng handling
-        * functions). This function must return positive on success and
-        * negative on errors.
+        * Called from the post_select function of the writer node's task.
         */
-       int (*post_select)(struct sched *s, struct writer_node *wn);
-       void (*post_select_btr)(struct sched *s, struct task *t);
+       void (*post_select)(struct sched *s, struct task *t);
        /**
         * Close one instance of the writer.
         *
index b05a9e9839e8e5bf6e37531f81307cb8a08318dc..66f097afa0b845822cd98096d03ef65c7bee5744 100644 (file)
@@ -85,8 +85,8 @@ void register_writer_node(struct writer_node *wn, struct btr_node *parent)
        strcpy(wn->task.status, name);
        free(name);
        ret = w->open(wn);
-       wn->task.post_select = w->post_select_btr;
-       wn->task.pre_select = w->pre_select_btr;
+       wn->task.post_select = w->post_select;
+       wn->task.pre_select = w->pre_select;
        register_task(&wn->task);
 }