After seeing the house building application that simulates basic house building tasks, you get an inside look at the source code that makes it tick. Here you are shown the inner workings of each task, from pouring the foundation to roofing. looking at the source code now will help you connect the dots when you see these functions in the call stack that you will inspect in WPA.
- [Instructor] You've seen the house building app run…and know how it works.…Now, it's time for us to dive into the source code…for the single threaded version, which executes…each house building task sequentially, one at a time.…This application is written in C++…and as I mentioned in the What You Should Know video,…it's assumed you know some basic programming skills.…First, open up the Exercise Files folder for this video.…And double click on HouseBuilding_SingleThreaded.…Then double click Source.…Locate the Visual studio Solution file…for HouseBuilding_SingleThreaded.…
It's the file with the .sln extension.…Double click it to open it up.…This will bring up the Visual Studio project,…which contains three files.…These files are tasks.h, tasks.cpp and main.cpp.…The first file we will focus on is tasks.h.…This defines the constants and functions…that we'll be using to create our virtual house.…The headers are included for access…to data types and functions.…#include windows.h is for the DWORD data type.…#include iostream is for outputting text…
- Looking at single-threaded source code
- Collecting CPU data
- Call-stack walking
- Inspecting thread activity
- Transforming a single-threaded app into a multithreaded app