Ignore:
Timestamp:
Sep 21, 2022, 11:56:16 AM (22 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
9cd5bd2
Parents:
7f6a7c9
Message:

Changed real_pthread symbols (now cfaabi_pthread) to be protected in libcfathread

File:
1 edited

Legend:

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

    r7f6a7c9 r95dab9e  
    406406        sigset_t oldset;
    407407        int ret;
    408         ret = real_pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
     408        ret = __cfaabi_pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
    409409        if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); }
    410410
     
    439439        sigaddset( &mask, sig );
    440440
    441         if ( real_pthread_sigmask( SIG_UNBLOCK, &mask, 0p ) == -1 ) {
     441        if ( __cfaabi_pthread_sigmask( SIG_UNBLOCK, &mask, 0p ) == -1 ) {
    442442            abort( "internal error, pthread_sigmask" );
    443443        }
     
    450450        sigaddset( &mask, sig );
    451451
    452         if ( real_pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) {
     452        if ( __cfaabi_pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) {
    453453                abort( "internal error, pthread_sigmask" );
    454454        }
     
    458458static void preempt( processor * this ) {
    459459        sigval_t value = { PREEMPT_NORMAL };
    460         real_pthread_sigqueue( this->kernel_thread, SIGUSR1, value );
     460        __cfaabi_pthread_sigqueue( this->kernel_thread, SIGUSR1, value );
    461461}
    462462
     
    469469        sigset_t oldset;
    470470        int ret;
    471         ret = real_pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
     471        ret = __cfaabi_pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
    472472        if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); }
    473473
     
    488488        sigset_t oldset;
    489489        int ret;
    490         ret = real_pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
     490        ret = __cfaabi_pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
    491491        if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); }
    492492
     
    559559        sigval val;
    560560        val.sival_int = 0;
    561         real_pthread_sigqueue( alarm_thread, SIGALRM, val );
     561        __cfaabi_pthread_sigqueue( alarm_thread, SIGALRM, val );
    562562
    563563        // Wait for the preemption thread to finish
     
    633633        static_assert( sizeof( sigset_t ) == sizeof( cxt->uc_sigmask ), "Expected cxt->uc_sigmask to be of sigset_t" );
    634634        #endif
    635         if ( real_pthread_sigmask( SIG_SETMASK, (sigset_t *)&(cxt->uc_sigmask), 0p ) == -1 ) {
     635        if ( __cfaabi_pthread_sigmask( SIG_SETMASK, (sigset_t *)&(cxt->uc_sigmask), 0p ) == -1 ) {
    636636                abort( "internal error, sigprocmask" );
    637637        }
     
    661661        sigset_t mask;
    662662        sigfillset(&mask);
    663         if ( real_pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) {
     663        if ( __cfaabi_pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) {
    664664            abort( "internal error, pthread_sigmask" );
    665665        }
Note: See TracChangeset for help on using the changeset viewer.