Changeset 43b6f75 in rtems for cpukit/score/macros


Ignore:
Timestamp:
Nov 30, 2000, 2:08:30 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
c1a24fbe
Parents:
7f8c11c
Message:

2000-11-30 Joel Sherrill <joel@…>

  • General effort to make things compile with macros not inlines
  • inline/rtems/score/coremutex.inl: Added comment indicating for macros there is another copy of _CORE_mutex_Seize_interrupt_trylock() in src/coremutexseize.c.
  • src/coremutexseize.c: Added body of _CORE_mutex_Seize_interrupt_trylock() for macro case.
  • macros/rtems/score/coremutex.inl: Added prototype for _CORE_mutex_Seize_interrupt_trylock() since there is a real body when macros are enabled.
  • macros/rtems/score/coresem.inl: Added macro implementation of _CORE_semaphore_Seize_isr_disable.
  • macros/score/Makefile.am: Fixed typos.
  • rtems/score/address.inl: Correct macro implementation of _Addresses_Is_aligned() so it would compile.
  • macros/rtems/score/coremsg.inl: Added closing parentheses.
Location:
cpukit/score/macros/rtems/score
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/macros/rtems/score/address.inl

    r7f8c11c r43b6f75  
    5353
    5454#if (CPU_ALIGNMENT == 0)
     55#define _Addresses_Is_aligned( _address ) \
    5556    (TRUE)
    5657#elif defined(RTEMS_CPU_HAS_16_BIT_ADDRESSES)
     58#define _Addresses_Is_aligned( _address ) \
    5759    ( ( (unsigned short)(_address) % CPU_ALIGNMENT ) == 0 )
     60#else
    5861#define _Addresses_Is_aligned( _address ) \
    5962    ( ( (unsigned32)(_address) % CPU_ALIGNMENT ) == 0 )
    60 #else
    6163#endif
    6264
  • cpukit/score/macros/rtems/score/coremsg.inl

    r7f8c11c r43b6f75  
    2222 *
    2323 */
    24  
     24
    2525#define _CORE_message_queue_Send( _the_message_queue, _buffer, _size, \
    2626       _id, _api_message_queue_mp_support, _wait, _timeout ) \
    2727  _CORE_message_queue_Submit( (_the_message_queue), (_buffer), (_size), \
    2828     (_id), (_api_message_queue_mp_support), \
    29      CORE_MESSAGE_QUEUE_SEND_REQUEST, (_wait), (_timeout)
     29     CORE_MESSAGE_QUEUE_SEND_REQUEST, (_wait), (_timeout) )
    3030 
    3131/*PAGE
     
    3939  _CORE_message_queue_Submit( (_the_message_queue), (_buffer), (_size), \
    4040     (_id), (_api_message_queue_mp_support), \
    41      CORE_MESSAGE_QUEUE_URGENT_REQUEST, (_wait), (_timeout)
     41     CORE_MESSAGE_QUEUE_URGENT_REQUEST, (_wait), (_timeout) )
    4242
    4343/*PAGE
  • cpukit/score/macros/rtems/score/coremutex.inl

    r7f8c11c r43b6f75  
    6464  ( (_the_attribute)->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING )
    6565 
     66/*PAGE
     67 *
     68 *  _CORE_mutex_Seize_interrupt_trylock
     69 *
     70 *  NOTE: This is not really a MACRO version of this routine.
     71 *        A body is in coremutexseize.c that is duplicated
     72 *        from the .inl by hand.
     73 */
     74
     75int _CORE_mutex_Seize_interrupt_trylock(
     76  CORE_mutex_Control  *the_mutex,
     77  ISR_Level           *level_p
     78);
     79
    6680#endif
    6781/* end of include file */
  • cpukit/score/macros/rtems/score/coresem.inl

    r7f8c11c r43b6f75  
    3535  ( (_the_semaphore)->count )
    3636
     37/*PAGE
     38 *
     39 *  _CORE_semaphore_Seize_isr_disable
     40 *
     41 *  DESCRIPTION:
     42 *
     43 *  This routine attempts to receive a unit from the_semaphore.
     44 *  If a unit is available or if the wait flag is FALSE, then the routine
     45 *  returns.  Otherwise, the calling task is blocked until a unit becomes
     46 *  available.
     47 *
     48 *  NOTE: There is currently no MACRO version of this routine.
     49 */
     50
     51#define _CORE_semaphore_Seize_isr_disable( \
     52  _the_semaphore, _id, _wait, _timeout, _level_p) \
     53{ \
     54  Thread_Control *executing; \
     55  ISR_Level       level = *(_level_p); \
     56 \
     57  /* disabled when you get here */ \
     58 \
     59  executing = _Thread_Executing; \
     60  executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; \
     61  if ( (_the_semaphore)->count != 0 ) { \
     62    (_the_semaphore)->count -= 1; \
     63    _ISR_Enable( level ); \
     64  } else if ( !(_wait) ) { \
     65    _ISR_Enable( level ); \
     66    executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; \
     67  } else { \
     68    _Thread_Disable_dispatch(); \
     69    _ISR_Enable( level ); \
     70    _Thread_queue_Enter_critical_section( &(_the_semaphore)->Wait_queue ); \
     71    executing->Wait.queue          = &(_the_semaphore)->Wait_queue; \
     72    executing->Wait.id             = (_id); \
     73    _ISR_Enable( level ); \
     74 \
     75    _Thread_queue_Enqueue( &(_the_semaphore)->Wait_queue, (_timeout) ); \
     76    _Thread_Enable_dispatch(); \
     77  } \
     78}
     79
    3780
    3881#endif
Note: See TracChangeset for help on using the changeset viewer.