Skip to Content
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
For Enterprise
For Government
For Higher Ed
For Individuals
For Marketing
Explore Skills
Cloud Computing
Microsoft Azure
Amazon Web Services (AWS)
Google Cloud
Cloud Migration
Cloud Deployment
Cloud Platforms
Data Engineering
Data Warehouse
SQL
Apache Spark
Microsoft SQL Server
MySQL
Kafka
Data Lake
Streaming & Messaging
NoSQL Databases
Relational Databases
Data Science
Pandas
R
MATLAB
SAS
D3
Power BI
Tableau
Statistics
Exploratory Data Analysis
Data Visualization
AI & ML
Generative AI
Machine Learning
Artificial Intelligence (AI)
Deep Learning
Reinforcement Learning
Natural Language Processing
TensorFlow
Scikit-Learn
Hyperparameter Tuning
MLOps
Programming Languages
Java
JavaScript
Spring
Python
Go
C#
C++
C
Swift
Rust
Functional Programming
Software Architecture
Object-Oriented
Distributed Systems
Domain-Driven Design
Architectural Patterns
IT/Ops
Kubernetes
Docker
GitHub
Terraform
Continuous Delivery
Continuous Integration
Database Administration
Computer Networking
Operating Systems
IT Certifications
Security
Network Security
Application Security
Incident Response
Zero Trust Model
Disaster Recovery
Penetration Testing / Ethical Hacking
Governance
Malware
Security Architecture
Security Engineering
Security Certifications
Design
Web Design
Graphic Design
Interaction Design
Film & Video
User Experience (UX)
Design Process
Design Tools
Business
Agile
Project Management
Product Management
Marketing
Human Resources
Finance
Team Management
Business Strategy
Digital Transformation
Organizational Leadership
Soft Skills
Professional Communication
Emotional Intelligence
Presentation Skills
Innovation
Critical Thinking
Public Speaking
Collaboration
Personal Productivity
Confidence / Motivation
Features
All features
Verifiable skills
AI Academy
Courses
Certifications
Interactive learning
Live events
Superstreams
Answers
Insights reporting
Radar Blog
Buy Courses
Plans
Sign In
Try Now
O'Reilly Platform
book
Computers as Components, 2nd Edition
by
Marilyn Wolf
July 2008
Intermediate to advanced
544 pages
16h 52m
English
Morgan Kaufmann
Content preview from
Computers as Components, 2nd Edition
6.2
Preemptive
Real-Time
Operating
Systems
315
(
void
)
ulCriticalNesting;
(
void
)
pxCurrentTCB;
}
Here
is
the
assembly
language
code
for
portRESTORE_CONTEXT:
LDR
R0,
=pxCurrentTCB
LDR
R0,
[R0]
LDR
LR,
[R0]
/*
The
critical
nesting
depth
is
the
first
item
on
the
stack.
*/
/*
Load
it
into
the
ulCriticalNesting
variable.
*/
LDR
R0,
=ulCriticalNesting
LDMFD
LR!,
{R1}
STR
R1,
[R0]
/*
Get
the
SPSR
from
the
stack.
*/
LDMFD
LR!,
{R0}
MSR
SPSR,
R0
/*
Restore
all
system
mode
registers
for
the
task.
*/
LDMFD
LR,
{R0-R14}
ˆ
NOP
/*
Restore
the
return
address.
*/
LDR
LR,
[LR,
#+60]
/*
And
return
-
correcting
the
offset
in
the
LR
to
obtain
the
*/
/*
correct
address.
*/
SUBS
PC,
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial
You might also like
Computers as Components, 3rd Edition
Marilyn Wolf
Computer System Designs: System-on-Chip
Michael J. Flynn, Wayne Luk
PC Hardware in a Nutshell, 3rd Edition
Robert Bruce Thompson, Barbara Fritchman Thompson
Embedded Systems Design, 2nd Edition
Steve Heath
Publisher Resources
ISBN: 9780123743978