Changeset 0e1d11f3 in rtems for cpukit/rtems


Ignore:
Timestamp:
May 27, 2016, 11:26:53 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
93306058
Parents:
dfcc8bb
git-author:
Sebastian Huber <sebastian.huber@…> (05/27/16 11:26:53)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/30/16 14:16:21)
Message:

score: Add _Thread_queue_Context_set_MP_callout()

Add _Thread_queue_Context_set_MP_callout() to simplify
_Thread_queue_Context_initialize(). This makes it possible to more
easily add additional fields to Thread_queue_Context.

Location:
cpukit/rtems
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/include/rtems/rtems/barrierimpl.h

    rdfcc8bb r0e1d11f3  
    7575)
    7676{
    77   _Thread_queue_Context_initialize( queue_context, NULL );
     77  _Thread_queue_Context_initialize( queue_context );
    7878  return (Barrier_Control *)
    7979    _Objects_Get( id, &queue_context->Lock_context, &_Barrier_Information );
  • cpukit/rtems/include/rtems/rtems/messageimpl.h

    rdfcc8bb r0e1d11f3  
    8888}
    8989
    90 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Do_get(
    91   Objects_Id               id,
    92   Thread_queue_Context    *queue_context
    93 #if defined(RTEMS_MULTIPROCESSING)
    94   ,
    95   Thread_queue_MP_callout  mp_callout
    96 #endif
     90RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get(
     91  Objects_Id            id,
     92  Thread_queue_Context *queue_context
    9793)
    9894{
    99   _Thread_queue_Context_initialize( queue_context, mp_callout );
     95  _Thread_queue_Context_initialize( queue_context );
    10096  return (Message_queue_Control *) _Objects_Get(
    10197    id,
     
    104100  );
    105101}
    106 
    107 #if defined(RTEMS_MULTIPROCESSING)
    108   #define _Message_queue_Get( id, queue_context, mp_callout ) \
    109     _Message_queue_Do_get( id, queue_context, mp_callout )
    110 #else
    111   #define _Message_queue_Get( id, queue_context, mp_callout ) \
    112     _Message_queue_Do_get( id, queue_context )
    113 #endif
    114102
    115103RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Allocate( void )
  • cpukit/rtems/include/rtems/rtems/semimpl.h

    rdfcc8bb r0e1d11f3  
    5959}
    6060
    61 RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Do_get(
    62   Objects_Id               id,
    63   Thread_queue_Context    *queue_context
    64 #if defined(RTEMS_MULTIPROCESSING)
    65   ,
    66   Thread_queue_MP_callout  mp_callout
    67 #endif
     61RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get(
     62  Objects_Id            id,
     63  Thread_queue_Context *queue_context
    6864)
    6965{
    70   _Thread_queue_Context_initialize( queue_context, mp_callout );
     66  _Thread_queue_Context_initialize( queue_context );
    7167  return (Semaphore_Control *) _Objects_Get(
    7268    id,
     
    7571  );
    7672}
    77 
    78 #if defined(RTEMS_MULTIPROCESSING)
    79   #define _Semaphore_Get( id, queue_context, mp_callout ) \
    80     _Semaphore_Do_get( id, queue_context, mp_callout )
    81 #else
    82   #define _Semaphore_Get( id, queue_context, mp_callout ) \
    83     _Semaphore_Do_get( id, queue_context )
    84 #endif
    8573
    8674#ifdef __cplusplus
  • cpukit/rtems/src/msgqbroadcast.c

    rdfcc8bb r0e1d11f3  
    4141  }
    4242
    43   the_message_queue = _Message_queue_Get(
    44     id,
    45     &queue_context,
    46     _Message_queue_Core_message_queue_mp_support
    47   );
     43  the_message_queue = _Message_queue_Get( id, &queue_context );
    4844
    4945  if ( the_message_queue == NULL ) {
     
    5551  }
    5652
     53  _Thread_queue_Context_set_MP_callout(
     54    &queue_context,
     55    _Message_queue_Core_message_queue_mp_support
     56  );
    5757  status = _CORE_message_queue_Broadcast(
    5858    &the_message_queue->message_queue,
  • cpukit/rtems/src/msgqdelete.c

    rdfcc8bb r0e1d11f3  
    3030
    3131  _Objects_Allocator_lock();
    32   the_message_queue = _Message_queue_Get(
    33     id,
    34     &queue_context,
    35     _Message_queue_MP_Send_object_was_deleted
    36   );
     32  the_message_queue = _Message_queue_Get( id, &queue_context );
    3733
    3834  if ( the_message_queue == NULL ) {
     
    5551  _Objects_Close( &_Message_queue_Information, &the_message_queue->Object );
    5652
     53  _Thread_queue_Context_set_MP_callout(
     54    &queue_context,
     55    _Message_queue_MP_Send_object_was_deleted
     56  );
    5757  _CORE_message_queue_Close(
    5858    &the_message_queue->message_queue,
  • cpukit/rtems/src/msgqflush.c

    rdfcc8bb r0e1d11f3  
    3333  }
    3434
    35   the_message_queue = _Message_queue_Get( id, &queue_context, NULL );
     35  the_message_queue = _Message_queue_Get( id, &queue_context );
    3636
    3737  if ( the_message_queue == NULL ) {
  • cpukit/rtems/src/msgqgetnumberpending.c

    rdfcc8bb r0e1d11f3  
    3333  }
    3434
    35   the_message_queue = _Message_queue_Get( id, &queue_context, NULL );
     35  the_message_queue = _Message_queue_Get( id, &queue_context );
    3636
    3737  if ( the_message_queue == NULL ) {
  • cpukit/rtems/src/msgqreceive.c

    rdfcc8bb r0e1d11f3  
    4646  }
    4747
    48   the_message_queue = _Message_queue_Get( id, &queue_context, NULL );
     48  the_message_queue = _Message_queue_Get( id, &queue_context );
    4949
    5050  if ( the_message_queue == NULL ) {
  • cpukit/rtems/src/msgqsend.c

    rdfcc8bb r0e1d11f3  
    3636  }
    3737
    38   the_message_queue = _Message_queue_Get(
    39     id,
    40     &queue_context,
    41     _Message_queue_Core_message_queue_mp_support
    42   );
     38  the_message_queue = _Message_queue_Get( id, &queue_context );
    4339
    4440  if ( the_message_queue == NULL ) {
     
    5450    &queue_context
    5551  );
     52  _Thread_queue_Context_set_MP_callout(
     53    &queue_context,
     54    _Message_queue_Core_message_queue_mp_support
     55  );
    5656  status = _CORE_message_queue_Send(
    5757    &the_message_queue->message_queue,
  • cpukit/rtems/src/msgqurgent.c

    rdfcc8bb r0e1d11f3  
    3636  }
    3737
    38   the_message_queue = _Message_queue_Get(
    39     id,
    40     &queue_context,
    41     _Message_queue_Core_message_queue_mp_support
    42   );
     38  the_message_queue = _Message_queue_Get( id, &queue_context );
    4339
    4440  if ( the_message_queue == NULL ) {
     
    5450    &queue_context
    5551  );
     52  _Thread_queue_Context_set_MP_callout(
     53    &queue_context,
     54    _Message_queue_Core_message_queue_mp_support
     55  );
    5656  status = _CORE_message_queue_Urgent(
    5757    &the_message_queue->message_queue,
  • cpukit/rtems/src/semdelete.c

    rdfcc8bb r0e1d11f3  
    3232
    3333  _Objects_Allocator_lock();
    34   the_semaphore = _Semaphore_Get(
    35     id,
    36     &queue_context,
    37     _Semaphore_MP_Send_object_was_deleted
    38   );
     34  the_semaphore = _Semaphore_Get( id, &queue_context );
    3935
    4036  if ( the_semaphore == NULL ) {
  • cpukit/rtems/src/semflush.c

    rdfcc8bb r0e1d11f3  
    2828  rtems_attribute       attribute_set;
    2929
    30   the_semaphore = _Semaphore_Get(
    31     id,
    32     &queue_context,
    33     _Semaphore_MP_Send_object_was_deleted
    34   );
     30  the_semaphore = _Semaphore_Get( id, &queue_context );
    3531
    3632  if ( the_semaphore == NULL ) {
     
    4541
    4642  attribute_set = the_semaphore->attribute_set;
     43
     44  _Thread_queue_Context_set_MP_callout(
     45    &queue_context,
     46    _Semaphore_MP_Send_object_was_deleted
     47  );
    4748
    4849#if defined(RTEMS_SMP)
  • cpukit/rtems/src/semobtain.c

    rdfcc8bb r0e1d11f3  
    4747  Status_Control        status;
    4848
    49   the_semaphore = _Semaphore_Get( id, &queue_context, NULL );
     49  the_semaphore = _Semaphore_Get( id, &queue_context );
    5050
    5151  if ( the_semaphore == NULL ) {
  • cpukit/rtems/src/semrelease.c

    rdfcc8bb r0e1d11f3  
    3333  Status_Control        status;
    3434
    35   the_semaphore = _Semaphore_Get(
    36     id,
    37     &queue_context,
    38     _Semaphore_Core_mutex_mp_support
    39   );
     35  the_semaphore = _Semaphore_Get( id, &queue_context );
    4036
    4137  if ( the_semaphore == NULL ) {
     
    4642#endif
    4743  }
     44
     45  _Thread_queue_Context_set_MP_callout(
     46    &queue_context,
     47    _Semaphore_Core_mutex_mp_support
     48  );
    4849
    4950  attribute_set = the_semaphore->attribute_set;
  • cpukit/rtems/src/semsetpriority.c

    rdfcc8bb r0e1d11f3  
    104104  }
    105105
    106   the_semaphore = _Semaphore_Get( semaphore_id, &queue_context, NULL );
     106  the_semaphore = _Semaphore_Get( semaphore_id, &queue_context );
    107107
    108108  if ( the_semaphore == NULL ) {
Note: See TracChangeset for help on using the changeset viewer.