Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize TLS of the main thread #372

Closed
wants to merge 1 commit into from
Closed

Initialize TLS of the main thread #372

wants to merge 1 commit into from

Conversation

yamt
Copy link
Contributor

@yamt yamt commented Dec 22, 2022

No description provided.

@yamt
Copy link
Contributor Author

yamt commented Jan 19, 2023

does anyone have any concerns on this?

@sbc100
Copy link
Member

sbc100 commented Jan 19, 2023

If I remember correctly you don't need to call __wasm_init_tls on the main thread.

Yup, the main thread's TLS region gets setup automatically during module instantiation: https://github.com/llvm/llvm-project/blob/26f83b43b16a6efde8769d4bdf12779ffd8ef874/lld/wasm/Writer.cpp#L1207-L1209

@yamt
Copy link
Contributor Author

yamt commented Jan 19, 2023

If I remember correctly you don't need to call __wasm_init_tls on the main thread.

Yup, the main thread's TLS region gets setup automatically during module instantiation: https://github.com/llvm/llvm-project/blob/26f83b43b16a6efde8769d4bdf12779ffd8ef874/lld/wasm/Writer.cpp#L1207-L1209

ok. thank you.
another reason to require llvm >=15.

@yamt yamt closed this Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants