Threads
Motivation: Concurrency within a Process
void WebExplorer()
{
char URL[] = "http://www.wikipedia.org";
char buf[1024];
thread_create(GetData, URL, buf);
thread_create(ShowText, buf);
...
}
void GetData(char *URL, char *buf)
{
...
}
void ShowText(char *buf)
{
...
}Thread vs. Process
Property
Thread
Process
Thread Implementation
User Thread
Kernel Thread
LightWeight Thread
The Thread API
The pthread_create() Syscall
pthread_create() SyscallThread Safety
Reference
Last updated
