FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Writing a fiber coroutine in C/C3
NewsTools

Writing a fiber coroutine in C/C3

via Dev.toNomota3w ago

I love Go language because of it's simplicity AND the goroutine . I always thinking of having similar thing in C or C3 language. D language provides a very lightweight simple-minded coroutine, in the name of Fiber, very clean API. Recently I also get interested in C3 language. A modern successor of C language, cleaner, safer, stronger. So I set out to implement Fiber for C3 language. There are 4 different way of implementing Fiber coroutine. (1) Calling assembly code for context switching, (2) Using ucontext library on POSIX systems, (3) Using sigsetjmp/siglongjmp on POSIX, (4) Using native Fiber on windows. Fiber coroutine using Assembly Calling assembly code is extremely lightweight, but it is not very easy to maintain assembly codes for all architectures. For my case, I decided to cover only X86_64 and AARCH64, because they are most frequent platforms. Another issue with C3/inline assembly is that C3's assembly coverage is limited and it's not easy to express required inline assembl

Continue reading on Dev.to

Opens in a new tab

Read Full Article
13 views

Related Articles

Retrospec Judd Rev 2 Electric Folding Bike Review: Affordable, Simple, Easy to Store
News

Retrospec Judd Rev 2 Electric Folding Bike Review: Affordable, Simple, Easy to Store

Wired • 4h ago

These car gadgets are worth every penny
News

These car gadgets are worth every penny

ZDNet • 5h ago

These Are the 4 Artemis II Astronauts Leading the Historic Return to the Moon
News

These Are the 4 Artemis II Astronauts Leading the Historic Return to the Moon

Wired • 5h ago

Taylor Lorenz’s Screen Time Is Almost 17 Hours a Day
News

Taylor Lorenz’s Screen Time Is Almost 17 Hours a Day

Wired • 5h ago

RSpec Best Practices in 2026: Factory Bot + VCR Cassettes
News

RSpec Best Practices in 2026: Factory Bot + VCR Cassettes

Medium Programming • 5h ago

Discover More Articles