From 07c7fa6716a2f54f9feab3eb56f8677edb1b033d Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 4 Mar 2015 10:20:31 +0100 Subject: 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. --- sys/src/libthread/channel.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'sys/src/libthread/channel.c') 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) { -- cgit v1.2.3