Re: [AD] multithreaded callbacks |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sun, 15 Jul 2001, Henrik Stokseth wrote:
> Stepan Roh <stepan@xxxxxxxxxx> wrote:
>
> > The most common POSIX Threads implementation for Linux (LinuxThreads
> > included in glibc2) is just wrapper for clone syscall. Why do you think
> > it's slow?
>
> just a comparision i saw a the linux-kernel mailinglist a while ago. linus
> said people were better off using the native linux system calls for speed
> and not the posix system calls and refused to do anything to speed it up.
> btw. i don't have any experience with threaded programming but aren't
> clone() used to fork whole processes? that's not threaded programming...
clone syscall (__clone() function in glibc) is general way how to create
processes/threads. In Linux, everything is process (it has its own PID
- it is not forced to, but kernel is not ready for processes sharing
PIDs). You can specify what will it share with its parent: forked()
processes shares nothing, threads (as in OS theory) shares memory, files,
signal handlers etc.
Have a nice day.
Stepan Roh