Ignore:
File:
1 edited

Legend:

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

    r5a05946 r926d358  
    1010// Created On       : Mon Jun 5 14:20:42 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jan  9 08:42:59 2023
    13 // Update Count     : 60
     12// Last Modified On : Thu Feb 17 11:18:57 2022
     13// Update Count     : 59
    1414//
    1515
    1616#define __cforall_thread__
     17#define _GNU_SOURCE
    1718
    1819// #define __CFA_DEBUG_PRINT_PREEMPTION__
     
    117118                __cfadbg_print_buffer_decl( preemption, " KERNEL: preemption tick %lu\n", currtime.tn);
    118119                Duration period = node->period;
    119                 if( period == 0 ) {
     120                if( period == 0) {
    120121                        node->set = false;                  // Node is one-shot, just mark it as not pending
    121122                }
     
    351352        sigset_t oldset;
    352353        int ret;
    353         ret = __cfaabi_pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
     354        ret = pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
    354355        if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); }
    355356
     
    384385        sigaddset( &mask, sig );
    385386
    386         if ( __cfaabi_pthread_sigmask( SIG_UNBLOCK, &mask, 0p ) == -1 ) {
     387        if ( pthread_sigmask( SIG_UNBLOCK, &mask, 0p ) == -1 ) {
    387388            abort( "internal error, pthread_sigmask" );
    388389        }
     
    395396        sigaddset( &mask, sig );
    396397
    397         if ( __cfaabi_pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) {
     398        if ( pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) {
    398399                abort( "internal error, pthread_sigmask" );
    399400        }
     
    403404static void preempt( processor * this ) {
    404405        sigval_t value = { PREEMPT_NORMAL };
    405         __cfaabi_pthread_sigqueue( this->kernel_thread, SIGUSR1, value );
     406        pthread_sigqueue( this->kernel_thread, SIGUSR1, value );
    406407}
    407408
     
    414415        sigset_t oldset;
    415416        int ret;
    416         ret = __cfaabi_pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
     417        ret = pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
    417418        if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); }
    418419
     
    433434        sigset_t oldset;
    434435        int ret;
    435         ret = __cfaabi_pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
     436        ret = pthread_sigmask(0, ( const sigset_t * ) 0p, &oldset);  // workaround trac#208: cast should be unnecessary
    436437        if(ret != 0) { abort("ERROR sigprocmask returned %d", ret); }
    437438
     
    504505        sigval val;
    505506        val.sival_int = 0;
    506         __cfaabi_pthread_sigqueue( alarm_thread, SIGALRM, val );
     507        pthread_sigqueue( alarm_thread, SIGALRM, val );
    507508
    508509        // Wait for the preemption thread to finish
     
    578579        static_assert( sizeof( sigset_t ) == sizeof( cxt->uc_sigmask ), "Expected cxt->uc_sigmask to be of sigset_t" );
    579580        #endif
    580         if ( __cfaabi_pthread_sigmask( SIG_SETMASK, (sigset_t *)&(cxt->uc_sigmask), 0p ) == -1 ) {
     581        if ( pthread_sigmask( SIG_SETMASK, (sigset_t *)&(cxt->uc_sigmask), 0p ) == -1 ) {
    581582                abort( "internal error, sigprocmask" );
    582583        }
     
    606607        sigset_t mask;
    607608        sigfillset(&mask);
    608         if ( __cfaabi_pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) {
     609        if ( pthread_sigmask( SIG_BLOCK, &mask, 0p ) == -1 ) {
    609610            abort( "internal error, pthread_sigmask" );
    610611        }
Note: See TracChangeset for help on using the changeset viewer.