diff options
Diffstat (limited to 'src/pkg/runtime/cgocall.c')
| -rw-r--r-- | src/pkg/runtime/cgocall.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pkg/runtime/cgocall.c b/src/pkg/runtime/cgocall.c index b2d1f33d8..3c9819b09 100644 --- a/src/pkg/runtime/cgocall.c +++ b/src/pkg/runtime/cgocall.c @@ -6,6 +6,7 @@ #include "cgocall.h" Cgo *cgo; /* filled in by dynamic linker when Cgo is available */ +int64 ncgocall; void cgocall(void (*fn)(void*), void *arg) @@ -13,6 +14,8 @@ cgocall(void (*fn)(void*), void *arg) CgoWork w; CgoServer *s; + ncgocall++; + if(cgo == nil) throw("cgocall unavailable"); @@ -36,3 +39,11 @@ cgocall(void (*fn)(void*), void *arg) } notesleep(&w.note); } + +void +runtime·Cgocalls(int64 ret) +{ + ret = ncgocall; + FLUSH(&ret); +} + |
