Changeset ffe2fad
- Timestamp:
- Apr 23, 2019, 2:41:32 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 673cd63
- Parents:
- 8c3a0336
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/ctxswitch/cfa_cor.cfa
r8c3a0336 rffe2fad 11 11 } 12 12 13 void main( GreatSuspender & this ) {13 void main( __attribute__((unused)) GreatSuspender & this ) { 14 14 while( true ) { 15 15 suspend(); -
benchmark/ctxswitch/cfa_thrd2.cfa
r8c3a0336 rffe2fad 8 8 thread Fibre {}; 9 9 10 void main( Fibre & this) {10 void main(__attribute__((unused)) Fibre & this) { 11 11 while(!done) { 12 12 yield(); -
libcfa/src/bits/containers.hfa
r8c3a0336 rffe2fad 186 186 187 187 forall(dtype T | is_node(T)) 188 static inline bool ?!=?( __queue(T) & this, zero_t zero ) {188 static inline bool ?!=?( __queue(T) & this, __attribute__((unused)) zero_t zero ) { 189 189 return this.head != 0; 190 190 } … … 196 196 //----------------------------------------------------------------------------- 197 197 #ifdef __cforall 198 forall(dtype TYPE | sized(TYPE))198 forall(dtype TYPE) 199 199 #define T TYPE 200 200 #define __getter_t * [T * & next, T * & prev] ( T & ) … … 268 268 269 269 forall(dtype T | sized(T)) 270 static inline bool ?!=?( __dllist(T) & this, zero_t zero ) {270 static inline bool ?!=?( __dllist(T) & this, __attribute__((unused)) zero_t zero ) { 271 271 return this.head != 0; 272 272 } -
libcfa/src/concurrency/coroutine.cfa
r8c3a0336 rffe2fad 70 70 bool userStack = ((intptr_t)this.storage & 0x1) != 0; 71 71 if ( ! userStack && this.storage ) { 72 *((intptr_t*)&this.storage) &= (intptr_t)-1; 72 __attribute__((may_alias)) intptr_t * istorage = (intptr_t *)&this.storage; 73 *istorage &= (intptr_t)-1; 74 73 75 void * storage = this.storage->limit; 74 76 __cfaabi_dbg_debug_do( … … 174 176 this->storage->limit = storage; 175 177 this->storage->base = (void*)((intptr_t)storage + size); 176 *((intptr_t*)&this->storage) |= userStack ? 0x1 : 0x0; 178 __attribute__((may_alias)) intptr_t * istorage = (intptr_t*)&this->storage; 179 *istorage |= userStack ? 0x1 : 0x0; 177 180 } 178 181 -
libcfa/src/concurrency/invoke.h
r8c3a0336 rffe2fad 199 199 #ifdef __cforall 200 200 extern "Cforall" { 201 static inline struct coroutine_desc * volatileactive_coroutine() { return TL_GET( this_thread )->curr_cor; }202 static inline struct thread_desc * volatileactive_thread () { return TL_GET( this_thread ); }203 static inline struct processor * volatileactive_processor() { return TL_GET( this_processor ); } // UNSAFE201 static inline struct coroutine_desc * active_coroutine() { return TL_GET( this_thread )->curr_cor; } 202 static inline struct thread_desc * active_thread () { return TL_GET( this_thread ); } 203 static inline struct processor * active_processor() { return TL_GET( this_processor ); } // UNSAFE 204 204 205 205 static inline thread_desc * & get_next( thread_desc & this ) { -
libcfa/src/concurrency/kernel.cfa
r8c3a0336 rffe2fad 165 165 base = info->base; 166 166 } 167 *((intptr_t*)&stack.storage) |= 0x1; 167 __attribute__((may_alias)) intptr_t * istorage = (intptr_t*) &stack.storage; 168 *istorage |= 0x1; 168 169 name = "Main Thread"; 169 170 state = Start; -
libcfa/src/time.hfa
r8c3a0336 rffe2fad 30 30 31 31 static inline { 32 Duration ?=?( Duration & dur, zero_t ) { return dur{ 0 }; }32 Duration ?=?( Duration & dur, __attribute__((unused)) zero_t ) { return dur{ 0 }; } 33 33 34 34 Duration +?( Duration rhs ) with( rhs ) { return (Duration)@{ +tv }; } … … 59 59 bool ?>=?( Duration lhs, Duration rhs ) { return lhs.tv >= rhs.tv; } 60 60 61 bool ?==?( Duration lhs, zero_t ) { return lhs.tv == 0; }62 bool ?!=?( Duration lhs, zero_t ) { return lhs.tv != 0; }63 bool ?<? ( Duration lhs, zero_t ) { return lhs.tv < 0; }64 bool ?<=?( Duration lhs, zero_t ) { return lhs.tv <= 0; }65 bool ?>? ( Duration lhs, zero_t ) { return lhs.tv > 0; }66 bool ?>=?( Duration lhs, zero_t ) { return lhs.tv >= 0; }61 bool ?==?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv == 0; } 62 bool ?!=?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv != 0; } 63 bool ?<? ( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv < 0; } 64 bool ?<=?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv <= 0; } 65 bool ?>? ( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv > 0; } 66 bool ?>=?( Duration lhs, __attribute__((unused)) zero_t ) { return lhs.tv >= 0; } 67 67 68 68 Duration abs( Duration rhs ) { return rhs.tv >= 0 ? rhs : -rhs; } … … 101 101 void ?{}( timeval & t, time_t sec, suseconds_t usec ) { t.tv_sec = sec; t.tv_usec = usec; } 102 102 void ?{}( timeval & t, time_t sec ) { t{ sec, 0 }; } 103 void ?{}( timeval & t, zero_t ) { t{ 0, 0 }; }104 105 timeval ?=?( timeval & t, zero_t ) { return t{ 0 }; }103 void ?{}( timeval & t, __attribute__((unused)) zero_t ) { t{ 0, 0 }; } 104 105 timeval ?=?( timeval & t, __attribute__((unused)) zero_t ) { return t{ 0 }; } 106 106 timeval ?+?( timeval lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_usec + rhs.tv_usec }; } 107 107 timeval ?-?( timeval lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec - rhs.tv_sec, lhs.tv_usec - rhs.tv_usec }; } … … 116 116 void ?{}( timespec & t, time_t sec, __syscall_slong_t nsec ) { t.tv_sec = sec; t.tv_nsec = nsec; } 117 117 void ?{}( timespec & t, time_t sec ) { t{ sec, 0}; } 118 void ?{}( timespec & t, zero_t ) { t{ 0, 0 }; }119 120 timespec ?=?( timespec & t, zero_t ) { return t{ 0 }; }118 void ?{}( timespec & t, __attribute__((unused)) zero_t ) { t{ 0, 0 }; } 119 120 timespec ?=?( timespec & t, __attribute__((unused)) zero_t ) { return t{ 0 }; } 121 121 timespec ?+?( timespec lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_nsec + rhs.tv_nsec }; } 122 122 timespec ?-?( timespec lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec - rhs.tv_sec, lhs.tv_nsec - rhs.tv_nsec }; } … … 145 145 void ?{}( Time & time, int year, int month = 0, int day = 0, int hour = 0, int min = 0, int sec = 0, int nsec = 0 ); 146 146 static inline { 147 Time ?=?( Time & time, zero_t ) { return time{ 0 }; }147 Time ?=?( Time & time, __attribute__((unused)) zero_t ) { return time{ 0 }; } 148 148 149 149 void ?{}( Time & time, timeval t ) with( time ) { tv = (int64_t)t.tv_sec * TIMEGRAN + t.tv_usec * 1000; } -
libcfa/src/time_t.hfa
r8c3a0336 rffe2fad 24 24 25 25 static inline void ?{}( Duration & dur ) with( dur ) { tv = 0; } 26 static inline void ?{}( Duration & dur, zero_t ) with( dur ) { tv = 0; }26 static inline void ?{}( Duration & dur, __attribute__((unused)) zero_t ) with( dur ) { tv = 0; } 27 27 28 28 … … 34 34 35 35 static inline void ?{}( Time & time ) with( time ) { tv = 0; } 36 static inline void ?{}( Time & time, zero_t ) with( time ) { tv = 0; }36 static inline void ?{}( Time & time, __attribute__((unused)) zero_t ) with( time ) { tv = 0; } 37 37 38 38 // Local Variables: //
Note: See TracChangeset
for help on using the changeset viewer.