Threads in C

10
Threads in C Using threads to structure programs in C.

description

Threads in C. Using threads to structure programs in C. Welcome to the family…. Optimizing C compiler and development tools for the entire Freescale ’08 family. C6808 Code Development System. C6808. Optimizing, standards-based C cross-compiler. - PowerPoint PPT Presentation

Transcript of Threads in C

Page 1: Threads in C

Threads in C

Using threads to structure programs in C.

Page 2: Threads in C

Welcome to the family…

C6808Code Development System

OptimizingC compiler and development tools for the entire Freescale ’08 family.

Page 3: Threads in C

C6808

• Optimizing, standards-basedC cross-compiler.

• Very tight code generation;“We win benchmarks”.

• Fixed-point transcendental library.

• Support for event-driven applications in C…

Page 4: Threads in C

Threads

• Execution paths with common state.• Event-driven.• Brings interrupt style

into general programming.• Fully compatible

with standard C.

Page 5: Threads in C

Hardware Event Expression DispatchACMPSC.ACF == 1&& state == READY

ISR() { /* Interrupt code */}

IRQ

THREAD() { /* Thread code */}

__DISPATCH();

Threads

• “Pseudo-hardware” allows event-driven programs.

Page 6: Threads in C

Hardware Event Expression DispatchACMPSC.ACF == 1&& state == READY

ISR() { /* Interrupt code */}

IRQ

THREAD() { /* Thread code */}

__DISPATCH();

Threads

• Dispatch on arbitrary expressions.

Page 7: Threads in C

Hardware Event Expression DispatchACMPSC.ACF == 1&& state == READY

ISR() { /* Interrupt code */}

IRQ

THREAD() { /* Thread code */}

__DISPATCH();

Threads

• Separate and organize dispatch and event code.

Page 8: Threads in C

Run-to-Completion

• Asynchronous programming costs resources.

• Less complex than an RTOS.

Page 9: Threads in C

[email protected]

AboutByte Craft Limited

• 30 years in the embedded marketplace.

• Our main products: C cross-compilers.

• Experts in code generation.

Page 10: Threads in C

Thank You.

http://www.bytecraft.com/Threads_in_C