Ignore:
Timestamp:
May 28, 2018, 5:02:07 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/preemption.c

    r13e8427 r533540a  
    161161        void disable_interrupts() {
    162162                with( kernelTLS.preemption_state ) {
     163                        #if GCC_VERSION > 50000
    163164                        static_assert(__atomic_always_lock_free(sizeof(enabled), &enabled), "Must be lock-free");
     165                        #endif
    164166
    165167                        // Set enabled flag to false
     
    190192                        // Check if we need to prempt the thread because an interrupt was missed
    191193                        if( prev == 1 ) {
     194                                #if GCC_VERSION > 50000
    192195                                static_assert(__atomic_always_lock_free(sizeof(enabled), &enabled), "Must be lock-free");
     196                                #endif
    193197
    194198                                // Set enabled flag to true
     
    217221                verifyf( prev != 0u, "Incremented from %u\n", prev );                     // If this triggers someone is enabled already enabled interrupts
    218222                if( prev == 1 ) {
     223                        #if GCC_VERSION > 50000
    219224                        static_assert(__atomic_always_lock_free(sizeof(kernelTLS.preemption_state.enabled), &kernelTLS.preemption_state.enabled), "Must be lock-free");
     225                        #endif
    220226                        // Set enabled flag to true
    221227                        // should be atomic to avoid preemption in the middle of the operation.
     
    376382
    377383        // Clear sighandler mask before context switching.
     384        #if GCC_VERSION > 50000
    378385        static_assert( sizeof( sigset_t ) == sizeof( cxt->uc_sigmask ), "Expected cxt->uc_sigmask to be of sigset_t" );
     386        #endif
    379387        if ( pthread_sigmask( SIG_SETMASK, (sigset_t *)&(cxt->uc_sigmask), NULL ) == -1 ) {
    380388                abort( "internal error, sigprocmask" );
Note: See TracChangeset for help on using the changeset viewer.