Changeset 75eaf66 in rtems


Ignore:
Timestamp:
Jul 21, 2009, 2:16:00 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
14d3ad4f
Parents:
68799a2a
Message:

2009-07-21 Joel Sherrill <joel.sherrill@…>

  • posix/include/rtems/posix/cancel.h, posix/src/cancel.c, posix/src/canceleval.c, posix/src/setcancelstate.c, posix/src/setcanceltype.c: Fix a minor bug in the previous modification which resulted in psxcancel failing.
Location:
cpukit
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r68799a2a r75eaf66  
     12009-07-21      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * posix/include/rtems/posix/cancel.h, posix/src/cancel.c,
     4        posix/src/canceleval.c, posix/src/setcancelstate.c,
     5        posix/src/setcanceltype.c: Fix a minor bug in the previous
     6        modification which resulted in psxcancel failing.
     7
    182009-07-21      Santosh G Vattam <vattam.santosh@gmail.com>
    29
  • cpukit/posix/include/rtems/posix/cancel.h

    r68799a2a r75eaf66  
    11/**
    22 * @file rtems/posix/cancel.h
     3 *
     4 * This file contains the prototypes and data types used to implement
     5 * POSIX thread cancelation.
    36 */
    47
     
    1922#include <rtems/posix/threadsup.h>
    2023
     24/**
     25 *  This structure is used to manage the cancelation handlers.
     26 */
    2127typedef struct {
     28  /** This field is the Chain Node so we can put these on lists. */
    2229  Chain_Node  Node;
     30  /** This field is the cancelation routine. */
    2331  void      (*routine)( void * );
     32  /** This field is the argument to the cancelation routine. */
    2433  void       *arg;
    2534}  POSIX_Cancel_Handler_control;
    2635
    27 /*
    28  *  _POSIX_Threads_cancel_run
    29  *
    30  *  DESCRIPTION:
     36/**
     37 *  @brief _POSIX_Threads_cancel_run
    3138 *
    3239 *  This support routine runs through the chain of cancel handlers that
    3340 *  have been registered and executes them.
     41 *
     42 *  @param[in] the_thread is the thread whose cancelation handlers
     43 *             should be run
    3444 */
    35 
    3645void _POSIX_Threads_cancel_run(
    3746  Thread_Control *the_thread
    3847);
    3948
    40 /*
    41  *  _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch
     49/**
     50 *  @brief _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch
    4251 *
    43  *  DESCRIPTION:
    44  * 
    4552 *  This routine separates a piece of code that existed as part of
    4653 *  another routine, but had to be separated to improve coverage.
     54 *
     55 *  @param[in] the_thread is the thread to evaluate canceling
    4756 */
    48 
    4957void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch (
    50   POSIX_API_Control *thread_support
     58  Thread_Control *the_thread
    5159);
    5260
  • cpukit/posix/src/cancel.c

    r68799a2a r75eaf66  
    5353      thread_support->cancelation_requested = 1;
    5454
    55       _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( thread_support );
     55      _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread );
    5656      return 0;
    5757
  • cpukit/posix/src/canceleval.c

    r68799a2a r75eaf66  
    2121
    2222void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
    23   POSIX_API_Control *thread_support
     23  Thread_Control    *the_thread
    2424)
    2525{
    26   bool  cancel = false;
     26  POSIX_API_Control *thread_support;
     27  bool               cancel;
     28
     29  cancel         = false;
     30  thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
    2731
    2832  if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
     
    3438 
    3539  if ( cancel )
    36     _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
     40    _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
    3741}
  • cpukit/posix/src/setcancelstate.c

    r68799a2a r75eaf66  
    5757    thread_support->cancelability_state = state;
    5858
    59   _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( thread_support );
     59    _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
    6060
    6161  /*
  • cpukit/posix/src/setcanceltype.c

    r68799a2a r75eaf66  
    5757    thread_support->cancelability_type = type;
    5858
    59     _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( thread_support );
     59    _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
    6060 
    6161  /*
Note: See TracChangeset for help on using the changeset viewer.