{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2023,9,2]],"date-time":"2023-09-02T13:44:55Z","timestamp":1693662295417},"reference-count":97,"publisher":"Wiley","issue":"5","license":[{"start":{"date-parts":[[2020,12,1]],"date-time":"2020-12-01T00:00:00Z","timestamp":1606780800000},"content-version":"vor","delay-in-days":0,"URL":"http:\/\/onlinelibrary.wiley.com\/termsAndConditions#vor"}],"funder":[{"DOI":"10.13039\/501100000038","name":"Natural Sciences and Engineering Research Council of Canada","doi-asserted-by":"publisher","id":[{"id":"10.13039\/501100000038","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["onlinelibrary.wiley.com"],"crossmark-restriction":true},"short-container-title":["Softw Pract Exp"],"published-print":{"date-parts":[[2021,5]]},"abstract":"Summary<\/jats:title>C<\/jats:styled-content>\u2200<\/jats:styled-content> is a polymorphic, nonobject\u2010oriented, concurrent, backwards compatible extension of the C programming language. This paper discusses the design philosophy and implementation of its advanced control\u2010flow and concurrent\/parallel features, along with the supporting runtime written in C<\/jats:styled-content>\u2200<\/jats:styled-content>. These features are created from scratch as ISO C has only low\u2010level and\/or unimplemented concurrency, so C programmers continue to rely on library approaches like pthreads. C<\/jats:styled-content>\u2200<\/jats:styled-content> introduces modern language\u2010level control\u2010flow mechanisms, like generators, coroutines, user\u2010level 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\u2010free way, and this feature is fully integrated with all monitor synchronization mechanisms. All control\u2010flow features integrate with the C<\/jats:styled-content>\u2200<\/jats:styled-content> polymorphic type\u2010system 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.<\/jats:p>","DOI":"10.1002\/spe.2925","type":"journal-article","created":{"date-parts":[[2020,12,2]],"date-time":"2020-12-02T08:23:30Z","timestamp":1606897410000},"page":"1005-1042","update-policy":"http:\/\/dx.doi.org\/10.1002\/crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["Advanced control\u2010flow and concurrency in C\u2200"],"prefix":"10.1002","volume":"51","author":[{"given":"Thierry","family":"Delisle","sequence":"first","affiliation":[{"name":"Cheriton School of Computer Science University of Waterloo Waterloo Ontario Canada"}]},{"ORCID":"http:\/\/orcid.org\/0000-0003-3747-9281","authenticated-orcid":false,"given":"Peter A.","family":"Buhr","sequence":"additional","affiliation":[{"name":"Cheriton School of Computer Science University of Waterloo Waterloo Ontario Canada"}]}],"member":"311","published-online":{"date-parts":[[2020,12]]},"reference":[{"key":"e_1_2_11_2_1","doi-asserted-by":"publisher","DOI":"10.1002\/spe.2624"},{"key":"e_1_2_11_3_1","unstructured":"C\u2200Features.https:\/\/plg.uwaterloo.ca\/\u223ccforall\/features. Accessed Nov 25 2020."},{"key":"e_1_2_11_4_1","unstructured":"Scala language specification version 2.11. \u00c9cole Polytechnique F\u00e9d\u00e9rale de Lausanne;2016.http:\/\/www.scala\u2010lang.org\/files\/archive\/spec\/2.11. Accessed Nov 25 2020."},{"key":"e_1_2_11_5_1","unstructured":"TIOBE Index. http:\/\/www.tiobe.com\/tiobe_index. Accessed Nov 25 2020."},{"key":"e_1_2_11_6_1","volume-title":"C Programming Language ISO\/IEC 9889:2011\u201012","year":"2012"},{"key":"e_1_2_11_7_1","doi-asserted-by":"crossref","first-page":"5:1","DOI":"10.1145\/3290318","article-title":"Abstraction\u2010safe Effect Handlers via Tunneling","volume":"3","author":"Zhang Y","year":"2019","journal-title":"Proc ACM Program Lang"},{"key":"e_1_2_11_8_1","volume-title":"\u03bcC++ Annotated Reference Manual, Version 7.0.0","author":"Buhr Peter A","year":"2018"},{"key":"e_1_2_11_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/366663.366704"},{"key":"e_1_2_11_10_1","volume-title":"Fundamental Algorithms The Art of Computer Programming","author":"Knuth Donald E","year":"1973"},{"key":"e_1_2_11_11_1","volume-title":"Simula67 Common Base Language","author":"Dahl O\u2010J","year":"1970"},{"key":"e_1_2_11_12_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-10256-6"},{"key":"e_1_2_11_13_1","volume-title":"CLU Reference Manual Lecture Notes in Computer Science","author":"Liskov B","year":"1981"},{"key":"e_1_2_11_14_1","first-page":"334","volume-title":"C# Language Specification","author":"ECMA International Standardizing Information and Communication Systems","year":"2006"},{"key":"e_1_2_11_15_1","unstructured":"RubyRuby documentation release 2.6.0. Python Software Foundation. https:\/\/www.ruby\u2010lang.or g\/en\/documentation.2018. Accessed Nov 25 2020."},{"key":"e_1_2_11_16_1","unstructured":"PythonPython language reference release 3.7.2. Python Software Foundation;2018.https:\/\/docs.python.org\/3\/reference\/index.html. Accessed Nov 25 2020."},{"key":"e_1_2_11_17_1","volume-title":"ECMAScript 2015 Language Specification JavaScript","author":"ECAM International","year":"2015"},{"key":"e_1_2_11_18_1","unstructured":"LuaLua 5.3 reference manual. https:\/\/www.lua.org\/manual\/5.3.2018. Accessed Nov 25 2020."},{"key":"e_1_2_11_19_1","unstructured":"cppreference.comCoroutines (C++20);2019. https:\/\/en.cppreference.com\/w\/cpp\/language\/coroutines. Accessed Nov 25 2020."},{"key":"e_1_2_11_20_1","doi-asserted-by":"publisher","DOI":"10.1002\/cpe.885"},{"key":"e_1_2_11_21_1","unstructured":"The Open Group. Pthread.h Specifications Issue 7 IEEE Std 1003.1\u20102017;2018. IEEE.http:\/\/pubs.opengroup.org\/onlinepubs\/9699919799\/basedefs\/pthread.h.html. Accessed Nov 25 2020."},{"key":"e_1_2_11_22_1","unstructured":"Threading model. thread (computing) https:\/\/en.wikipedia.org\/wiki\/Thread_(computing). Accessed Nov 25 2020."},{"key":"e_1_2_11_23_1","unstructured":"DrepperU MolnarI. The native POSIX thread library for linux Red Hat;2003.http:\/\/www.cs.utexas.edu\/\u223cwitchel\/372\/lectures\/POSIX_Linux_Threading.pdf. Accessed Nov 25 2020."},{"key":"e_1_2_11_24_1","doi-asserted-by":"crossref","unstructured":"Multithreading models. JDK 1.1 for Solaris developer's guide;2010.https:\/\/docs.oracle.com\/cd\/E19455\u201001\/806\u20103461\/6jck06gqk\/index.html#ch2mt\u201041. Accessed Nov 25 2020.","DOI":"10.3934\/mine.2020001"},{"key":"e_1_2_11_25_1","unstructured":"Objective\u2010C;2014.https:\/\/developer.apple.com\/library\/archive\/documentation\/Cocoa\/Conceptual\/ProgrammingWithObjectiveC. Accessed Nov 25 2020."},{"key":"e_1_2_11_26_1","unstructured":"Rust programming language;2015. https:\/\/doc.rust\u2010lang.org\/reference.html. Accessed Nov 25 2020."},{"key":"e_1_2_11_27_1","unstructured":"GriesemerR PikeR ThompsonK. Go programming language. Google;2009.http:\/\/golang.org\/ref\/spec. Accessed Nov 25 2020."},{"key":"e_1_2_11_28_1","unstructured":"ErlangAB.Erlang\/OTP system documentation 8.1;2016.http:\/\/erlang.org\/doc\/pdf\/otp\u2010system\u2010documentation.pdf. Accessed Nov 25 2020."},{"key":"e_1_2_11_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/130697.130698"},{"key":"e_1_2_11_30_1","volume-title":"D Programming Language","author":"Bright W","year":"2016"},{"key":"e_1_2_11_31_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-25703-7"},{"key":"e_1_2_11_32_1","unstructured":"QuasarQuasar documentation release 0.8.0. Parallel Universe;2018. http:\/\/docs.paralleluniverse.co\/quasar. Accessed Nov 25 2020."},{"key":"e_1_2_11_33_1","doi-asserted-by":"crossref","unstructured":"WheelerKB MurphyRC ThainD. Qthreads: an API for programming with millions of lightweight threads. Paper presented at: Proceedings of the International Symposium on Parallel and Distributed Processing;2008; Miami FL IEEE.","DOI":"10.1109\/IPDPS.2008.4536359"},{"key":"e_1_2_11_34_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-85451-7_9"},{"key":"e_1_2_11_35_1","unstructured":"GabrielAntoniuMarcel Thread Library2011.https:\/\/gforge.inria.fr\/frs\/download.php\/file\/28643\/marcel\u20102.99.3.tar.gz. Accessed Nov 25 2020."},{"key":"e_1_2_11_36_1","unstructured":"VechS. Performance analysis of 64\u2010Bit Capriccio;2012. http:\/\/cs.brown.edu\/research\/pubs\/theses\/masters\/2012\/verch.pdf. Accessed Nov 25 2020"},{"key":"e_1_2_11_37_1","unstructured":"AdyaA HowellJ TheimerM BoloskyWJ. DouceurJR. Cooperative task management without manual stack management. Paper presented at: Proceedings of the General Track USENIX Technical Conference ATEC '02. USENIX Association;2002:289\u2010302; Berkeley CA."},{"key":"e_1_2_11_38_1","unstructured":"BehrenR ConditJ BrewerE. Why events are a bad idea (for high\u2010concurrency servers). Paper presented at: Proceedings of the HotOS IX: The 9th Workshop on Hot Topics in Operating Systems;2003:19\u201024; USENIX Association Lihue Hawaii."},{"issue":"2","key":"e_1_2_11_39_1","first-page":"117","article-title":"Are safe concurrency libraries possible?","volume":"38","author":"Buhr PA","year":"1995","journal-title":"Commun ACM"},{"key":"e_1_2_11_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/1064978.1065042"},{"key":"e_1_2_11_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/2076450.2076465"},{"key":"e_1_2_11_42_1","first-page":"10598","volume-title":"Hermes: A Language for Distributed Computing","author":"Strom RE","year":"1990"},{"key":"e_1_2_11_43_1","unstructured":"C Programming Language ISO\/IEC 9899:1999(E).2nd. Geneva Switzerland: International Standard Organization;1999.https:\/\/webstore.ansi.org\/Standards\/INCITS\/INCITSISOIEC98991999R2005."},{"key":"e_1_2_11_44_1","doi-asserted-by":"publisher","DOI":"10.1145\/4472.4478"},{"key":"e_1_2_11_45_1","doi-asserted-by":"publisher","DOI":"10.1002\/spe.4380110504"},{"key":"e_1_2_11_46_1","volume-title":"Programming with POSIX Threads, Professional Computing","author":"Butenhof DR","year":"1997"},{"key":"e_1_2_11_47_1","unstructured":"gcc Extension. labels as values. https:\/\/gcc.gnu.org\/onlinedocs\/gcc\/Labels\u2010as\u2010Values.html. since gcc\u20103. Accessed Nov 25 2020."},{"key":"e_1_2_11_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/1047915.1047919"},{"key":"e_1_2_11_49_1","doi-asserted-by":"publisher","DOI":"10.1109\/TR.2019.2916204"},{"key":"e_1_2_11_50_1","unstructured":"NishanovG. Merge coroutines TS into C++20 working draft;2019.http:\/\/www.open\u2010std.org\/jtc1\/sc22\/wg21\/docs\/papers\/2019\/p0912r5.html. Accessed Nov 25 2020."},{"key":"e_1_2_11_51_1","unstructured":"CS343.2018.https:\/\/www.student.cs.uwaterloo.ca\/\u223ccs343. Accessed Nov 25 2020."},{"key":"e_1_2_11_52_1","unstructured":"AlexCornejolibdill thread library;2019. http:\/\/libdill.org\/libdill\u20102.14.tar.gz. Accessed Nov 25 2020"},{"key":"e_1_2_11_53_1","first-page":"43","volume-title":"Cooperating Sequential Processes","author":"Dijkstra EW","year":"1965"},{"key":"e_1_2_11_54_1","doi-asserted-by":"publisher","DOI":"10.1007\/PL00008918"},{"key":"e_1_2_11_55_1","doi-asserted-by":"publisher","DOI":"10.1145\/362759.362813"},{"key":"e_1_2_11_56_1","doi-asserted-by":"publisher","DOI":"10.1016\/0167-6423(89)90013-0"},{"key":"e_1_2_11_57_1","doi-asserted-by":"publisher","DOI":"10.1145\/363095.363143"},{"key":"e_1_2_11_58_1","volume-title":"The Specification of Process Synchronization by Path Expressions Lecture Notes in Computer Science","author":"Campbell RH","year":"1974"},{"key":"e_1_2_11_59_1","doi-asserted-by":"crossref","unstructured":"HochsteinL CarverJ ShullF et al. Parallel programmer productivity: a case study of novice parallel programmers. Paper presented at: Proceedings of the Supercomputing 2005. Proceedings of the ACM\/IEEE SC 2005 Conference Seattle WA: IEEE;2005:35.","DOI":"10.1109\/SC.2005.53"},{"key":"e_1_2_11_60_1","volume-title":"The Thoth System: Multi\u2010Process Structuring and Portability","author":"Cheriton DR","year":"1982"},{"key":"e_1_2_11_61_1","volume-title":"Using the Harmony Operating System","author":"Gentleman WM","year":"1985"},{"key":"e_1_2_11_62_1","doi-asserted-by":"publisher","DOI":"10.1145\/42392.42400"},{"key":"e_1_2_11_63_1","unstructured":"Message Passing Interface ForumUniversity of Tennessee Knoxville A Message\u2010Passing Interface Standard Version 3.1; Tennessee MPI;2015.http:\/\/www.mpi\u2010forum.org\/docs\/mpi\u20103.1\/mpi31\u2010report.pdf. Accessed Nov 25 2020"},{"key":"e_1_2_11_64_1","doi-asserted-by":"publisher","DOI":"10.1145\/359576.359585"},{"key":"e_1_2_11_65_1","unstructured":"LightbendI. Akka Scala documentation release 2.4.11.2016.http:\/\/doc.akka.io\/docs\/akka\/2.4\/AkkaScala.pdf. Accessed Nov 25 2020"},{"key":"e_1_2_11_66_1","doi-asserted-by":"publisher","DOI":"10.1145\/173682.165164"},{"issue":"3","key":"e_1_2_11_67_1","first-page":"144","article-title":"Quantitative comparison of hardware transactional memory for blue gene\/Q, zEnterprise EC12, Intel Core, and POWER8","volume":"43","author":"Nakaike T","year":"2015","journal-title":"SIGARCH Comput Arch News"},{"key":"e_1_2_11_68_1","unstructured":"Tech. Spec. for C++ Extensions for Transactional Memory ISO\/IEC TS 19841:2015; 2015. International Standard Organization. Geneva Switzerland.https:\/\/www.iso.org\/standard\/66343.html. Accessed Nov 25 2020."},{"key":"e_1_2_11_69_1","doi-asserted-by":"publisher","DOI":"10.1145\/1454456.1454466"},{"key":"e_1_2_11_70_1","unstructured":"BoehmHans\u2010J. Transactional Memory Should Be an Implementation Technique Not a Programming Interface. In: Proceedings of the First USENIX Conference on Hot Topics in Parallelism HotPar'09. USENIX Association;2009; Berkeley CA USA."},{"key":"e_1_2_11_71_1","volume-title":"Operating System Principles","author":"Brinch HP","year":"1973"},{"key":"e_1_2_11_72_1","doi-asserted-by":"publisher","DOI":"10.1145\/355620.361161"},{"key":"e_1_2_11_73_1","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.1975.6312840"},{"key":"e_1_2_11_74_1","volume-title":"Mesa Language Manual Technical Report\u00a0CSL\u201379\u20133","author":"Mitchell JG","year":"1979"},{"key":"e_1_2_11_75_1","volume-title":"Programming in Modula\u20102. Texts and Monographs in Computer Science","author":"Wirth N","year":"1988"},{"key":"e_1_2_11_76_1","doi-asserted-by":"publisher","DOI":"10.1145\/53580.53581"},{"key":"e_1_2_11_77_1","series-title":"Prentice\u2010Hall Series in Innovative Technology","volume-title":"Systems Programming with Modula\u20103","author":"Birrell A","year":"1991"},{"key":"e_1_2_11_78_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-1-4612-3606-1"},{"key":"e_1_2_11_79_1","doi-asserted-by":"publisher","DOI":"10.1002\/spe.4380210107"},{"key":"e_1_2_11_80_1","doi-asserted-by":"publisher","DOI":"10.1002\/spe.4380220204"},{"key":"e_1_2_11_81_1","volume-title":"The Java Language Specification","author":"Gosling J","year":"2000"},{"key":"e_1_2_11_82_1","unstructured":"Bank Account Transfer Problem Wiki Wiki Web;2010.http:\/\/wiki.c2.com\/?BankAccountTransferProblem. Accessed Nov 25 2020."},{"key":"e_1_2_11_83_1","doi-asserted-by":"publisher","DOI":"10.1145\/850644.850645"},{"key":"e_1_2_11_84_1","doi-asserted-by":"crossref","unstructured":"DiceD LevY MaratheVJ MoirM NussbaumD OlszewskiM. Simplifying concurrent algorithms by exploiting hardware transactional memory. Paper presented at: Proceedings of the 22nd Annual ACM Symposium on Parallelism in Algorithms and Architectures SPAA'10;2010:325\u2010334; ACM New York NY.","DOI":"10.1145\/1810479.1810537"},{"key":"e_1_2_11_85_1","doi-asserted-by":"publisher","DOI":"10.1145\/214037.214100"},{"key":"e_1_2_11_86_1","doi-asserted-by":"publisher","DOI":"10.1145\/42192.42324"},{"key":"e_1_2_11_87_1","doi-asserted-by":"publisher","DOI":"10.1002\/spe.4380181205"},{"key":"e_1_2_11_88_1","doi-asserted-by":"publisher","DOI":"10.1002\/spe.4380200906"},{"key":"e_1_2_11_89_1","unstructured":"Linux man page \u2010 sched_setaffinity(2).https:\/\/man7.org\/linux\/man\u2010pages\/man2\/schedsetaffinity.2.html. Accessed Nov 25 2020."},{"key":"e_1_2_11_90_1","unstructured":"Windows (vs.85) \u2010 SetThreadAffinityMask function.https:\/\/docs.microsoft.com\/en\u2010us\/windows\/win32\/api\/winbase\/nf\u2010winbase\u2010setthreadaffinitymask. Accessed Nov 25 2020."},{"key":"e_1_2_11_91_1","unstructured":"C\u2200Benchmarks.https:\/\/github.com\/cforall\/ConcurrentBenchmarks_SPE20. Accessed Nov 25 2020."},{"key":"e_1_2_11_92_1","doi-asserted-by":"publisher","DOI":"10.1145\/354222.353174"},{"key":"e_1_2_11_93_1","doi-asserted-by":"crossref","unstructured":"DuanY FuG ZhouN SunX NarendraNC HuB. Everything as a service (XaaS) on the cloud: origins current and future trends. Paper presented at: Proceedings of the 2015 IEEE 8th International Conference on Cloud Computing CLOUD'15 Computer Society;2015:621\u2013628. IEEE; Washington DC.","DOI":"10.1109\/CLOUD.2015.88"},{"key":"e_1_2_11_94_1","unstructured":"Node.jshttps:\/\/nodejs.org\/en\/. Accessed Nov 25 2020."},{"key":"e_1_2_11_95_1","unstructured":"Spring Web MVChttps:\/\/docs.spring.io\/spring\/docs\/current\/spring\u2010framework\u2010reference\/web.html. Accessed Nov 25 2020."},{"key":"e_1_2_11_96_1","unstructured":"Djangohttps:\/\/www.djangoproject.com\/. Accessed Nov 25 2020."},{"key":"e_1_2_11_97_1","doi-asserted-by":"publisher","DOI":"10.1145\/960116.54016"},{"key":"e_1_2_11_98_1","volume-title":"Programming Languages","author":"Genuys F","year":"1968"}],"container-title":["Software: Practice and Experience"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/onlinelibrary.wiley.com\/doi\/pdf\/10.1002\/spe.2925","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/onlinelibrary.wiley.com\/doi\/full-xml\/10.1002\/spe.2925","content-type":"application\/xml","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/onlinelibrary.wiley.com\/doi\/pdf\/10.1002\/spe.2925","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2023,9,1]],"date-time":"2023-09-01T15:33:24Z","timestamp":1693582404000},"score":1,"resource":{"primary":{"URL":"https:\/\/onlinelibrary.wiley.com\/doi\/10.1002\/spe.2925"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2020,12]]},"references-count":97,"journal-issue":{"issue":"5","published-print":{"date-parts":[[2021,5]]}},"alternative-id":["10.1002\/spe.2925"],"URL":"https:\/\/doi.org\/10.1002\/spe.2925","archive":["Portico"],"relation":{},"ISSN":["0038-0644","1097-024X"],"issn-type":[{"value":"0038-0644","type":"print"},{"value":"1097-024X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2020,12]]},"assertion":[{"value":"2019-06-26","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2020-10-15","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2020-12-01","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}