Changes in / [ff2d1139:ee2938a]
- Location:
- src
- Files:
-
- 8 edited
-
SymTab/Mangler.cc (modified) (1 diff)
-
libcfa/Makefile.in (modified) (2 diffs)
-
libcfa/concurrency/alarm.c (modified) (2 diffs)
-
libcfa/concurrency/alarm.h (modified) (1 diff)
-
libcfa/concurrency/coroutine.c (modified) (2 diffs)
-
libcfa/concurrency/kernel.c (modified) (1 diff)
-
libcfa/concurrency/monitor (modified) (1 diff)
-
libcfa/concurrency/monitor.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SymTab/Mangler.cc
rff2d1139 ree2938a 99 99 Mangler::Mangler( bool mangleOverridable, bool typeMode, bool mangleGenericParams ) 100 100 : nextVarNum( 0 ), isTopLevel( true ), mangleOverridable( mangleOverridable ), typeMode( typeMode ), mangleGenericParams( mangleGenericParams ) {} 101 102 Mangler::Mangler( const Mangler &rhs ) : mangleName() { 103 varNums = rhs.varNums; 104 nextVarNum = rhs.nextVarNum; 105 isTopLevel = rhs.isTopLevel; 106 mangleOverridable = rhs.mangleOverridable; 107 typeMode = rhs.typeMode; 108 } 101 109 102 110 void Mangler::mangleDecl( DeclarationWithType * declaration ) { -
src/libcfa/Makefile.in
rff2d1139 ree2938a 263 263 containers/result containers/vector concurrency/coroutine \ 264 264 concurrency/thread concurrency/kernel concurrency/monitor \ 265 ${shell find stdhdr -type f -printf "%p "} math gmp \ 266 bits/align.h bits/containers.h bits/defs.h bits/debug.h \ 267 bits/locks.h concurrency/invoke.h 265 ${shell echo stdhdr/*} math gmp bits/align.h bits/containers.h \ 266 bits/defs.h bits/debug.h bits/locks.h concurrency/invoke.h 268 267 HEADERS = $(nobase_cfa_include_HEADERS) 269 268 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) … … 429 428 libcfa_d_a_SOURCES = ${libsrc} 430 429 libcfa_d_a_CFLAGS = -debug -O0 #No need for __CFA_DEBUG__ since we pass -debug 431 stdhdr = ${shell find stdhdr -type f -printf "%p "}430 stdhdr = ${shell echo stdhdr/*} 432 431 cfa_includedir = $(CFA_INCDIR) 433 432 nobase_cfa_include_HEADERS = \ -
src/libcfa/concurrency/alarm.c
rff2d1139 ree2938a 41 41 void ?{}( __cfa_time_t & this, zero_t zero ) { this.val = 0; } 42 42 43 void ?{}( itimerval & this, __cfa_time_t * alarm ) with( this ){44 it_value.tv_sec = alarm->val / one_second; // seconds45 it_value.tv_usec = max( (alarm->val % one_second) / one_microsecond, 1000 ); // microseconds46 it_interval.tv_sec = 0;47 it_interval.tv_usec = 0;43 void ?{}( itimerval & this, __cfa_time_t * alarm ) { 44 this.it_value.tv_sec = alarm->val / one_second; // seconds 45 this.it_value.tv_usec = max( (alarm->val % one_second) / one_microsecond, 1000 ); // microseconds 46 this.it_interval.tv_sec = 0; 47 this.it_interval.tv_usec = 0; 48 48 } 49 49 … … 84 84 //============================================================================================= 85 85 86 void ?{}( alarm_node_t & this, thread_desc * thrd, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time ) with( this ){86 void ?{}( alarm_node_t & this, thread_desc * thrd, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time ) { 87 87 this.thrd = thrd; 88 88 this.alarm = alarm; 89 89 this.period = period; 90 next = 0;91 set = false;92 kernel_alarm = false;93 } 94 95 void ?{}( alarm_node_t & this, processor * proc, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time ) with( this ){90 this.next = 0; 91 this.set = false; 92 this.kernel_alarm = false; 93 } 94 95 void ?{}( alarm_node_t & this, processor * proc, __cfa_time_t alarm = zero_time, __cfa_time_t period = zero_time ) { 96 96 this.proc = proc; 97 97 this.alarm = alarm; 98 98 this.period = period; 99 next = 0;100 set = false;101 kernel_alarm = true;99 this.next = 0; 100 this.set = false; 101 this.kernel_alarm = true; 102 102 } 103 103 -
src/libcfa/concurrency/alarm.h
rff2d1139 ree2938a 114 114 }; 115 115 116 static inline void ?{}( alarm_list_t & this ) with( this ){117 head = 0;118 t ail = &head;116 static inline void ?{}( alarm_list_t & this ) { 117 this.head = 0; 118 this.tail = &this.head; 119 119 } 120 120 -
src/libcfa/concurrency/coroutine.c
rff2d1139 ree2938a 39 39 //----------------------------------------------------------------------------- 40 40 // Coroutine ctors and dtors 41 void ?{}(coStack_t& this) with( this ){42 size = 65000; // size of stack43 storage = NULL; // pointer to stack44 limit = NULL; // stack grows towards stack limit45 base = NULL; // base of stack46 context = NULL; // address of cfa_context_t47 t op = NULL; // address of top of storage48 userStack = false;41 void ?{}(coStack_t& this) { 42 this.size = 65000; // size of stack 43 this.storage = NULL; // pointer to stack 44 this.limit = NULL; // stack grows towards stack limit 45 this.base = NULL; // base of stack 46 this.context = NULL; // address of cfa_context_t 47 this.top = NULL; // address of top of storage 48 this.userStack = false; 49 49 } 50 50 … … 60 60 } 61 61 62 void ?{}(coroutine_desc& this, const char * name) with( this ){62 void ?{}(coroutine_desc& this, const char * name) { 63 63 this.name = name; 64 errno_ = 0;65 state = Start;66 starter = NULL;67 last = NULL;64 this.errno_ = 0; 65 this.state = Start; 66 this.starter = NULL; 67 this.last = NULL; 68 68 } 69 69 -
src/libcfa/concurrency/kernel.c
rff2d1139 ree2938a 142 142 } 143 143 144 void ?{}(processor & this, cluster * cltr) with( this ){144 void ?{}(processor & this, cluster * cltr) { 145 145 this.cltr = cltr; 146 t erminated{ 0 };147 do_terminate = false;148 preemption_alarm = NULL;149 pending_preemption = false;146 this.terminated{ 0 }; 147 this.do_terminate = false; 148 this.preemption_alarm = NULL; 149 this.pending_preemption = false; 150 150 151 151 start( &this ); 152 152 } 153 153 154 void ?{}(processor & this, cluster * cltr, processorCtx_t & runner) with( this ){154 void ?{}(processor & this, cluster * cltr, processorCtx_t & runner) { 155 155 this.cltr = cltr; 156 t erminated{ 0 };157 do_terminate = false;158 preemption_alarm = NULL;159 pending_preemption = false;160 kernel_thread = pthread_self();156 this.terminated{ 0 }; 157 this.do_terminate = false; 158 this.preemption_alarm = NULL; 159 this.pending_preemption = false; 160 this.kernel_thread = pthread_self(); 161 161 162 162 this.runner = &runner; -
src/libcfa/concurrency/monitor
rff2d1139 ree2938a 27 27 }; 28 28 29 static inline void ?{}(monitor_desc & this) with( this ){30 lock{};31 entry_queue{};32 signal_stack{};33 owner = NULL;34 recursion = 0;35 mask.accepted = NULL;36 mask.data = NULL;37 mask.size = 0;38 dtor_node = NULL;29 static inline void ?{}(monitor_desc & this) { 30 (this.lock){}; 31 (this.entry_queue){}; 32 (this.signal_stack){}; 33 this.owner = NULL; 34 this.recursion = 0; 35 this.mask.accepted = NULL; 36 this.mask.data = NULL; 37 this.mask.size = 0; 38 this.dtor_node = NULL; 39 39 } 40 40 -
src/libcfa/concurrency/monitor.c
rff2d1139 ree2938a 151 151 // We already have the monitor... but where about to destroy it so the nesting will fail 152 152 // Abort! 153 abort( "Attempt to destroy monitor %p by thread \"%.256s\" (%p) in nested mutex." , this, thrd->self_cor.name, thrd);153 abort( "Attempt to destroy monitor %p by thread \"%.256s\" (%p) in nested mutex." ); 154 154 } 155 155 … … 358 358 } 359 359 360 void ?{}(__condition_criterion_t & this ) with( this ){361 ready = false;362 t arget = NULL;363 owner = NULL;364 next = NULL;360 void ?{}(__condition_criterion_t & this ) { 361 this.ready = false; 362 this.target = NULL; 363 this.owner = NULL; 364 this.next = NULL; 365 365 } 366 366 … … 427 427 thread_desc * this_thrd = this_thread; 428 428 if ( this.monitor_count != this_thrd->monitors.size ) { 429 abort( "Signal on condition %p made with different number of monitor(s), expected % li got %li", &this, this.monitor_count, this_thrd->monitors.size );429 abort( "Signal on condition %p made with different number of monitor(s), expected %i got %i", &this, this.monitor_count, this_thrd->monitors.size ); 430 430 } 431 431 432 432 for(int i = 0; i < this.monitor_count; i++) { 433 433 if ( this.monitors[i] != this_thrd->monitors[i] ) { 434 abort( "Signal on condition %p made with different monitor, expected %p got % p", &this, this.monitors[i], this_thrd->monitors[i] );434 abort( "Signal on condition %p made with different monitor, expected %p got %i", &this, this.monitors[i], this_thrd->monitors[i] ); 435 435 } 436 436 }
Note:
See TracChangeset
for help on using the changeset viewer.