Changeset 16939b18 in rtems


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

Filesystem: Simplify FIFO and pipe configuration

Files:
7 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
  • testsuites/psxtests/psximfs02/init.c

    reb77534 r16939b18  
    218218#define CONFIGURE_INIT
    219219
    220 #define CONFIGURE_FIFOS_ENABLED
    221220#define CONFIGURE_MAXIMUM_FIFOS 1
    222221
  • testsuites/psxtests/psxpipe01/init.c

    reb77534 r16939b18  
    110110#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    111111
    112 #define CONFIGURE_PIPES_ENABLED
    113112#define CONFIGURE_MAXIMUM_PIPES 2
    114113
  • testsuites/sptests/spfifo02/init.c

    reb77534 r16939b18  
    215215
    216216#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
    217 #define CONFIGURE_FIFOS_ENABLED
    218217#define CONFIGURE_MAXIMUM_FIFOS 1
    219218
  • testsuites/sptests/spfifo03/init.c

    reb77534 r16939b18  
    217217
    218218#define CONFIGURE_INIT
    219 #define CONFIGURE_FIFOS_ENABLED
    220219#define CONFIGURE_MAXIMUM_FIFOS 1
    221220
  • testsuites/sptests/spfifo04/init.c

    reb77534 r16939b18  
    103103
    104104#define CONFIGURE_MAXIMUM_TASKS 3
    105 #define CONFIGURE_MAXIMUM_BARRIERS 1
    106105#define CONFIGURE_MAXIMUM_FIFOS 1
    107106
     
    110109#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
    111110
    112 #define CONFIGURE_FIFOS_ENABLED
    113 
    114111#define CONFIGURE_INIT
    115112#include <rtems/confdefs.h>
  • testsuites/sptests/spfifo05/init.c

    reb77534 r16939b18  
    272272
    273273#define CONFIGURE_INIT
    274 #define CONFIGURE_FIFOS_ENABLED
    275274#define CONFIGURE_MAXIMUM_FIFOS 1
    276275
Note: See TracChangeset for help on using the changeset viewer.