Changeset 250583e


Ignore:
Timestamp:
Feb 7, 2022, 12:54:11 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
1cf8a9f
Parents:
f8143a6
Message:

Some clean-up after preemption fix

File:
1 edited

Legend:

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

    rf8143a6 r250583e  
    371371        if(!ready) { abort("Preemption should be ready"); }
    372372
    373         // __cfaasm_label(debug, before);
    374 
    375                 sigset_t oldset;
    376                 int ret;
    377                 ret = pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
    378                 if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); }
    379 
    380                 ret = sigismember(&oldset, SIGUSR1);
    381                 if(ret <  0) { abort("ERROR sigismember returned %d", ret); }
    382                 if(ret == 1) { abort("ERROR SIGUSR1 is disabled"); }
    383 
    384                 ret = sigismember(&oldset, SIGALRM);
    385                 if(ret <  0) { abort("ERROR sigismember returned %d", ret); }
    386                 if(ret == 0) { abort("ERROR SIGALRM is enabled"); }
    387 
    388                 ret = sigismember(&oldset, SIGTERM);
    389                 if(ret <  0) { abort("ERROR sigismember returned %d", ret); }
    390                 if(ret == 1) { abort("ERROR SIGTERM is disabled"); }
    391 
    392         // __cfaasm_label(debug, after);
     373        sigset_t oldset;
     374        int ret;
     375        ret = pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
     376        if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); }
     377
     378        ret = sigismember(&oldset, SIGUSR1);
     379        if(ret <  0) { abort("ERROR sigismember returned %d", ret); }
     380        if(ret == 1) { abort("ERROR SIGUSR1 is disabled"); }
     381
     382        ret = sigismember(&oldset, SIGALRM);
     383        if(ret <  0) { abort("ERROR sigismember returned %d", ret); }
     384        if(ret == 0) { abort("ERROR SIGALRM is enabled"); }
     385
     386        ret = sigismember(&oldset, SIGTERM);
     387        if(ret <  0) { abort("ERROR sigismember returned %d", ret); }
     388        if(ret == 1) { abort("ERROR SIGTERM is disabled"); }
    393389}
    394390
Note: See TracChangeset for help on using the changeset viewer.