As I understand it, there has been an attempt to add the concept of tasks or threads to ANSI C++ (and perhaps ANSI C also).
This being the case, I would like to have an operating system independent way to declare my task-local storage. I am indifferent to whether the keyword is “task” or “thread” or something else entirely, but what I really want to be able to do is to say something like:
task uint32_t errno; // errno is at offset 0 in the task local storage
Why? Numerous reasons:
Now of course there are problems. Sometimes the EABI does not provide a defined way to allocate per-task storage. Well, they never will unless the Standard Committees require them to find a way. Same for Operating Systems. But since the intent is clear, the use is clear, and the need is there, why not take the small step that will make it possible for everyone downstream to do the right thing?
Oh, and I know about locks, semaphores, and atomic operations. That’s a different topic than being able to name and allocate task-local storage.