3 ms·
If you look in the glibc source code in `sysdeps/unix/sysv/linux/arch-fork.h` you will see how it is calling clone BTW. In Linux really threads are just tasks
by nyrikki 5y ago
If you look in the glibc source code in `sysdeps/unix/sysv/linux/arch-fork.h` you will see how it is calling clone BTW.
In Linux really threads are just tasks that share memory and processes are tasks that do not.
fork() and pthread_create() simply end up in the same place because user threads or processes are just tasks to the kernel.
Kernel threads, which are not user space are different.
https://github.com/torvalds/linux/blob/master/include/linux/sched.h https://github.com/torvalds/linux/blob/master/include/linux/...
The sched wouldn't be able to use a Red-Black trees in the way it does if it didn't