not really known
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
leonnicolas b6b01eb4d8
main_simple.c: added for better readability
4 years ago
Makefile main_simple.c: added for better readability 4 years ago
README.md initial commit 4 years ago
main.c main.c: deleted comment 4 years ago
main_simple.c main_simple.c: added for better readability 4 years ago

README.md

Clone Thread Example

This C program uses clone() to create a new thread. It illustrates, that the new thread shares the same data and heap segment. The main process creates a new thread with clone. clone() will execute a function that prints a buffer to stdout and then waits 2 seconds and does it again. In the meantime, the main thread changes the content of the buffer. That the child thread prints different things shows that they are not seperate processes.

Compile

make

Run

./main