Skip to content

Commit 952087d

Browse files
committed
Update gcc_libinit.c
1 parent 1983cc4 commit 952087d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/gcc_libinit.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ _cgo_wait_runtime_init_done(void) {
5050

5151
// The key and x_cgo_pthread_key_created are for the whole program,
5252
// whereas the specific and destructor is per thread.
53-
if (x_cgo_pthread_key_created == 0 && pthread_key_create(&pthread_g, pthread_key_destructor) == 0) {
54-
x_cgo_pthread_key_created = 1;
55-
}
53+
(void)pthread_key_destructor;
54+
// if (x_cgo_pthread_key_created == 0 && pthread_key_create(&pthread_g, pthread_key_destructor) == 0) {
55+
// x_cgo_pthread_key_created = 1;
56+
// }
5657

5758
// TODO(iant): For the case of a new C thread calling into Go, such
5859
// as when using -buildmode=c-archive, we know that Go runtime

0 commit comments

Comments
 (0)