summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-03-04 10:20:31 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2015-03-04 10:20:31 +0100
commit07c7fa6716a2f54f9feab3eb56f8677edb1b033d (patch)
tree964ada16de707d78bd14309e864eb1e09d6aed8a /sys/src
parenteaf91d0f8ef43344ea9b8b030ab1a446211b8d10 (diff)
libthread: get rid of chaninit() (thanks qrstuv)
chaninit() does not initialize Chan.qentry and Chan.nentry and there is no way to get rid of such a channel. nobody is using it, so removing the function to avoid confusion.
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/libthread/channel.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/sys/src/libthread/channel.c b/sys/src/libthread/channel.c
index 54bd5373d..4e410aa94 100644
--- a/sys/src/libthread/channel.c
+++ b/sys/src/libthread/channel.c
@@ -49,21 +49,6 @@ chanfree(Channel *c)
unlock(&chanlock);
}
-int
-chaninit(Channel *c, int elemsize, int elemcnt)
-{
- if(elemcnt < 0 || elemsize <= 0 || c == nil)
- return -1;
- c->f = 0;
- c->n = 0;
- c->closed = 0;
- c->freed = 0;
- c->e = elemsize;
- c->s = elemcnt;
- _threaddebug(DBGCHAN, "chaninit %p", c);
- return 1;
-}
-
Channel*
chancreate(int elemsize, int elemcnt)
{