Changeset 1fc2e960 in rtems for cpukit/sapi


Ignore:
Timestamp:
Jun 2, 2014, 12:46:18 PM (5 years ago)
Author:
Ralf Kirchner <ralf.kirchner@…>
Branches:
4.11, master
Children:
3e201139
Parents:
d8ac087
git-author:
Ralf Kirchner <ralf.kirchner@…> (06/02/14 12:46:18)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/02/14 14:26:25)
Message:

libblock: Add RTEMS_BDBUF_USE_PTHREAD

Use the PTHREAD mutexes and condition variables if available. This
helps on SMP configurations to avoid the home grown condition variables
via disabled preemption.

File:
1 edited

Legend:

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

    rd8ac087 r1fc2e960  
    15211521    0 : CONFIGURE_BDBUF_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE))
    15221522
    1523   /*
    1524    *  Semaphores:
    1525    *    o disk lock
    1526    *    o bdbuf lock
    1527    *    o bdbuf sync lock
    1528    *    o bdbuf access condition
    1529    *    o bdbuf transfer condition
    1530    *    o bdbuf buffer condition
    1531    */
    1532   #define CONFIGURE_LIBBLOCK_SEMAPHORES 6
     1523  #ifdef RTEMS_BDBUF_USE_PTHREAD
     1524    /*
     1525     * Semaphores:
     1526     *   o disk lock
     1527     */
     1528    #define CONFIGURE_LIBBLOCK_SEMAPHORES 1
     1529
     1530    /*
     1531     * POSIX Mutexes:
     1532     *  o bdbuf lock
     1533     *  o bdbuf sync lock
     1534     */
     1535    #define CONFIGURE_LIBBLOCK_POSIX_MUTEXES 2
     1536
     1537    /*
     1538     * POSIX Condition Variables:
     1539     *  o bdbuf access condition
     1540     *  o bdbuf transfer condition
     1541     *  o bdbuf buffer condition
     1542     */
     1543    #define CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES 3
     1544  #else
     1545    /*
     1546     * Semaphores:
     1547     *   o disk lock
     1548     *   o bdbuf lock
     1549     *   o bdbuf sync lock
     1550     *   o bdbuf access condition
     1551     *   o bdbuf transfer condition
     1552     *   o bdbuf buffer condition
     1553     */
     1554    #define CONFIGURE_LIBBLOCK_SEMAPHORES 6
     1555
     1556    #define CONFIGURE_LIBBLOCK_POSIX_MUTEXES 0
     1557    #define CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES 0
     1558  #endif
    15331559
    15341560  #if defined(CONFIGURE_HAS_OWN_BDBUF_TABLE) || \
     
    15411567  #define CONFIGURE_LIBBLOCK_TASK_EXTRA_STACKS 0
    15421568  #define CONFIGURE_LIBBLOCK_SEMAPHORES 0
     1569  #define CONFIGURE_LIBBLOCK_POSIX_MUTEXES 0
     1570  #define CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES 0
    15431571#endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
    15441572
     
    22102238  #define CONFIGURE_POSIX_MUTEXES \
    22112239    (CONFIGURE_MAXIMUM_POSIX_MUTEXES + \
     2240      CONFIGURE_LIBBLOCK_POSIX_MUTEXES + \
    22122241      CONFIGURE_GNAT_MUTEXES + \
    22132242      CONFIGURE_MAXIMUM_ADA_TASKS + \
     
    22212250  #define CONFIGURE_POSIX_CONDITION_VARIABLES \
    22222251    (CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES + \
     2252      CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES + \
    22232253      CONFIGURE_MAXIMUM_ADA_TASKS + \
    22242254      CONFIGURE_MAXIMUM_FAKE_ADA_TASKS + \
Note: See TracChangeset for help on using the changeset viewer.