Threads in C
-
Upload
meredith-moss -
Category
Documents
-
view
26 -
download
2
description
Transcript of Threads in C
Threads in C
Using threads to structure programs in C.
Welcome to the family…
C6808Code Development System
OptimizingC compiler and development tools for the entire Freescale ’08 family.
C6808
• Optimizing, standards-basedC cross-compiler.
• Very tight code generation;“We win benchmarks”.
• Fixed-point transcendental library.
• Support for event-driven applications in C…
Threads
• Execution paths with common state.• Event-driven.• Brings interrupt style
into general programming.• Fully compatible
with standard C.
Hardware Event Expression DispatchACMPSC.ACF == 1&& state == READY
ISR() { /* Interrupt code */}
IRQ
THREAD() { /* Thread code */}
__DISPATCH();
Threads
• “Pseudo-hardware” allows event-driven programs.
Hardware Event Expression DispatchACMPSC.ACF == 1&& state == READY
ISR() { /* Interrupt code */}
IRQ
THREAD() { /* Thread code */}
__DISPATCH();
Threads
• Dispatch on arbitrary expressions.
Hardware Event Expression DispatchACMPSC.ACF == 1&& state == READY
ISR() { /* Interrupt code */}
IRQ
THREAD() { /* Thread code */}
__DISPATCH();
Threads
• Separate and organize dispatch and event code.
Run-to-Completion
• Asynchronous programming costs resources.
• Less complex than an RTOS.
AboutByte Craft Limited
• 30 years in the embedded marketplace.
• Our main products: C cross-compilers.
• Experts in code generation.
Thank You.
http://www.bytecraft.com/Threads_in_C