|
From: | Ulrich Schmidt |
Subject: | Re: [Tinycc-devel] make tcc reentrant |
Date: | Sun, 8 Dec 2019 13:03:50 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 |
Am 08.12.2019 um 10:34 schrieb uso ewin:
I've made a version that should support multi thread on my github https://github.com/cosmo-ray/tcc/commit/46d0e73edc7e448f0f514936fdb4f62e2c8800a4 I didn't tests it, it's just here to show the possibility using _Thread_local. This approach even if it doesn't enable reentrancy, allow multy-thread, can be disable and doesn't modify a lot of code. Do you think you could use that Ulrich ? Thanks, Matthias
Hi, Matthias. I am not shure your approach will work. THREAD_LOCAL global vars become initialized at thread start. We do not create threads. AlsoTHREAD_LOCAL is defined in newer c versions. To stay portable as possible I prefer avoiding newer c features. But i am no c guru and i have nothing to decide in this project. All i did is putting my fingers in a open wound. I want to use libtcc from lua and i started the suggested work for my private project already to learn about tcc internals and to keep going. Ulrich.
[Prev in Thread] | Current Thread | [Next in Thread] |