runtime: allow arbitrary return type in SetFinalizer.
finalize chan, to free OS X semaphore inside Lock.
os: finalize File, to close fd.
Fixes #503.
R=ken2
CC=golang-dev
https://golang.org/cl/204065
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index a526c04..b361bac 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -383,6 +383,7 @@
uint32 noequal(uint32, void*, void*);
void* malloc(uintptr size);
void free(void *v);
+void addfinalizer(void*, void(*fn)(void*), int32);
void exit(int32);
void breakpoint(void);
void gosched(void);
@@ -390,7 +391,7 @@
void runcgo(void (*fn)(void*), void*);
void ·entersyscall(void);
void ·exitsyscall(void);
-void ·newproc(int32, byte*, byte*);
+void newproc1(byte*, byte*, int32, int32);
void siginit(void);
bool sigsend(int32 sig);
void gettime(int64*, int32*);
@@ -425,6 +426,7 @@
*/
void lock(Lock*);
void unlock(Lock*);
+void destroylock(Lock*);
/*
* sleep and wakeup on one-time events.