Hacker News new | ask | show | jobs
by gpderetta 1512 days ago
There have been userspace thread libraries for c++ for decades.
1 comments

Sure, I wrote some myself. Q is what libraries you can use on top of the userspace thread package that are aware of the userspace threads rather than just using OS APIs and thus eg blocking the current OS thread.
There are .so interposition tricks that can be used for that.

I think Pth used to do that for example.

Could you elaborate?
For example: https://www.gnu.org/software/pth/pth-manual.html#system_call...

See the hard system call wrapping. This is just one option.