Changes in / [b0ab7853:256728f]
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/concurrency/Paper.tex
rb0ab7853 r256728f 2 2 3 3 \articletype{RESEARCH ARTICLE}% 4 5 % Referees 6 % Doug Lea, dl@cs.oswego.edu, SUNY Oswego 7 % Herb Sutter, hsutter@microsoft.com, Microsoft Corp 8 % Gor Nishanov, gorn@microsoft.com, Microsoft Corp 9 % James Noble, kjx@ecs.vuw.ac.nz, Victoria University of Wellington, School of Engineering and Computer Science 4 10 5 11 \received{XXXXX} … … 312 318 As a result, languages like Java, Scala, Objective-C~\cite{obj-c-book}, \CCeleven~\cite{C11}, and C\#~\cite{Csharp} adopt the 1:1 kernel-threading model, with a variety of presentation mechanisms. 313 319 From 2000 onwards, languages like Go~\cite{Go}, Erlang~\cite{Erlang}, Haskell~\cite{Haskell}, D~\cite{D}, and \uC~\cite{uC++,uC++book} have championed the M:N user-threading model, and many user-threading libraries have appeared~\cite{Qthreads,MPC,Marcel}, including putting green threads back into Java~\cite{Quasar}. 314 The main argument for user-level threading is that they are lighter weight than kernel threads(locking and context switching do not cross the kernel boundary), so there is less restriction on programming styles that encourage large numbers of threads performing medium work units to facilitate load balancing by the runtime~\cite{Verch12}.320 The main argument for user-level threading is that it is lighter weight than kernel threading (locking and context switching do not cross the kernel boundary), so there is less restriction on programming styles that encourage large numbers of threads performing medium work units to facilitate load balancing by the runtime~\cite{Verch12}. 315 321 As well, user-threading facilitates a simpler concurrency approach using thread objects that leverage sequential patterns versus events with call-backs~\cite{Adya02,vonBehren03}. 316 322 Finally, performant user-threading implementations (both time and space) meet or exceed direct kernel-threading implementations, while achieving the programming advantages of high concurrency levels and safety. … … 669 675 In contrast, the execution state is large, with one @resume@ and seven @suspend@s. 670 676 Hence, the key benefits of the generator are correctness, safety, and maintenance because the execution states are transcribed directly into the programming language rather than using a table-driven approach. 671 Because FSMs can be complex and frequently occur in important domains, direct support of the generator is crucialin a system programming language.677 Because FSMs can be complex and frequently occur in important domains, direct generator support is important in a system programming language. 672 678 673 679 \begin{figure} … … 796 802 This semantics is basically a tail-call optimization, which compilers already perform. 797 803 The example shows the assembly code to undo the generator's entry code before the direct jump. 798 This assembly code depends on what entry code is generated, specifically if there are local variables ,and the level of optimization.804 This assembly code depends on what entry code is generated, specifically if there are local variables and the level of optimization. 799 805 To provide this new calling convention requires a mechanism built into the compiler, which is beyond the scope of \CFA at this time. 800 806 Nevertheless, it is possible to hand generate any symmetric generators for proof of concept and performance testing. -
libcfa/prelude/builtins.c
rb0ab7853 r256728f 10 10 // Created On : Fri Jul 21 16:21:03 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Mar 26 23:10:36201913 // Update Count : 9 512 // Last Modified On : Tue Jun 25 18:06:52 2019 13 // Update Count : 97 14 14 // 15 15 … … 49 49 void abort( const char fmt[], ... ) __attribute__ (( format(printf, 1, 2), __nothrow__, __leaf__, __noreturn__ )); 50 50 51 // i ncrement/decrement unification51 // implicit increment, decrement if += defined, and implicit not if != defined 52 52 53 53 static inline { … … 63 63 forall( dtype DT | sized(DT) | { void ?{}( DT &, DT ); void ^?{}( DT & ); DT & ?-=?( DT &, one_t ); } ) 64 64 DT & ?--( DT & x ) { DT tmp = x; x -= 1; return tmp; } 65 66 forall( dtype DT | { int ?!=?( const DT &, zero_t ); } ) 67 int !?( const DT & x ) { return !( x != 0 ); } 65 68 } // distribution 66 69 -
libcfa/src/bits/containers.hfa
rb0ab7853 r256728f 9 9 // Author : Thierry Delisle 10 10 // Created On : Tue Oct 31 16:38:50 2017 11 // Last Modified By : --12 // Last Modified On : --13 // Update Count : 011 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 26 08:52:20 2019 13 // Update Count : 4 14 14 15 15 #pragma once … … 115 115 } 116 116 return top; 117 } 118 119 forall(dtype T | is_node(T)) 120 static inline int ?!=?( const __stack(T) & this, __attribute__((unused)) zero_t zero ) { 121 return this.top != 0; 117 122 } 118 123 #endif … … 186 191 187 192 forall(dtype T | is_node(T)) 188 static inline bool ?!=?(__queue(T) & this, __attribute__((unused)) zero_t zero ) {193 static inline int ?!=?( const __queue(T) & this, __attribute__((unused)) zero_t zero ) { 189 194 return this.head != 0; 190 195 } … … 268 273 269 274 forall(dtype T | sized(T)) 270 static inline bool ?!=?(__dllist(T) & this, __attribute__((unused)) zero_t zero ) {275 static inline int ?!=?( const __dllist(T) & this, __attribute__((unused)) zero_t zero ) { 271 276 return this.head != 0; 272 277 } -
libcfa/src/stdlib.cfa
rb0ab7853 r256728f 10 10 // Created On : Thu Jan 28 17:10:29 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 12 08:03:59 201813 // Update Count : 4 5812 // Last Modified On : Mon Jun 24 17:34:44 2019 13 // Update Count : 462 14 14 // 15 15 … … 65 65 forall( dtype T | sized(T), ttype Params | { void ?{}( T &, Params ); } ) 66 66 T * anew( size_t dim, Params p ) { 67 T * arr = alloc( dim );67 T * arr = alloc( dim ); 68 68 for ( unsigned int i = 0; i < dim; i += 1 ) { 69 69 (arr[i]){ p }; // run constructor -
tests/.expect/completeTypeError.txt
rb0ab7853 r256728f 27 27 void 28 28 ) 29 Environment:( _8 2_4_DT ) -> instance of struct A with body 0 (no widening)29 Environment:( _83_4_DT ) -> instance of struct A with body 0 (no widening) 30 30 31 31 … … 50 50 void 51 51 ) 52 Environment:( _8 2_4_DT ) -> instance of struct B with body 1 (no widening)52 Environment:( _83_4_DT ) -> instance of struct B with body 1 (no widening) 53 53 54 54 … … 127 127 void 128 128 ) 129 Environment:( _10 1_0_T ) -> instance of type T (not function type) (no widening)129 Environment:( _102_0_T ) -> instance of type T (not function type) (no widening) 130 130 131 131 Could not satisfy assertion: 132 132 ?=?: pointer to function 133 133 ... with parameters 134 reference to instance of type _10 1_0_T (not function type)135 instance of type _10 1_0_T (not function type)134 reference to instance of type _102_0_T (not function type) 135 instance of type _102_0_T (not function type) 136 136 ... returning 137 _retval__operator_assign: instance of type _10 1_0_T (not function type)137 _retval__operator_assign: instance of type _102_0_T (not function type) 138 138 ... with attributes: 139 139 Attribute with name: unused
Note: See TracChangeset
for help on using the changeset viewer.