Changeset 9052f88 in rtems


Ignore:
Timestamp:
May 11, 2015, 8:14:31 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
d8752860
Parents:
7a70a09
git-author:
Sebastian Huber <sebastian.huber@…> (05/11/15 08:14:31)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/19/15 10:00:48)
Message:

score: Do not inline SMP lock if profiling enabled

This reduces the code size drastically.

Location:
cpukit/score
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/Makefile.am

    r7a70a09 r9052f88  
    139139libscore_a_SOURCES += src/schedulersmpdebug.c
    140140libscore_a_SOURCES += src/smp.c
     141libscore_a_SOURCES += src/smplock.c
    141142libscore_a_SOURCES += src/smpmulticastaction.c
    142143libscore_a_SOURCES += src/cpuset.c
  • cpukit/score/include/rtems/score/smplock.h

    r7a70a09 r9052f88  
    1111 * On-Line Applications Research Corporation (OAR).
    1212 *
    13  * Copyright (c) 2013-2014 embedded brains GmbH
     13 * Copyright (c) 2013-2015 embedded brains GmbH
    1414 *
    1515 * The license and distribution terms for this file may be
     
    3131#include <rtems/score/chainimpl.h>
    3232#include <string.h>
     33#endif
     34
     35#if defined( RTEMS_PROFILING )
     36#define RTEMS_SMP_LOCK_DO_NOT_INLINE
    3337#endif
    3438
     
    369373 * persistent throughout the life time of this statistics block.
    370374 */
     375#if defined( RTEMS_SMP_LOCK_DO_NOT_INLINE )
     376void _SMP_lock_Initialize(
     377  SMP_lock_Control *lock,
     378  const char *name
     379);
     380
     381static inline void _SMP_lock_Initialize_body(
     382#else
    371383static inline void _SMP_lock_Initialize(
     384#endif
    372385  SMP_lock_Control *lock,
    373386  const char *name
     
    384397 * @param[in,out] lock The SMP lock control.
    385398 */
     399#if defined( RTEMS_SMP_LOCK_DO_NOT_INLINE )
     400void _SMP_lock_Destroy( SMP_lock_Control *lock );
     401
     402static inline void _SMP_lock_Destroy_body( SMP_lock_Control *lock )
     403#else
    386404static inline void _SMP_lock_Destroy( SMP_lock_Control *lock )
     405#endif
    387406{
    388407  _SMP_ticket_lock_Destroy( &lock->ticket_lock );
     
    400419 * pair.
    401420 */
     421#if defined( RTEMS_SMP_LOCK_DO_NOT_INLINE )
     422void _SMP_lock_Acquire(
     423  SMP_lock_Control *lock,
     424  SMP_lock_Context *context
     425);
     426
     427static inline void _SMP_lock_Acquire_body(
     428#else
    402429static inline void _SMP_lock_Acquire(
     430#endif
    403431  SMP_lock_Control *lock,
    404432  SMP_lock_Context *context
     
    416444 * pair.
    417445 */
     446#if defined( RTEMS_SMP_LOCK_DO_NOT_INLINE )
     447void _SMP_lock_Release(
     448  SMP_lock_Control *lock,
     449  SMP_lock_Context *context
     450);
     451
     452static inline void _SMP_lock_Release_body(
     453#else
    418454static inline void _SMP_lock_Release(
     455#endif
    419456  SMP_lock_Control *lock,
    420457  SMP_lock_Context *context
     
    432469 * pair.
    433470 */
     471#if defined( RTEMS_SMP_LOCK_DO_NOT_INLINE )
     472void _SMP_lock_ISR_disable_and_acquire(
     473  SMP_lock_Control *lock,
     474  SMP_lock_Context *context
     475);
     476
     477static inline void _SMP_lock_ISR_disable_and_acquire_body(
     478#else
    434479static inline void _SMP_lock_ISR_disable_and_acquire(
     480#endif
    435481  SMP_lock_Control *lock,
    436482  SMP_lock_Context *context
     
    448494 * pair.
    449495 */
     496#if defined( RTEMS_SMP_LOCK_DO_NOT_INLINE )
     497void _SMP_lock_Release_and_ISR_enable(
     498  SMP_lock_Control *lock,
     499  SMP_lock_Context *context
     500);
     501
     502static inline void _SMP_lock_Release_and_ISR_enable_body(
     503#else
    450504static inline void _SMP_lock_Release_and_ISR_enable(
     505#endif
    451506  SMP_lock_Control *lock,
    452507  SMP_lock_Context *context
Note: See TracChangeset for help on using the changeset viewer.