Skip to content

newlib is compiled with __SINGLE_THREAD__ defined #343

Closed
@stephanosio

Description

@stephanosio

newlib for the Zephyr SDK is currently compiled with __SINGLE_THREAD__ defined, and this causes most locking functions, including retargetable locking, to be omitted.

__SINGLE_THREAD__ is defined for Zephyr SDK newlib build because CT_LIBC_NEWLIB_MULTITHREAD is not explicitly set to y, and crosstool-ng consequently specifies --disable-newlib-multithread during newlib configure (note that this option is enabled by default unless --disable-newlib-multithread or --enable-newlib-multithread=no is specified).

In order to properly support newlib multithreading in Zephyr, we must build newlib without __SINGLE_THREAD__ defined.

Also note that GNU ARM Embedded builds without __SINGLE_THREAD__ despite not having --enable-newlib-multithread specified because this option is, as previously mentioned, enabled by default.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions