summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/chan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/chan.c')
-rw-r--r--src/pkg/runtime/chan.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pkg/runtime/chan.c b/src/pkg/runtime/chan.c
index 00d020749..46cf18a18 100644
--- a/src/pkg/runtime/chan.c
+++ b/src/pkg/runtime/chan.c
@@ -917,6 +917,18 @@ chanclosed(Hchan *c)
return (c->closed & Rclosed) != 0;
}
+int32
+chanlen(Hchan *c)
+{
+ return c->qcount;
+}
+
+int32
+chancap(Hchan *c)
+{
+ return c->dataqsiz;
+}
+
// closedchan(sel *byte) bool;
void