Skip to content

Commit

Permalink
Update gcc_libinit.c
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasten committed Mar 11, 2024
1 parent 1983cc4 commit 952087d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gcc_libinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ _cgo_wait_runtime_init_done(void) {

// The key and x_cgo_pthread_key_created are for the whole program,
// whereas the specific and destructor is per thread.
if (x_cgo_pthread_key_created == 0 && pthread_key_create(&pthread_g, pthread_key_destructor) == 0) {
x_cgo_pthread_key_created = 1;
}
(void)pthread_key_destructor;
// if (x_cgo_pthread_key_created == 0 && pthread_key_create(&pthread_g, pthread_key_destructor) == 0) {
// x_cgo_pthread_key_created = 1;
// }

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

0 comments on commit 952087d

Please sign in to comment.