Ignore:
File:
1 edited

Legend:

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

    r926d358 rf5f2768  
    1010// Created On       : Mon Jun 5 14:20:42 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 17 11:18:57 2022
    13 // Update Count     : 59
     12// Last Modified On : Mon Jan  9 08:42:59 2023
     13// Update Count     : 60
    1414//
    1515
    1616#define __cforall_thread__
    17 #define _GNU_SOURCE
    1817
    1918// #define __CFA_DEBUG_PRINT_PREEMPTION__
     
    352351        sigset_t oldset;
    353352        int ret;
    354         ret = pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
     353        ret = __cfaabi_pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
    355354        if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); }
    356355
     
    385384        sigaddset( &mask, sig );
    386385
    387         if ( pthread_sigmask( SIG_UNBLOCK, &mask, 0p ) == -1 ) {
     386        if ( __cfaabi_pthread_sigmask( SIG_UNBLOCK, &mask, 0p ) == -1 ) {
    388387            abort( "internal error, pthread_sigmask" );
    389388        }
     
    396395        sigaddset( &mask, sig );
    397396
    398         if ( pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) {
     397        if ( __cfaabi_pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) {
    399398                abort( "internal error, pthread_sigmask" );
    400399        }
     
    404403static void preempt( processor * this ) {
    405404        sigval_t value = { PREEMPT_NORMAL };
    406         pthread_sigqueue( this->kernel_thread, SIGUSR1, value );
     405        __cfaabi_pthread_sigqueue( this->kernel_thread, SIGUSR1, value );
    407406}
    408407
     
    415414        sigset_t oldset;
    416415        int ret;
    417         ret = pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
     416        ret = __cfaabi_pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
    418417        if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); }
    419418
     
    434433        sigset_t oldset;
    435434        int ret;
    436         ret = pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
     435        ret = __cfaabi_pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
    437436        if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); }
    438437
     
    505504        sigval val;
    506505        val.sival_int = 0;
    507         pthread_sigqueue( alarm_thread, SIGALRM, val );
     506        __cfaabi_pthread_sigqueue( alarm_thread, SIGALRM, val );
    508507
    509508        // Wait for the preemption thread to finish
     
    579578        static_assert( sizeof( sigset_t ) == sizeof( cxt->uc_sigmask ), "Expected cxt->uc_sigmask to be of sigset_t" );
    580579        #endif
    581         if ( pthread_sigmask( SIG_SETMASK, (sigset_t *)&(cxt->uc_sigmask), 0p ) == -1 ) {
     580        if ( __cfaabi_pthread_sigmask( SIG_SETMASK, (sigset_t *)&(cxt->uc_sigmask), 0p ) == -1 ) {
    582581                abort( "internal error, sigprocmask" );
    583582        }
     
    607606        sigset_t mask;
    608607        sigfillset(&mask);
    609         if ( pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) {
     608        if ( __cfaabi_pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) {
    610609            abort( "internal error, pthread_sigmask" );
    611610        }
Note: See TracChangeset for help on using the changeset viewer.