Changeset 533540a for src/libcfa/concurrency/preemption.c
- Timestamp:
- May 28, 2018, 5:02:07 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
- Children:
- 17238fd, 4ee3b0c1
- Parents:
- 13e8427 (diff), 1f81d61 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/preemption.c
r13e8427 r533540a 161 161 void disable_interrupts() { 162 162 with( kernelTLS.preemption_state ) { 163 #if GCC_VERSION > 50000 163 164 static_assert(__atomic_always_lock_free(sizeof(enabled), &enabled), "Must be lock-free"); 165 #endif 164 166 165 167 // Set enabled flag to false … … 190 192 // Check if we need to prempt the thread because an interrupt was missed 191 193 if( prev == 1 ) { 194 #if GCC_VERSION > 50000 192 195 static_assert(__atomic_always_lock_free(sizeof(enabled), &enabled), "Must be lock-free"); 196 #endif 193 197 194 198 // Set enabled flag to true … … 217 221 verifyf( prev != 0u, "Incremented from %u\n", prev ); // If this triggers someone is enabled already enabled interrupts 218 222 if( prev == 1 ) { 223 #if GCC_VERSION > 50000 219 224 static_assert(__atomic_always_lock_free(sizeof(kernelTLS.preemption_state.enabled), &kernelTLS.preemption_state.enabled), "Must be lock-free"); 225 #endif 220 226 // Set enabled flag to true 221 227 // should be atomic to avoid preemption in the middle of the operation. … … 376 382 377 383 // Clear sighandler mask before context switching. 384 #if GCC_VERSION > 50000 378 385 static_assert( sizeof( sigset_t ) == sizeof( cxt->uc_sigmask ), "Expected cxt->uc_sigmask to be of sigset_t" ); 386 #endif 379 387 if ( pthread_sigmask( SIG_SETMASK, (sigset_t *)&(cxt->uc_sigmask), NULL ) == -1 ) { 380 388 abort( "internal error, sigprocmask" );
Note: See TracChangeset
for help on using the changeset viewer.