Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Embedded Linux Essentials Handbook

You're reading from   Embedded Linux Essentials Handbook Build embedded Linux systems and real-world apps with Yocto, Buildroot, and RPi

Arrow left icon
Product type Paperback
Published in Jan 2026
Publisher Packt
ISBN-13 9781835469309
Length 450 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Mohammed Billoo Mohammed Billoo
Author Profile Icon Mohammed Billoo
Mohammed Billoo
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface
1. Part I: Getting Started with Embedded Linux
2. Exploring Embedded Linux’s Architecture and Its Use Cases FREE CHAPTER 3. Learning About U-Boot 4. Navigating the Linux Kernel 5. Describing Hardware Using the Devicetree 6. Part II: Building an Embedded Linux Image
7. Exploring Frameworks to Build an Image 8. Building an Image Using the Yocto Project 9. Building an Image Using Buildroot 10. Part III: Developing Applications
11. Building, Debugging, and Launching Applications on Startup 12. Project 1: Using Python to Build a Web Server to Display Sensor Data 13. Project 2: Using Qt to Build a Scientific Instrument 14. Project 3: Using Qt to Build a Medical Device 15. Part IV: Advanced Topics, Implementing CI/CD, Best Practices, and Looking Ahead
16. Debugging the Linux Kernel 17. Securing Code Execution with eBPF 18. Rust in Embedded Linux: The Kernel and Applications 19. Implementing Continuous Integration/Continuous Delivery (CI/CD) 20. Looking to the Future 21. Unlock Your Exclusive Benefits
22. Other Books You May Enjoy
23. Index

lockdep: debugging deadlocks

Locking mechanisms are often used in embedded systems to ensure that hardware resources are not accessed simultaneously. As embedded software engineers, we know that incorrectly using locking mechanisms can result in a deadlock. A deadlock occurs when a system stalls because multiple software entities are vying for the same hardware resource. The following figure shows how a deadlock may occur (borrowed from https://www.mathworks.com/products/polyspace/static-analysis-notes/what-deadlocks-how-prevent-during-software-development.html):

Figure 12.7 – Deadlock occurrence

Figure 12.7 – Deadlock occurrence

The following sequence occurs in the preceding figure:

  1. Task 1 uses Mutex #1 to lock Shared Resource #1. Task 1 attempts to use Mutex #2 to lock Shared Resource #2.
  2. Task 2 preempts Task 1 and uses Mutex #2 to lock Shared Resource #2.
  3. Then, Task 2 attempts to use Mutex #1 to lock Shared Resource #1. However, since Task 1 is already holding the lock...
lock icon The rest of the chapter is locked
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Embedded Linux Essentials Handbook
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon