3 ms·
As curiosity it is great. BTW, if POSIX thread implementation is not good enough in the default C library, it should be revised instead of everyone rewriting st
by faragon 10y ago
As curiosity it is great. BTW, if POSIX thread implementation is not good enough in the default C library, it should be revised instead of everyone rewriting stuff for each specific Unix-like flavour. Rationale: Platform-specific goodies are great for specific cases, but terrible for standard and multi-platform development.
- scott_s 10y agoI'm a little confused by your comment. This article is a pedagogical exercise: it demonstrates how thread creation works on Linux by implementing it from scratch using assembly. The author's intention is not to create a new library, but rather to show how such a library might be implemented. Nowhere does the author advocate doing this in production code over using the standard implementation of Pthreads on Linux (https://en.wikipedia.org/wiki/Native_POSIX_Thread_Library https://en.wikipedia.org/wiki/Native_POSIX_Thread_Library).
- faragon 10y ago>>"The author's intention is not to create a new library, but ..." I don't know author's intention. Do you? :-) My point was a warning about how bad idea is using platform-specific non-standard APIs. As exercise, of course it is fine, that is why I up-voted this history.
- scott_s 10y ago> I don't know author's intention. Do you? :-) I do not know the author's intention; I am not certain. But I'm reasonably confident. And that's a reasonable warning, just a bit of a non-sequitur. Hence my confusion.