Changeset 171bbec in rtems


Ignore:
Timestamp:
Oct 10, 2009, 4:03:38 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
5b5dd1c8
Parents:
6805ac37
Message:

2009-10-10 Joel Sherrill <joel.sherrill@…>

  • posix/include/rtems/posix/threadsup.h, posix/src/cancel.c, posix/src/canceleval.c: Make psxcancel run again. _POSIX_Thread_Exit() can be called on running thread or another thread when it is cancelled.
Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r6805ac37 r171bbec  
     12009-10-10      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * posix/include/rtems/posix/threadsup.h, posix/src/cancel.c,
     4        posix/src/canceleval.c: Make psxcancel run again.
     5        _POSIX_Thread_Exit() can be called on running thread or another
     6        thread when it is cancelled.
     7
    182009-10-10      Joel Sherrill <joel.sherrill@oarcorp.com>
    29
  • cpukit/posix/include/rtems/posix/threadsup.h

    r6805ac37 r171bbec  
    8282  Thread_Control *the_thread,
    8383  void           *value_ptr
    84 ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
     84);
    8585
    8686#endif
  • cpukit/posix/src/cancel.c

    r6805ac37 r171bbec  
    5353      thread_support->cancelation_requested = 1;
    5454
     55      /* This enables dispatch implicitly */
    5556      _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread );
    5657      return 0;
  • cpukit/posix/src/canceleval.c

    r6805ac37 r171bbec  
    2525{
    2626  POSIX_API_Control *thread_support;
    27   bool               cancel;
    2827
    29   cancel         = false;
    3028  thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
    3129
    3230  if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
    3331       thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
    34        thread_support->cancelation_requested )
    35     cancel = true;
     32       thread_support->cancelation_requested ) {
     33    _Thread_Unnest_dispatch();
     34    _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
     35  } else
     36    _Thread_Enable_dispatch();
    3637 
    37   _Thread_Enable_dispatch();
    38  
    39   if ( cancel )
    40     _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
    4138}
Note: See TracChangeset for help on using the changeset viewer.