Threading in C

You are going to need to use OS specific libraries to do threading. On Posix, you will want to look into pthreads (and specifically pthread_create). On Windows, you'll want CreateThread or _beginthreadex.


Multithreading in C is platform dependent. You need to use external libraries corresponding to different platforms.

Read about:

Multithreading in C, POSIX style and Multithreading with C and Win32


There's nothing in standard C that could help you. You need to use some library or platform-dependent features. Don't forget that many platforms simply don't have threads - only full-weight processes.

On Windows use CreateThread(). You'll need Microsoft SDK to compile your code using this and other Win32 functions.

Tags:

C