Changeset 281ad52 in rtems


Ignore:
Timestamp:
Jun 12, 1996, 10:49:14 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
2e0ebd11
Parents:
4a1bc34b
Message:

basic kill() which send a signal to pthread_self() appears to work.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/src/psignal.c

    r4a1bc34b r281ad52  
    814814   */
    815815 
    816   if( pid != getpid() );
     816  if( pid != getpid() )
    817817    set_errno_and_return_minus_one( ESRCH );
    818818
     
    843843  _Thread_Disable_dispatch();
    844844
    845   _POSIX_signals_Pending |= mask;
    846 
    847   /*
    848    *  Is the currently executing thread interested?
     845  /*
     846   *  Is the currently executing thread interested?  If so then it will
     847   *  get it an execute it as soon as the dispatcher executes.
    849848   */
    850849
     
    852851
    853852  api = the_thread->API_Extensions[ THREAD_API_POSIX ];
    854   if ( _POSIX_signals_Is_interested( api, mask ) )
     853  if ( _POSIX_signals_Is_interested( api, mask ) ) {
     854    _POSIX_signals_Pending |= mask;
    855855    goto process_it;
     856  }
    856857
    857858  /*
     
    880881    }
    881882  }
     883
     884  /*
     885   *  Since we did not deliver the signal to the current thread or to a
     886   *  specific thread via sigwait() we will mark it as pending.
     887   */
     888
     889  _POSIX_signals_Pending |= mask;
    882890
    883891  /*
     
    920928
    921929    for ( index = 1 ; index <= maximum ; index++ ) {
    922       the_thread = (Thread_Control *) object_table++;
     930      the_thread = (Thread_Control *) object_table[ index ];
     931
     932      if ( !the_thread )
     933        continue;
    923934
    924935      /*
     
    936947      api = the_thread->API_Extensions[ THREAD_API_POSIX ];
    937948
    938       if ( !_POSIX_signals_Is_interested( api, mask ) )
     949      if ( !api || !_POSIX_signals_Is_interested( api, mask ) )
    939950        continue;
    940951
  • cpukit/posix/src/psignal.c

    r4a1bc34b r281ad52  
    814814   */
    815815 
    816   if( pid != getpid() );
     816  if( pid != getpid() )
    817817    set_errno_and_return_minus_one( ESRCH );
    818818
     
    843843  _Thread_Disable_dispatch();
    844844
    845   _POSIX_signals_Pending |= mask;
    846 
    847   /*
    848    *  Is the currently executing thread interested?
     845  /*
     846   *  Is the currently executing thread interested?  If so then it will
     847   *  get it an execute it as soon as the dispatcher executes.
    849848   */
    850849
     
    852851
    853852  api = the_thread->API_Extensions[ THREAD_API_POSIX ];
    854   if ( _POSIX_signals_Is_interested( api, mask ) )
     853  if ( _POSIX_signals_Is_interested( api, mask ) ) {
     854    _POSIX_signals_Pending |= mask;
    855855    goto process_it;
     856  }
    856857
    857858  /*
     
    880881    }
    881882  }
     883
     884  /*
     885   *  Since we did not deliver the signal to the current thread or to a
     886   *  specific thread via sigwait() we will mark it as pending.
     887   */
     888
     889  _POSIX_signals_Pending |= mask;
    882890
    883891  /*
     
    920928
    921929    for ( index = 1 ; index <= maximum ; index++ ) {
    922       the_thread = (Thread_Control *) object_table++;
     930      the_thread = (Thread_Control *) object_table[ index ];
     931
     932      if ( !the_thread )
     933        continue;
    923934
    924935      /*
     
    936947      api = the_thread->API_Extensions[ THREAD_API_POSIX ];
    937948
    938       if ( !_POSIX_signals_Is_interested( api, mask ) )
     949      if ( !api || !_POSIX_signals_Is_interested( api, mask ) )
    939950        continue;
    940951
Note: See TracChangeset for help on using the changeset viewer.