Changeset c9a0a10 in rtems


Ignore:
Timestamp:
Apr 25, 2014, 6:14:19 AM (5 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.11, master
Children:
5d2ae6e2
Parents:
f412e12
Message:

rtems: Account for file system semaphores.

Add support to account for the semaphores used by the file systems.

File:
1 edited

Legend:

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

    rf412e12 rc9a0a10  
    423423      defined(CONFIGURE_FILESYSTEM_NFS)
    424424    #include <librtemsNfs.h>
     425    #if !defined(CONFIGURE_MAXIMUM_NFS_MOUNTS)
     426      #define CONFIGURE_MAXIMUM_NFS_MOUNTS 1
     427    #endif
    425428    #define CONFIGURE_FILESYSTEM_ENTRY_NFS \
    426429      { RTEMS_FILESYSTEM_TYPE_NFS, rtems_nfs_initialize }
     430    #define CONFIGURE_SEMAPHORES_FOR_NFS ((CONFIGURE_MAXIMUM_NFS_MOUNTS * 2) + 1)
     431  #else
     432    #define CONFIGURE_SEMAPHORES_FOR_NFS 0
    427433  #endif
    428434#endif
     
    434440    defined(CONFIGURE_FILESYSTEM_DOSFS)
    435441  #include <rtems/dosfs.h>
     442  #if !defined(CONFIGURE_MAXIMUM_DOSFS_MOUNTS)
     443    #define CONFIGURE_MAXIMUM_DOSFS_MOUNTS 1
     444  #endif
    436445  #define CONFIGURE_FILESYSTEM_ENTRY_DOSFS \
    437446    { RTEMS_FILESYSTEM_TYPE_DOSFS, rtems_dosfs_initialize }
     447  #define CONFIGURE_SEMAPHORES_FOR_DOSFS CONFIGURE_MAXIMUM_DOSFS_MOUNTS
     448#else
     449  #define CONFIGURE_SEMAPHORES_FOR_DOSFS 0
    438450#endif
    439451
     
    444456    defined(CONFIGURE_FILESYSTEM_RFS)
    445457  #include <rtems/rtems-rfs.h>
     458  #if !defined(CONFIGURE_MAXIMUM_RFS_MOUNTS)
     459    #define CONFIGURE_MAXIMUM_RFS_MOUNTS 1
     460  #endif
    446461  #define CONFIGURE_FILESYSTEM_ENTRY_RFS \
    447462    { RTEMS_FILESYSTEM_TYPE_RFS, rtems_rfs_rtems_initialise }
     463  #define CONFIGURE_SEMAPHORES_FOR_RFS CONFIGURE_MAXIMUM_RFS_MOUNTS
     464#else
     465  #define CONFIGURE_SEMAPHORES_FOR_RFS 0
    448466#endif
    449467
     
    454472    defined(CONFIGURE_FILESYSTEM_JFFS2)
    455473  #include <rtems/jffs2.h>
     474  #if !defined(CONFIGURE_MAXIMUM_JFFS2_MOUNTS)
     475    #define CONFIGURE_MAXIMUM_JFFS2_MOUNTS 1
     476  #endif
    456477  #define CONFIGURE_FILESYSTEM_ENTRY_JFFS2 \
    457478    { RTEMS_FILESYSTEM_TYPE_JFFS2, rtems_jffs2_initialize }
    458 #endif
     479  #define CONFIGURE_SEMAPHORES_FOR_JFFS2 CONFIGURE_MAXIMUM_JFFS2_MOUNTS
     480#else
     481  #define CONFIGURE_SEMAPHORES_FOR_JFFS2 0
     482#endif
     483
     484#define CONFIGURE_SEMAPHORES_FOR_FILE_SYSTEMS (CONFIGURE_SEMAPHORES_FOR_FIFOS + \
     485                                               CONFIGURE_SEMAPHORES_FOR_NFS + \
     486                                               CONFIGURE_SEMAPHORES_FOR_DOSFS + \
     487                                               CONFIGURE_SEMAPHORES_FOR_RFS + \
     488                                               CONFIGURE_SEMAPHORES_FOR_JFFS2)
    459489
    460490#ifdef CONFIGURE_INIT
     
    17521782    (CONFIGURE_MAXIMUM_SEMAPHORES + CONFIGURE_LIBIO_SEMAPHORES + \
    17531783      CONFIGURE_TERMIOS_SEMAPHORES + CONFIGURE_LIBBLOCK_SEMAPHORES + \
    1754       CONFIGURE_SEMAPHORES_FOR_FIFOS)
     1784      CONFIGURE_SEMAPHORES_FOR_FILE_SYSTEMS)
    17551785
    17561786  /*
     
    28642894 *  the POSIX API was not configured into RTEMS, error out.
    28652895 *
    2866  *  @note POSIX Keys are always available so the parameters 
     2896 *  @note POSIX Keys are always available so the parameters
    28672897 *        CONFIGURE_MAXIMUM_POSIX_KEYS and
    28682898 *        CONFIGURE_MAXIMUM_POSIX_KEY_VALUE_PAIRS  are not in this list.
Note: See TracChangeset for help on using the changeset viewer.