O'Reilly logo

C Interfaces and Implementations: Techniques for Creating Reusable Software by David R. Hanson - Princeton University

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 20. Threads

The typical C program is a sequential, or single-threaded, program. That is, there is one locus of control in the program. A program’s location counter gives the address of each instruction as it is executed. Most of the time, the location is advanced sequentially, one instruction at a time. Occasionally, a jump or call instruction causes the location counter to change to the jump destination or to the address of the function called. The values of the location counter trace out a path through the program that describes its execution, and this path looks like a thread through the program.

A concurrent or multithreaded program has more than one thread, and, in the most general case, these threads are all executing at the same ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required