]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/runtime/cgo/callbacks.go
Revert "runtime/cgo: store M for C-created thread in pthread key"
[gostls13.git] / src / runtime / cgo / callbacks.go
index 792dd7d0860d3f8c6a1572f509a438e194183b76..e7c8ef3e07c2b3c4290e000cea35e8a81ef1011a 100644 (file)
@@ -71,42 +71,6 @@ var _cgo_thread_start = &x_cgo_thread_start
 var x_cgo_sys_thread_create byte
 var _cgo_sys_thread_create = &x_cgo_sys_thread_create
 
-// Indicates whether a dummy thread key has been created or not.
-//
-// When calling go exported function from C, we register a destructor
-// callback, for a dummy thread key, by using pthread_key_create.
-
-//go:cgo_import_static x_cgo_pthread_key_created
-//go:linkname x_cgo_pthread_key_created x_cgo_pthread_key_created
-//go:linkname _cgo_pthread_key_created _cgo_pthread_key_created
-var x_cgo_pthread_key_created byte
-var _cgo_pthread_key_created = &x_cgo_pthread_key_created
-
-// Export crosscall2 to a c function pointer variable.
-// Used to dropm in pthread key destructor, while C thread is exiting.
-
-//go:cgo_import_static x_crosscall2_ptr
-//go:linkname x_crosscall2_ptr x_crosscall2_ptr
-//go:linkname _crosscall2_ptr _crosscall2_ptr
-var x_crosscall2_ptr byte
-var _crosscall2_ptr = &x_crosscall2_ptr
-
-// Set the x_crosscall2_ptr C function pointer variable point to crosscall2.
-// It's for the runtime package to call at init time.
-func set_crosscall2()
-
-//go:linkname _set_crosscall2 runtime.set_crosscall2
-var _set_crosscall2 = set_crosscall2
-
-// Store the g into the thread-specific value.
-// So that pthread_key_destructor will dropm when the thread is exiting.
-
-//go:cgo_import_static x_cgo_bindm
-//go:linkname x_cgo_bindm x_cgo_bindm
-//go:linkname _cgo_bindm _cgo_bindm
-var x_cgo_bindm byte
-var _cgo_bindm = &x_cgo_bindm
-
 // Notifies that the runtime has been initialized.
 //
 // We currently block at every CGO entry point (via _cgo_wait_runtime_init_done)