Re: [fpc-devel] Problem with thread local storage for xtensa-freertos

2020-07-03 Thread Christo Crause via fpc-devel
It was an alignment error. I thought the alignment check was active in SysInitThreadvar but a) it was commented out, and b) the ifdef check was incorrect anyway. On Fri, Jul 3, 2020 at 9:47 AM Christo Crause wrote: > Busy working on threading and TLS, started with a stand-alone unit along > the

[fpc-devel] Problem with thread local storage for xtensa-freertos

2020-07-03 Thread Christo Crause via fpc-devel
Busy working on threading and TLS, started with a stand-alone unit along the lines of cthreads and using OS memory allocation for storing the TLS blocks. After initializing (calling SysInitMultithreading) a block of memory is allocated and threadvars copied. However there appears to be a two byte