Changeset 16939b18 in rtems for cpukit/sapi


Ignore:
Timestamp:
Feb 9, 2015, 6:09:23 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
1c7ee73
Parents:
eb77534
Message:

Filesystem: Simplify FIFO and pipe configuration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/include/confdefs.h

    reb77534 r16939b18  
    218218    #endif
    219219  #endif
     220#endif
     221
     222/*
     223 * This sets up the resources for the FIFOs/pipes.
     224 */
     225
     226#if !defined(CONFIGURE_MAXIMUM_FIFOS)
     227  #define CONFIGURE_MAXIMUM_FIFOS 0
     228#endif
     229
     230#if !defined(CONFIGURE_MAXIMUM_PIPES)
     231  #define CONFIGURE_MAXIMUM_PIPES 0
     232#endif
     233
     234#if CONFIGURE_MAXIMUM_FIFOS > 0 || CONFIGURE_MAXIMUM_PIPES > 0
     235  #define CONFIGURE_BARRIERS_FOR_FIFOS \
     236    (2 * (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES))
     237  #define CONFIGURE_SEMAPHORES_FOR_FIFOS \
     238    (1 + (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES))
     239#else
     240  #define CONFIGURE_BARRIERS_FOR_FIFOS   0
     241  #define CONFIGURE_SEMAPHORES_FOR_FIFOS 0
    220242#endif
    221243
     
    343365#endif
    344366
    345 /**
    346  * Internall it is called FIFOs not pipes
    347  */
    348 #if defined(CONFIGURE_PIPES_ENABLED)
    349   #define CONFIGURE_FIFOS_ENABLED
    350 #endif
    351 
    352367#ifndef RTEMS_SCHEDSIM
    353368/**
     
    356371#if !defined(CONFIGURE_FILESYSTEM_ENTRY_IMFS) && \
    357372    defined(CONFIGURE_FILESYSTEM_IMFS)
    358   #if defined(CONFIGURE_FIFOS_ENABLED)
     373  #if CONFIGURE_MAXIMUM_FIFOS > 0 || CONFIGURE_MAXIMUM_PIPES > 0
    359374    #define CONFIGURE_FILESYSTEM_ENTRY_IMFS \
    360375      { RTEMS_FILESYSTEM_TYPE_IMFS, fifoIMFS_initialize }
     
    364379  #endif
    365380#endif
    366 #endif
    367 
    368 /**
    369  * This sets up the resources for the PIPES/FIFOs
    370  */
    371 #if defined(CONFIGURE_FIFOS_ENABLED)
    372   #if !defined(CONFIGURE_MAXIMUM_FIFOS) && !defined(CONFIGURE_MAXIMUM_PIPES)
    373      #error "No FIFOs or PIPES configured"
    374   #endif
    375   #if !defined(CONFIGURE_MAXIMUM_FIFOS)
    376     #define CONFIGURE_MAXIMUM_FIFOS 0
    377   #endif
    378   #if !defined(CONFIGURE_MAXIMUM_PIPES)
    379     #define CONFIGURE_MAXIMUM_PIPES 0
    380   #endif
    381   #define CONFIGURE_BARRIERS_FOR_FIFOS \
    382     (2 * (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES))
    383   #define CONFIGURE_SEMAPHORES_FOR_FIFOS \
    384     (1 + (CONFIGURE_MAXIMUM_FIFOS + CONFIGURE_MAXIMUM_PIPES))
    385 #else
    386   #define CONFIGURE_BARRIERS_FOR_FIFOS   0
    387   #define CONFIGURE_SEMAPHORES_FOR_FIFOS 0
    388381#endif
    389382
Note: See TracChangeset for help on using the changeset viewer.