Advanced control‐flow and concurrency in C

Summary C∀ is a polymorphic, nonobject‐oriented, concurrent, backwards compatible extension of the C programming language. This paper discusses the design philosophy and implementation of its advanced control‐flow and concurrent/parallel features, along with the supporting runtime written in C∀. The...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Software, practice & experience practice & experience, 2021-05, Vol.51 (5), p.1005-1042
Hauptverfasser: Delisle, Thierry, Buhr, Peter A.
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:Summary C∀ is a polymorphic, nonobject‐oriented, concurrent, backwards compatible extension of the C programming language. This paper discusses the design philosophy and implementation of its advanced control‐flow and concurrent/parallel features, along with the supporting runtime written in C∀. These features are created from scratch as ISO C has only low‐level and/or unimplemented concurrency, so C programmers continue to rely on library approaches like pthreads. C∀ introduces modern language‐level control‐flow mechanisms, like generators, coroutines, user‐level threading, and monitors for mutual exclusion and synchronization. The runtime provides significant programmer simplification and safety by eliminating spurious wakeup and monitor barging. The runtime also ensures multiple monitors can be safely acquired in a deadlock‐free way, and this feature is fully integrated with all monitor synchronization mechanisms. All control‐flow features integrate with the C∀ polymorphic type‐system and exception handling, while respecting the expectations and style of C programmers. Experimental results show comparable performance of the new features with similar mechanisms in other concurrent programming languages.
ISSN:0038-0644
1097-024X
DOI:10.1002/spe.2925