Continuation-passing for C: a space-efficient implementation of concurrency - Archive ouverte HAL Accéder directement au contenu
Pré-Publication, Document De Travail Année : 2006

Continuation-passing for C: a space-efficient implementation of concurrency

Juliusz Chroboczek
  • Fonction : Auteur
  • PersonId : 838639

Résumé

Threads are a convenient abstraction for programming concurrent systems. They are however expensive, which leads many programmers to use coarse-grained concurrency where a fine-grained structure would be preferable, or use more cumbersome implementation techniques. Cooperative threads can be easily implemented in a language that provides {\em first-class continuations}. Unfortunately, CPS conversion, the standard technique for adding continuations to a language, is not natural for typical imperative languages. This paper defines a notion of CPS conversion for the C programming language. Continuation Passing C (CPC) is a concurrent extension of C with very cheap threads. It is implemented as a series of source-to-source transformations, including CPS conversion, that convert a threaded program in direct style into a purely sequential C program. In this paper, we describe CPC and the transformations that are used in its implementation.

Domaines

Informatique
Fichier principal
Vignette du fichier
cpc.pdf (88.78 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-00135160 , version 1 (06-03-2007)

Identifiants

  • HAL Id : hal-00135160 , version 1

Citer

Juliusz Chroboczek. Continuation-passing for C: a space-efficient implementation of concurrency. 2007. ⟨hal-00135160⟩
279 Consultations
240 Téléchargements

Partager

Gmail Facebook X LinkedIn More