Changeset 5222488 in rtems


Ignore:
Timestamp:
Sep 26, 2017, 5:49:17 AM (20 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
de59c065
Parents:
89fc9345
git-author:
Sebastian Huber <sebastian.huber@…> (09/26/17 05:49:17)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/05/17 12:29:02)
Message:

posix: Implement self-contained POSIX condvar

POSIX condition variables are now available in all configurations and no
longer depend on --enable-posix.

Update #2514.
Update #3113.

Files:
3 deleted
110 edited

Legend:

Unmodified
Added
Removed
  • c/src/ada-tests/mptests/mp01/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/mptests/mp03/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/mptests/mp04/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/mptests/mp05/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/mptests/mp06/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/mptests/mp07/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/mptests/mp08/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/mptests/mp09/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/mptests/mp10/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/mptests/mp11/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/mptests/mp12/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/mptests/mp13/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/mptests/mp14/config_base.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#include <rtems/confdefs.h>
  • c/src/ada-tests/samples/base_mp/config.h

    r89fc9345 r5222488  
    2626#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2727#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    28 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2928
    3029/*
  • c/src/ada-tests/samples/base_sp/config.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#define CONFIGURE_MAXIMUM_TASKS            2
  • c/src/ada-tests/samples/hello/config.h

    r89fc9345 r5222488  
    2525#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2626#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    27 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2827
    2928#define CONFIGURE_MAXIMUM_TASKS              1
  • c/src/ada-tests/samples/nsecs/config.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#define CONFIGURE_MAXIMUM_TASKS              1
  • c/src/ada-tests/samples/ticker/config.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#define CONFIGURE_MAXIMUM_TASKS             4
  • c/src/ada-tests/sptests/sp01/config.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#define CONFIGURE_MAXIMUM_TASKS             4
  • c/src/ada-tests/sptests/sp02/config.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#define CONFIGURE_MAXIMUM_TASKS             4
  • c/src/ada-tests/sptests/sp03/config.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#define CONFIGURE_MAXIMUM_TASKS             3
  • c/src/ada-tests/sptests/sp04/config.h

    r89fc9345 r5222488  
    2727#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2828#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    29 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3029
    3130#define CONFIGURE_MAXIMUM_TASKS             4
  • c/src/ada-tests/sptests/sp05/config.h

    r89fc9345 r5222488  
    2626#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2727#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    28 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2928
    3029#define CONFIGURE_MAXIMUM_TASKS             4
  • c/src/ada-tests/sptests/sp06/config.h

    r89fc9345 r5222488  
    2626#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2727#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    28 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2928
    3029#define CONFIGURE_MAXIMUM_TASKS             4
  • c/src/ada-tests/sptests/sp07/config.h

    r89fc9345 r5222488  
    2727#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2828#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    29 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3029
    3130#define CONFIGURE_MAXIMUM_TASKS             5
  • c/src/ada-tests/sptests/sp08/config.h

    r89fc9345 r5222488  
    2626#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2727#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    28 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2928
    3029#define CONFIGURE_MAXIMUM_TASKS             2
  • c/src/ada-tests/sptests/sp09/config.h

    r89fc9345 r5222488  
    3434#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    3535#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    36 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3736
    3837#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/sp11/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/sp12/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/sp13/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/sp14/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/sp15/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/sp16/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/sp17/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/sp19/config.h

    r89fc9345 r5222488  
    2424#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2525#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    26 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2726
    2827#define CONFIGURE_MAXIMUM_TASKS             7
  • c/src/ada-tests/sptests/sp20/config.h

    r89fc9345 r5222488  
    2727#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2828#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    29 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3029
    3130#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/sp22/config.h

    r89fc9345 r5222488  
    2727#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2828#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    29 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3029
    3130#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/sp23/config.h

    r89fc9345 r5222488  
    2727#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2828#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    29 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3029
    3130#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/sp24/config.h

    r89fc9345 r5222488  
    2727#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2828#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    29 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3029
    3130#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/sp25/config.h

    r89fc9345 r5222488  
    2727#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2828#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    29 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3029
    3130#include <rtems/confdefs.h>
  • c/src/ada-tests/sptests/spname01/config.h

    r89fc9345 r5222488  
    2525#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2626#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    27 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    2827
    2928#define CONFIGURE_MAXIMUM_TASKS              1
  • c/src/ada-tests/tmtests/tm01/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm02/config.h

    r89fc9345 r5222488  
    2929#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    3030#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    31 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3231
    3332#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm03/config.h

    r89fc9345 r5222488  
    2929#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    3030#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    31 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3231
    3332#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm04/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm05/config.h

    r89fc9345 r5222488  
    2929#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    3030#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    31 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3231
    3332#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm06/config.h

    r89fc9345 r5222488  
    2929#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    3030#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    31 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3231
    3332#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm07/config.h

    r89fc9345 r5222488  
    2929#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    3030#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    31 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3231
    3332#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm08/config.h

    r89fc9345 r5222488  
    2929#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    3030#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    31 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3231
    3332#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm09/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm10/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm11/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm12/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm13/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm14/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm15/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm16/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm17/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm18/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm19/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm20/config.h

    r89fc9345 r5222488  
    2929#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    3030#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    31 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3231
    3332#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm21/config.h

    r89fc9345 r5222488  
    3434#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    3535#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    36 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3736
    3837#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm22/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm23/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm24/config.h

    r89fc9345 r5222488  
    2727#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2828#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    29 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3029
    3130#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm25/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm28/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tm29/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tmck/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • c/src/ada-tests/tmtests/tmoverhd/config.h

    r89fc9345 r5222488  
    2828#define CONFIGURE_MAXIMUM_POSIX_KEYS                 10
    2929#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              20
    30 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  10
    3130
    3231#include <rtems/confdefs.h>
  • cpukit/libcsupport/include/rtems/libcsupport.h

    r89fc9345 r5222488  
    112112
    113113typedef struct {
    114   uint32_t active_condition_variables;
    115114  uint32_t active_message_queues;
    116115  uint32_t active_mutexes;
  • cpukit/libcsupport/src/resource_snapshot.c

    r89fc9345 r5222488  
    4343#ifdef RTEMS_POSIX_API
    4444  #include <rtems/posix/barrierimpl.h>
    45   #include <rtems/posix/condimpl.h>
    4645  #include <rtems/posix/mqueueimpl.h>
    4746  #include <rtems/posix/muteximpl.h>
     
    6968  #ifdef RTEMS_POSIX_API
    7069    ,
    71     { OBJECTS_POSIX_API, OBJECTS_POSIX_CONDITION_VARIABLES },
    7270    { OBJECTS_POSIX_API, OBJECTS_POSIX_MESSAGE_QUEUES },
    7371    { OBJECTS_POSIX_API, OBJECTS_POSIX_MUTEXES },
  • cpukit/posix/Makefile.am

    r89fc9345 r5222488  
    1818## Some POSIX threads features are needed all the time
    1919include_rtems_posix_HEADERS += include/rtems/posix/barrierimpl.h
     20include_rtems_posix_HEADERS += include/rtems/posix/condimpl.h
    2021include_rtems_posix_HEADERS += include/rtems/posix/key.h
    2122include_rtems_posix_HEADERS += include/rtems/posix/keyimpl.h
     
    3536# include/rtems/posix
    3637include_rtems_posix_HEADERS += include/rtems/posix/aio_misc.h
    37 include_rtems_posix_HEADERS += include/rtems/posix/cond.h
    38 include_rtems_posix_HEADERS += include/rtems/posix/condimpl.h
    3938include_rtems_posix_HEADERS += include/rtems/posix/mmanimpl.h
    4039include_rtems_posix_HEADERS += include/rtems/posix/mqueue.h
     
    7372    src/pbarrierwait.c
    7473
    75 if HAS_PTHREADS
    76 libposix_a_SOURCES +=  src/pthreadatfork.c
    77 
    78 ## CANCEL_C_FILES
    79 libposix_a_SOURCES += src/cancel.c \
    80     src/cleanuppush.c src/setcancelstate.c \
    81     src/setcanceltype.c src/testcancel.c
    82 
    8374## CONDITION_VARIABLE_C_FILES
    84 libposix_a_SOURCES += src/cond.c src/condattrdestroy.c \
     75libposix_a_SOURCES += src/condattrdestroy.c \
    8576    src/condattrinit.c  \
    8677    src/condattrgetpshared.c src/condattrsetpshared.c \
     
    8879    src/condbroadcast.c src/conddefaultattributes.c src/conddestroy.c \
    8980    src/condinit.c src/condsignal.c src/condsignalsupp.c \
    90     src/condtimedwait.c src/condwait.c src/condwaitsupp.c src/condget.c
     81    src/condtimedwait.c src/condwait.c src/condwaitsupp.c
     82
     83if HAS_PTHREADS
     84libposix_a_SOURCES +=  src/pthreadatfork.c
     85
     86## CANCEL_C_FILES
     87libposix_a_SOURCES += src/cancel.c \
     88    src/cleanuppush.c src/setcancelstate.c \
     89    src/setcanceltype.c src/testcancel.c
    9190
    9291## MEMORY_C_FILES
  • cpukit/posix/include/rtems/posix/condimpl.h

    r89fc9345 r5222488  
    1717#ifndef _RTEMS_POSIX_CONDIMPL_H
    1818#define _RTEMS_POSIX_CONDIMPL_H
    19  
    20 #include <rtems/posix/cond.h>
    21 #include <rtems/score/objectimpl.h>
    22 #include <rtems/score/threadqimpl.h>
    2319
    2420#include <errno.h>
     21#include <pthread.h>
     22
     23#include <rtems/score/percpu.h>
     24#include <rtems/score/threadqimpl.h>
    2525
    2626#ifdef __cplusplus
    2727extern "C" {
    2828#endif
     29
     30typedef struct {
     31  unsigned long flags;
     32  Thread_queue_Syslock_queue Queue;
     33  pthread_mutex_t *mutex;
     34} POSIX_Condition_variables_Control;
     35
     36#define POSIX_CONDITION_VARIABLES_CLOCK_MONOTONIC 0x1UL
     37
     38#define POSIX_CONDITION_VARIABLES_FLAGS_MASK 0x1UL
     39
     40#define POSIX_CONDITION_VARIABLES_MAGIC 0x18dfb1feUL
    2941
    3042/**
     
    3850#define POSIX_CONDITION_VARIABLE_OF_THREAD_QUEUE_QUEUE( queue ) \
    3951  RTEMS_CONTAINER_OF( \
    40     queue, POSIX_Condition_variables_Control, Wait_queue.Queue )
    41 
    42 /**
    43  *  The following defines the information control block used to manage
    44  *  this class of objects.
    45  */
    46 extern Objects_Information _POSIX_Condition_variables_Information;
     52    queue, POSIX_Condition_variables_Control, Queue.Queue )
    4753
    4854/**
     
    5157extern const pthread_condattr_t _POSIX_Condition_variables_Default_attributes;
    5258
     59static inline POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get(
     60  pthread_cond_t *cond
     61)
     62{
     63  return (POSIX_Condition_variables_Control *) cond;
     64}
     65
    5366RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Initialize(
    5467  POSIX_Condition_variables_Control *the_cond,
     
    5669)
    5770{
    58   _Thread_queue_Object_initialize( &the_cond->Wait_queue );
     71  unsigned long flags;
     72
     73  _Thread_queue_Queue_initialize( &the_cond->Queue.Queue, NULL );
    5974  the_cond->mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
    60   the_cond->clock = the_attr->clock;
     75
     76  flags = (uintptr_t) the_cond ^ POSIX_CONDITION_VARIABLES_MAGIC;
     77  flags &= ~POSIX_CONDITION_VARIABLES_FLAGS_MASK;
     78
     79  if ( the_attr->clock == CLOCK_MONOTONIC ) {
     80    flags |= POSIX_CONDITION_VARIABLES_CLOCK_MONOTONIC;
     81  }
     82
     83  the_cond->flags = flags;
    6184}
    6285
     
    6588)
    6689{
    67   _Thread_queue_Destroy( &the_cond->Wait_queue );
     90  the_cond->flags = ~the_cond->flags;
    6891}
    6992
    70 RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Acquire_critical(
     93RTEMS_INLINE_ROUTINE clockid_t _POSIX_Condition_variables_Get_clock(
     94  unsigned long flags
     95)
     96{
     97  if ( ( flags & POSIX_CONDITION_VARIABLES_CLOCK_MONOTONIC ) != 0 ) {
     98    return CLOCK_MONOTONIC;
     99  }
     100
     101  return CLOCK_REALTIME;
     102}
     103
     104RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Condition_variables_Acquire(
    71105  POSIX_Condition_variables_Control *the_cond,
    72106  Thread_queue_Context              *queue_context
    73107)
    74108{
    75   _Thread_queue_Acquire_critical( &the_cond->Wait_queue, queue_context );
     109  ISR_Level       level;
     110  Thread_Control *executing;
     111
     112  _Thread_queue_Context_ISR_disable( queue_context, level );
     113  _Thread_queue_Context_set_ISR_level( queue_context, level );
     114  executing = _Thread_Executing;
     115  _Thread_queue_Queue_acquire_critical(
     116    &the_cond->Queue.Queue,
     117    &executing->Potpourri_stats,
     118    &queue_context->Lock_context.Lock_context
     119  );
     120
     121  return executing;
    76122}
    77123
     
    81127)
    82128{
    83   _Thread_queue_Release( &the_cond->Wait_queue, queue_context );
    84 }
    85 
    86 /**
    87  *  @brief POSIX Condition Variable Allocate
    88  *
    89  *  This function allocates a condition variable control block from
    90  *  the inactive chain of free condition variable control blocks.
    91  */
    92 RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *
    93   _POSIX_Condition_variables_Allocate( void )
    94 {
    95   return (POSIX_Condition_variables_Control *)
    96     _Objects_Allocate( &_POSIX_Condition_variables_Information );
    97 }
    98 
    99 /**
    100  *  @brief POSIX Condition Variable Free
    101  *
    102  *  This routine frees a condition variable control block to the
    103  *  inactive chain of free condition variable control blocks.
    104  */
    105 RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
    106   POSIX_Condition_variables_Control *the_condition_variable
    107 )
    108 {
    109   _Objects_Free(
    110     &_POSIX_Condition_variables_Information,
    111     &the_condition_variable->Object
     129  _Thread_queue_Queue_release(
     130    &the_cond->Queue.Queue,
     131    &queue_context->Lock_context.Lock_context
    112132  );
    113133}
    114 
    115 POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get(
    116   pthread_cond_t       *cond,
    117   Thread_queue_Context *queue_context
    118 );
    119134
    120135/**
     
    141156);
    142157
     158bool _POSIX_Condition_variables_Auto_initialization(
     159  POSIX_Condition_variables_Control *the_cond
     160);
     161
     162#define POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags ) \
     163  do { \
     164    if ( ( the_cond ) == NULL ) { \
     165      return EINVAL; \
     166    } \
     167    flags = ( the_cond )->flags; \
     168    if ( \
     169      ( ( (uintptr_t) ( the_cond ) ^ POSIX_CONDITION_VARIABLES_MAGIC ) \
     170          & ~POSIX_CONDITION_VARIABLES_FLAGS_MASK ) \
     171        != ( flags & ~POSIX_CONDITION_VARIABLES_FLAGS_MASK ) \
     172    ) { \
     173      if ( !_POSIX_Condition_variables_Auto_initialization( the_cond ) ) { \
     174        return EINVAL; \
     175      } \
     176    } \
     177  } while ( 0 )
     178
    143179#ifdef __cplusplus
    144180}
  • cpukit/posix/include/rtems/posix/config.h

    r89fc9345 r5222488  
    7171  /**
    7272   * This field contains the maximum number of POSIX API
    73    * condition variables which are configured for this application.
    74    */
    75   uint32_t                            maximum_condition_variables;
    76 
    77   /**
    78    * This field contains the maximum number of POSIX API
    7973   * timers which are configured for this application.
    8074   */
  • cpukit/posix/preinstall.am

    r89fc9345 r5222488  
    3131        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/barrierimpl.h
    3232PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/barrierimpl.h
     33
     34$(PROJECT_INCLUDE)/rtems/posix/condimpl.h: include/rtems/posix/condimpl.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
     35        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/condimpl.h
     36PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/condimpl.h
    3337
    3438$(PROJECT_INCLUDE)/rtems/posix/key.h: include/rtems/posix/key.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
     
    8084        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/aio_misc.h
    8185PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/aio_misc.h
    82 
    83 $(PROJECT_INCLUDE)/rtems/posix/cond.h: include/rtems/posix/cond.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
    84         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/cond.h
    85 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/cond.h
    86 
    87 $(PROJECT_INCLUDE)/rtems/posix/condimpl.h: include/rtems/posix/condimpl.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
    88         $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/condimpl.h
    89 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/condimpl.h
    9086
    9187$(PROJECT_INCLUDE)/rtems/posix/mmanimpl.h: include/rtems/posix/mmanimpl.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
  • cpukit/posix/src/conddestroy.c

    r89fc9345 r5222488  
    2525 *         P1003.1c/Draft 10, p. 87
    2626 */
    27 int pthread_cond_destroy(
    28   pthread_cond_t           *cond
    29 )
     27int pthread_cond_destroy( pthread_cond_t *cond )
    3028{
    3129  POSIX_Condition_variables_Control *the_cond;
     30  unsigned long                      flags;
    3231  Thread_queue_Context               queue_context;
    3332
    34   _Objects_Allocator_lock();
    35   the_cond = _POSIX_Condition_variables_Get( cond, &queue_context );
     33  the_cond = _POSIX_Condition_variables_Get( cond );
     34  POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags );
    3635
    37   if ( the_cond == NULL ) {
    38     _Objects_Allocator_unlock();
    39     return EINVAL;
    40   }
     36  _Thread_queue_Context_initialize( &queue_context );
     37  _POSIX_Condition_variables_Acquire( the_cond, &queue_context );
    4138
    42   _POSIX_Condition_variables_Acquire_critical( the_cond, &queue_context );
    43 
    44   if ( !_Thread_queue_Is_empty( &the_cond->Wait_queue.Queue ) ) {
     39  if ( !_Thread_queue_Is_empty( &the_cond->Queue.Queue ) ) {
    4540    _POSIX_Condition_variables_Release( the_cond, &queue_context );
    46     _Objects_Allocator_unlock();
    4741    return EBUSY;
    4842  }
    4943
    50   _Objects_Close(
    51     &_POSIX_Condition_variables_Information,
    52     &the_cond->Object
    53   );
    5444  _POSIX_Condition_variables_Release( the_cond, &queue_context );
    5545  _POSIX_Condition_variables_Destroy( the_cond );
    56   _POSIX_Condition_variables_Free( the_cond );
    57   _Objects_Allocator_unlock();
    5846  return 0;
    5947}
  • cpukit/posix/src/condinit.c

    r89fc9345 r5222488  
    2222#include <rtems/posix/posixapi.h>
    2323
     24RTEMS_STATIC_ASSERT(
     25  offsetof( POSIX_Condition_variables_Control, flags )
     26    == offsetof( pthread_cond_t, _flags ),
     27  POSIX_CONDITION_VARIABLES_CONTROL_FLAGS
     28);
     29
     30RTEMS_STATIC_ASSERT(
     31  offsetof( POSIX_Condition_variables_Control, mutex )
     32    == offsetof( pthread_cond_t, _mutex ),
     33  POSIX_CONDITION_VARIABLES_CONTROL_COUNT
     34);
     35
     36RTEMS_STATIC_ASSERT(
     37  offsetof( POSIX_Condition_variables_Control, Queue )
     38    == offsetof( pthread_cond_t, _Queue ),
     39  POSIX_CONDITION_VARIABLES_CONTROL_QUEUE
     40);
     41
     42RTEMS_STATIC_ASSERT(
     43  sizeof( POSIX_Condition_variables_Control ) == sizeof( pthread_cond_t ),
     44  POSIX_CONDITION_VARIABLES_CONTROL_SIZE
     45);
     46
    2447/**
    2548 *  11.4.2 Initializing and Destroying a Condition Variable,
     
    3154)
    3255{
    33   POSIX_Condition_variables_Control   *the_cond;
    34   const pthread_condattr_t            *the_attr;
     56  POSIX_Condition_variables_Control *the_cond;
    3557
    36   if ( attr ) the_attr = attr;
    37   else        the_attr = &_POSIX_Condition_variables_Default_attributes;
     58  the_cond = _POSIX_Condition_variables_Get( cond );
    3859
    39   /*
    40    *  Be careful about attributes when global!!!
    41    */
    42 
    43   if ( !the_attr->is_initialized )
    44     return EINVAL;
    45 
    46   if ( !_POSIX_Is_valid_pshared( the_attr->process_shared ) ) {
     60  if ( the_cond == NULL ) {
    4761    return EINVAL;
    4862  }
    4963
    50   the_cond = _POSIX_Condition_variables_Allocate();
    51 
    52   if ( !the_cond ) {
    53     _Objects_Allocator_unlock();
    54     return ENOMEM;
     64  if ( attr == NULL ) {
     65    attr = &_POSIX_Condition_variables_Default_attributes;
    5566  }
    5667
    57   _POSIX_Condition_variables_Initialize( the_cond, the_attr );
     68  if ( !attr->is_initialized ) {
     69    return EINVAL;
     70  }
    5871
    59   _Objects_Open_u32(
    60     &_POSIX_Condition_variables_Information,
    61     &the_cond->Object,
    62     0
    63   );
     72  if ( !_POSIX_Is_valid_pshared( attr->process_shared ) ) {
     73    return EINVAL;
     74  }
    6475
    65   *cond = the_cond->Object.id;
    66 
    67   _Objects_Allocator_unlock();
    68 
     76  _POSIX_Condition_variables_Initialize( the_cond, attr );
    6977  return 0;
    7078}
  • cpukit/posix/src/condsignalsupp.c

    r89fc9345 r5222488  
    3333)
    3434{
    35   Thread_Control *the_thread;
     35  POSIX_Condition_variables_Control *the_cond;
     36  unsigned long                      flags;
     37  const Thread_queue_Operations     *operations;
     38  Thread_queue_Heads                *heads;
     39
     40  the_cond = _POSIX_Condition_variables_Get( cond );
     41  POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags );
     42  operations = POSIX_CONDITION_VARIABLES_TQ_OPERATIONS;
    3643
    3744  do {
    38     POSIX_Condition_variables_Control *the_cond;
    39     Thread_queue_Context               queue_context;
     45    Thread_queue_Context queue_context;
    4046
    41     the_cond = _POSIX_Condition_variables_Get( cond, &queue_context );
     47    _Thread_queue_Context_initialize( &queue_context );
     48    _POSIX_Condition_variables_Acquire( the_cond, &queue_context );
    4249
    43     if ( the_cond == NULL ) {
    44       return EINVAL;
    45     }
     50    heads = the_cond->Queue.Queue.heads;
    4651
    47     _POSIX_Condition_variables_Acquire_critical( the_cond, &queue_context );
     52    if ( heads != NULL ) {
     53      Thread_Control *the_thread;
    4854
    49     the_thread = _Thread_queue_First_locked(
    50       &the_cond->Wait_queue,
    51       POSIX_CONDITION_VARIABLES_TQ_OPERATIONS
    52     );
    53 
    54     if ( the_thread != NULL ) {
     55      the_thread = ( *operations->first )( heads );
    5556      _Thread_queue_Extract_critical(
    56         &the_cond->Wait_queue.Queue,
    57         POSIX_CONDITION_VARIABLES_TQ_OPERATIONS,
     57        &the_cond->Queue.Queue,
     58        operations,
    5859        the_thread,
    5960        &queue_context
     
    6364      _POSIX_Condition_variables_Release( the_cond, &queue_context );
    6465    }
    65   } while ( is_broadcast && the_thread != NULL );
     66  } while ( is_broadcast && heads != NULL );
    6667
    6768  return 0;
  • cpukit/posix/src/condwait.c

    r89fc9345 r5222488  
    2121#include <rtems/posix/condimpl.h>
    2222
     23#include <string.h>
     24
     25bool _POSIX_Condition_variables_Auto_initialization(
     26  POSIX_Condition_variables_Control *the_cond
     27)
     28{
     29  POSIX_Condition_variables_Control zero;
     30  unsigned long                     flags;
     31
     32  memset( &zero, 0, sizeof( zero ) );
     33
     34  if ( memcmp( the_cond, &zero, sizeof( *the_cond ) ) != 0 ) {
     35    return false;
     36  }
     37
     38  flags = (uintptr_t) the_cond ^ POSIX_CONDITION_VARIABLES_MAGIC;
     39  flags &= ~POSIX_CONDITION_VARIABLES_FLAGS_MASK;
     40  the_cond->flags = flags;
     41  return true;
     42}
     43
    2344/*
    2445 *  11.4.4 Waiting on a Condition, P1003.1c/Draft 10, p. 105
  • cpukit/posix/src/condwaitsupp.c

    r89fc9345 r5222488  
    2525#include <rtems/score/status.h>
    2626#include <rtems/score/threaddispatch.h>
    27 
    28 THREAD_QUEUE_OBJECT_ASSERT( POSIX_Condition_variables_Control, Wait_queue );
    2927
    3028static void _POSIX_Condition_variables_Enqueue_callout(
     
    5957{
    6058  POSIX_Condition_variables_Control *the_cond;
     59  unsigned long                      flags;
    6160  Thread_queue_Context               queue_context;
    6261  int                                error;
     
    6766  TOD_Absolute_timeout_conversion_results  status;
    6867
    69   if ( mutex == NULL ) {
    70     return EINVAL;
    71   }
     68  the_cond = _POSIX_Condition_variables_Get( cond );
     69  POSIX_CONDITION_VARIABLES_VALIDATE_OBJECT( the_cond, flags );
    7270
    73   the_cond = _POSIX_Condition_variables_Get( cond, &queue_context );
    74 
    75   if ( the_cond == NULL ) {
    76     return EINVAL;
    77   }
    78 
     71  _Thread_queue_Context_initialize( &queue_context );
    7972  already_timedout = false;
    8073
     
    8982     *  status into the appropriate error.
    9083     */
    91     _Assert( the_cond->clock );
    92     status = _TOD_Absolute_timeout_to_ticks(abstime, the_cond->clock, &timeout);
     84    status = _TOD_Absolute_timeout_to_ticks(
     85      abstime,
     86      _POSIX_Condition_variables_Get_clock( flags ),
     87      &timeout
     88    );
    9389    if ( status == TOD_ABSOLUTE_TIMEOUT_INVALID )
    9490      return EINVAL;
     
    104100  }
    105101
    106   _POSIX_Condition_variables_Acquire_critical( the_cond, &queue_context );
     102  executing = _POSIX_Condition_variables_Acquire( the_cond, &queue_context );
    107103
    108104  if (
     
    115111
    116112  the_cond->mutex = mutex;
    117   executing = _Thread_Executing;
    118113
    119114  if ( !already_timedout ) {
     
    127122    );
    128123    _Thread_queue_Enqueue(
    129       &the_cond->Wait_queue.Queue,
     124      &the_cond->Queue.Queue,
    130125      POSIX_CONDITION_VARIABLES_TQ_OPERATIONS,
    131126      executing,
  • cpukit/rtems/src/rtemsobjectgetapiclassname.c

    r89fc9345 r5222488  
    5252  { "Mutex",                   OBJECTS_POSIX_MUTEXES, 0},
    5353  { "Semaphore",               OBJECTS_POSIX_SEMAPHORES, 0},
    54   { "Condition Variable",      OBJECTS_POSIX_CONDITION_VARIABLES, 0},
    5554  { "Timer",                   OBJECTS_POSIX_TIMERS, 0},
    5655  { "Shared Memory",           OBJECTS_POSIX_SHMS, 0},
  • cpukit/sapi/include/confdefs.h

    r89fc9345 r5222488  
    18421842     */
    18431843    #define _CONFIGURE_LIBBLOCK_POSIX_MUTEXES 2
    1844 
    1845     /*
    1846      * POSIX Condition Variables:
    1847      *  o bdbuf access condition
    1848      *  o bdbuf transfer condition
    1849      *  o bdbuf buffer condition
    1850      */
    1851     #define _CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES 3
    18521844  #else
    18531845    /*
     
    18631855
    18641856    #define _CONFIGURE_LIBBLOCK_POSIX_MUTEXES 0
    1865     #define _CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES 0
    18661857  #endif
    18671858
     
    18801871  /** This specifies the number of POSIX Mutexes needed by libblock. */
    18811872  #define _CONFIGURE_LIBBLOCK_POSIX_MUTEXES 0
    1882   /**
    1883    * This specifies the number of POSIX Condition Variables needed
    1884    * by libblock.
    1885    */
    1886   #define _CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES 0
    18871873#endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
    18881874/**@}*/
     
    20582044    #if !defined(CONFIGURE_MAXIMUM_POSIX_MUTEXES)
    20592045      #define CONFIGURE_MAXIMUM_POSIX_MUTEXES \
    2060         rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
    2061     #endif
    2062     #if !defined(CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES)
    2063       #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES \
    20642046        rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
    20652047    #endif
     
    24412423  #include <limits.h>
    24422424  #include <mqueue.h>
    2443   #include <rtems/posix/cond.h>
    24442425  #include <rtems/posix/mqueue.h>
    24452426  #include <rtems/posix/mutex.h>
     
    24822463  #define _CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_mutexes) \
    24832464    _Configure_Object_RAM(_mutexes, sizeof(POSIX_Mutex_Control) )
    2484 
    2485   /**
    2486    * This configuration parameter specifies the maximum number of
    2487    * POSIX API condition variables.
    2488    */
    2489   #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
    2490     #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 0
    2491   #endif
    2492 
    2493   /*
    2494    * This macro is calculated to specify the memory required for
    2495    * POSIX API condition variables.
    2496    */
    2497   #define _CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(_condvars) \
    2498       _Configure_Object_RAM(_condvars, \
    2499                           sizeof(POSIX_Condition_variables_Control) )
    25002465
    25012466  /**
     
    27132678    #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
    27142679  #endif
    2715   #ifndef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
    2716     #define CONFIGURE_MAXIMUM_CONDITION_VARIABLES 1
    2717   #endif
    27182680
    27192681  #define _CONFIGURE_GO_INIT_MUTEXES 77
    2720   #define _CONFIGURE_GO_INIT_CONDITION_VARIABLES 4
    27212682
    27222683  #ifndef CONFIGURE_MAXIMUM_GOROUTINES
     
    27342695   */
    27352696  #define _CONFIGURE_GO_INIT_MUTEXES             0
    2736 
    2737   /*
    2738    * This specifies the number of condition variables required by the Go
    2739    * run-time for its own use.
    2740    */
    2741   #define _CONFIGURE_GO_INIT_CONDITION_VARIABLES 0
    27422697
    27432698  /** This specifies the maximum number of Go co-routines. */
     
    27792734
    27802735  /*
    2781    * This macro provides summation of the POSIX Condition Variables.
    2782    */
    2783   #define _CONFIGURE_POSIX_CONDITION_VARIABLES \
    2784     (CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES + \
    2785       _CONFIGURE_LIBBLOCK_POSIX_CONDITION_VARIABLES + \
    2786       CONFIGURE_MAXIMUM_ADA_TASKS + \
    2787       CONFIGURE_MAXIMUM_FAKE_ADA_TASKS + \
    2788       _CONFIGURE_GO_INIT_CONDITION_VARIABLES + \
    2789       CONFIGURE_MAXIMUM_GO_CHANNELS)
    2790 
    2791   /*
    27922736   * This macro is calculated to specify the memory required for
    27932737   * the POSIX API in its entirety.
     
    27952739  #define _CONFIGURE_MEMORY_FOR_POSIX \
    27962740    (_CONFIGURE_MEMORY_FOR_POSIX_MUTEXES(_CONFIGURE_POSIX_MUTEXES) + \
    2797       _CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES( \
    2798         _CONFIGURE_POSIX_CONDITION_VARIABLES) + \
    27992741      _CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS( \
    28002742        CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS) + \
     
    32493191      _CONFIGURE_POSIX_THREADS,
    32503192      _CONFIGURE_POSIX_MUTEXES,
    3251       _CONFIGURE_POSIX_CONDITION_VARIABLES,
    32523193      CONFIGURE_MAXIMUM_POSIX_TIMERS,
    32533194      CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS,
     
    34633404    /* POSIX API Pieces */
    34643405    uint32_t POSIX_MUTEXES;
    3465     uint32_t POSIX_CONDITION_VARIABLES;
    34663406    uint32_t POSIX_TIMERS;
    34673407    uint32_t POSIX_QUEUED_SIGNALS;
     
    35133453    /* POSIX API Pieces */
    35143454    _CONFIGURE_MEMORY_FOR_POSIX_MUTEXES( _CONFIGURE_POSIX_MUTEXES ),
    3515     _CONFIGURE_MEMORY_FOR_POSIX_CONDITION_VARIABLES(
    3516       _CONFIGURE_POSIX_CONDITION_VARIABLES ),
    35173455    _CONFIGURE_MEMORY_FOR_POSIX_QUEUED_SIGNALS(
    35183456      CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS ),
     
    35853523  #if ((CONFIGURE_MAXIMUM_POSIX_THREADS != 0) || \
    35863524       (CONFIGURE_MAXIMUM_POSIX_MUTEXES != 0) || \
    3587        (CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES != 0) || \
    35883525       (CONFIGURE_MAXIMUM_POSIX_TIMERS != 0) || \
    35893526       (CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS != 0) || \
  • cpukit/sapi/src/posixapi.c

    r89fc9345 r5222488  
    2222#include <rtems/posix/posixapi.h>
    2323#include <rtems/posix/barrierimpl.h>
     24#include <rtems/posix/condimpl.h>
    2425#include <rtems/posix/rwlockimpl.h>
    2526#include <rtems/posix/semaphoreimpl.h>
     
    8788  POSIX_RWLOCK_MAGIC_4
    8889);
     90RTEMS_STATIC_ASSERT(
     91  POSIX_CONDITION_VARIABLES_MAGIC != HEAP_BEGIN_PROTECTOR_0,
     92  POSIX_CONDITION_VARIABLES_MAGIC_0
     93);
     94RTEMS_STATIC_ASSERT(
     95  POSIX_CONDITION_VARIABLES_MAGIC != HEAP_BEGIN_PROTECTOR_1,
     96  POSIX_CONDITION_VARIABLES_MAGIC_1
     97);
     98RTEMS_STATIC_ASSERT(
     99  POSIX_CONDITION_VARIABLES_MAGIC != HEAP_END_PROTECTOR_0,
     100  POSIX_CONDITION_VARIABLES_MAGIC_2
     101);
     102RTEMS_STATIC_ASSERT(
     103  POSIX_CONDITION_VARIABLES_MAGIC != HEAP_END_PROTECTOR_1,
     104  POSIX_CONDITION_VARIABLES_MAGIC_3
     105);
     106RTEMS_STATIC_ASSERT(
     107  POSIX_CONDITION_VARIABLES_MAGIC != HEAP_FREE_PATTERN,
     108  POSIX_CONDITION_VARIABLES_MAGIC_4
     109);
    89110#endif
    90111
     
    98119);
    99120RTEMS_STATIC_ASSERT(
     121  POSIX_SEMAPHORE_MAGIC != POSIX_CONDITION_VARIABLES_MAGIC,
     122  POSIX_SEMAPHORE_MAGIC_7
     123);
     124RTEMS_STATIC_ASSERT(
    100125  POSIX_BARRIER_MAGIC != POSIX_RWLOCK_MAGIC,
    101126  POSIX_BARRIER_MAGIC_5
     127);
     128RTEMS_STATIC_ASSERT(
     129  POSIX_BARRIER_MAGIC != POSIX_CONDITION_VARIABLES_MAGIC,
     130  POSIX_BARRIER_MAGIC_6
     131);
     132RTEMS_STATIC_ASSERT(
     133  POSIX_RWLOCK_MAGIC != POSIX_CONDITION_VARIABLES_MAGIC,
     134  POSIX_RWLOCK_MAGIC_5
    102135);
    103136
  • cpukit/score/include/rtems/score/objectimpl.h

    r89fc9345 r5222488  
    9090  OBJECTS_POSIX_MUTEXES             = 6,
    9191  OBJECTS_POSIX_SEMAPHORES          = 7,
    92   OBJECTS_POSIX_CONDITION_VARIABLES = 8,
    9392  OBJECTS_POSIX_TIMERS              = 9,
    9493  OBJECTS_POSIX_SHMS                = 12
  • cpukit/score/include/rtems/sysinit.h

    r89fc9345 r5222488  
    4848#define RTEMS_SYSINIT_POSIX_SIGNALS              000360
    4949#define RTEMS_SYSINIT_POSIX_THREADS              000361
    50 #define RTEMS_SYSINIT_POSIX_CONDITION_VARIABLE   000362
    5150#define RTEMS_SYSINIT_POSIX_MUTEX                000363
    5251#define RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE        000364
  • testsuites/psxtests/psx10/init.c

    r89fc9345 r5222488  
    1717
    1818const char rtems_test_name[] = "PSX 10";
     19
     20static void test_cond_null( void )
     21{
     22  pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
     23  int eno;
     24  struct timespec to;
     25
     26  eno = pthread_cond_init( NULL, NULL );
     27  rtems_test_assert( eno == EINVAL );
     28
     29  eno = pthread_mutex_lock( &mtx );
     30  rtems_test_assert( eno == 0 );
     31
     32  eno = pthread_cond_wait( NULL, &mtx );
     33  rtems_test_assert( eno == EINVAL );
     34
     35  to.tv_sec = 1;
     36  to.tv_nsec = 1;
     37  eno = pthread_cond_timedwait( NULL, &mtx, &to );
     38  rtems_test_assert( eno == EINVAL );
     39
     40  eno = pthread_mutex_unlock( &mtx );
     41  rtems_test_assert( eno == 0 );
     42
     43  eno = pthread_cond_signal( NULL );
     44  rtems_test_assert( eno == EINVAL );
     45
     46  eno = pthread_cond_broadcast( NULL );
     47  rtems_test_assert( eno == EINVAL );
     48
     49  eno = pthread_cond_destroy( NULL );
     50  rtems_test_assert( eno == EINVAL );
     51
     52  eno = pthread_mutex_destroy( &mtx );
     53  rtems_test_assert( eno == 0 );
     54}
     55
     56static void test_cond_not_initialized( void )
     57{
     58  pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
     59  pthread_cond_t cond;
     60  int eno;
     61  struct timespec to;
     62
     63  memset( &cond, 0xff, sizeof( cond ) );
     64
     65  eno = pthread_mutex_lock( &mtx );
     66  rtems_test_assert( eno == 0 );
     67
     68  eno = pthread_cond_wait( &cond, &mtx );
     69  rtems_test_assert( eno == EINVAL );
     70
     71  to.tv_sec = 1;
     72  to.tv_nsec = 1;
     73  eno = pthread_cond_timedwait( &cond, &mtx, &to );
     74  rtems_test_assert( eno == EINVAL );
     75
     76  eno = pthread_mutex_unlock( &mtx );
     77  rtems_test_assert( eno == 0 );
     78
     79  eno = pthread_cond_signal( &cond );
     80  rtems_test_assert( eno == EINVAL );
     81
     82  eno = pthread_cond_broadcast( &cond );
     83  rtems_test_assert( eno == EINVAL );
     84
     85  eno = pthread_cond_destroy( &cond );
     86  rtems_test_assert( eno == EINVAL );
     87
     88  eno = pthread_mutex_destroy( &mtx );
     89  rtems_test_assert( eno == 0 );
     90}
     91
     92static void test_cond_invalid_copy( void )
     93{
     94  pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
     95  pthread_cond_t cond;
     96  pthread_cond_t cond2;
     97  int eno;
     98  struct timespec to;
     99
     100  eno = pthread_cond_init( &cond, NULL );
     101  rtems_test_assert( eno == 0 );
     102
     103  memcpy( &cond2, &cond, sizeof( cond2 ) );
     104
     105  eno = pthread_mutex_lock( &mtx );
     106  rtems_test_assert( eno == 0 );
     107
     108  eno = pthread_cond_wait( &cond2, &mtx );
     109  rtems_test_assert( eno == EINVAL );
     110
     111  to.tv_sec = 1;
     112  to.tv_nsec = 1;
     113  eno = pthread_cond_timedwait( &cond2, &mtx, &to );
     114  rtems_test_assert( eno == EINVAL );
     115
     116  eno = pthread_mutex_unlock( &mtx );
     117  rtems_test_assert( eno == 0 );
     118
     119  eno = pthread_cond_signal( &cond2 );
     120  rtems_test_assert( eno == EINVAL );
     121
     122  eno = pthread_cond_broadcast( &cond2 );
     123  rtems_test_assert( eno == EINVAL );
     124
     125  eno = pthread_cond_destroy( &cond2 );
     126  rtems_test_assert( eno == EINVAL );
     127
     128  eno = pthread_cond_destroy( &cond );
     129  rtems_test_assert( eno == 0 );
     130
     131  eno = pthread_mutex_destroy( &mtx );
     132  rtems_test_assert( eno == 0 );
     133}
    19134
    20135void *POSIX_Init(
     
    31146  TEST_BEGIN();
    32147
     148  test_cond_null();
     149  test_cond_not_initialized();
     150  test_cond_invalid_copy();
     151
    33152  puts( "Init: pthread_condattr_init" );
    34153  status = pthread_condattr_init( &attr );
     
    97216  rtems_test_assert( status == EINVAL );
    98217  puts( "Init: pthread_cond_init - EINVAL (attr not initialized)" );
    99 
    100   status = pthread_cond_init( &cond, NULL );
    101   if ( status != ENOMEM )
    102     printf( "status = %d\n", status );
    103   rtems_test_assert( status == ENOMEM );
    104   puts( "Init: pthread_cond_init - ENOMEM (too many conds)" );
    105 
    106   puts( "Init: pthread_cond_destroy" );
    107   status = pthread_cond_destroy( &cond );
    108   rtems_test_assert( !status );
    109218
    110219/* error for bad condition variable passed */
  • testsuites/psxtests/psx10/psx10.scn

    r89fc9345 r5222488  
    1313Init: pthread_cond_init - NULL attr
    1414Init: pthread_cond_init - EINVAL (attr not initialized)
    15 Init: pthread_cond_init - ENOMEM (too many conds)
    16 Init: pthread_cond_destroy
    1715Init: pthread_cond_destroy - EINVAL (cond invalid)
    1816Init: pthread_cond_init - EINVAL (invalid pshared)
  • testsuites/psxtests/psx10/system.h

    r89fc9345 r5222488  
    4242
    4343#define CONFIGURE_MAXIMUM_POSIX_THREADS              4
    44 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  1
    4544#define CONFIGURE_MAXIMUM_POSIX_MUTEXES              2
    4645
  • testsuites/psxtests/psxaio01/system.h

    r89fc9345 r5222488  
    3030#define CONFIGURE_MAXIMUM_POSIX_THREADS        10
    3131#define CONFIGURE_MAXIMUM_POSIX_MUTEXES        10
    32 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES     10
    3332#define CONFIGURE_MAXIMUM_POSIX_KEYS           10
    3433
  • testsuites/psxtests/psxaio02/system.h

    r89fc9345 r5222488  
    3030#define CONFIGURE_MAXIMUM_POSIX_THREADS        10
    3131#define CONFIGURE_MAXIMUM_POSIX_MUTEXES        10
    32 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES     10
    3332#define CONFIGURE_MAXIMUM_POSIX_KEYS           10
    3433
  • testsuites/psxtests/psxaio03/system.h

    r89fc9345 r5222488  
    3131#define CONFIGURE_MAXIMUM_POSIX_THREADS        30
    3232#define CONFIGURE_MAXIMUM_POSIX_MUTEXES        30
    33 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES     30
    3433#define CONFIGURE_MAXIMUM_POSIX_KEYS           30
    3534
  • testsuites/psxtests/psxautoinit02/init.c

    r89fc9345 r5222488  
    2626{
    2727  int            sc;
    28   pthread_cond_t cond1;
    29   pthread_cond_t cond2;
     28  pthread_cond_t cond1 = PTHREAD_COND_INITIALIZER;
     29  pthread_cond_t cond2 = PTHREAD_COND_INITIALIZER;
     30  pthread_cond_t cond3 = PTHREAD_COND_INITIALIZER;
     31  pthread_cond_t cond4 = PTHREAD_COND_INITIALIZER;
     32  pthread_cond_t cond5 = PTHREAD_COND_INITIALIZER;
     33  pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
     34  struct timespec to;
    3035
    3136  TEST_BEGIN();
    3237
    33   cond1 = PTHREAD_COND_INITIALIZER;
    34   cond2 = PTHREAD_COND_INITIALIZER;
    3538  puts( "Init - pthread_cond_broadcast - auto initialize - OK" );
    3639  sc = pthread_cond_broadcast( &cond1 );
    3740  fatal_posix_service_status( sc, 0, "cond broadcast OK" );
    3841
    39   puts( "Init - pthread_cond_broadcast - auto initialize - EINVAL" );
    40   sc = pthread_cond_broadcast( &cond2 );
    41   fatal_posix_service_status( sc, EINVAL, "cond lock EINVAL" );
     42  puts( "Init - pthread_cond_signal - auto initialize - OK" );
     43  sc = pthread_cond_signal( &cond2 );
     44  fatal_posix_service_status( sc, 0, "cond signal OK" );
     45
     46  puts( "Init - pthread_cond_init - auto initialize - OK" );
     47  sc = pthread_cond_init( &cond3, NULL );
     48  fatal_posix_service_status( sc, 0, "cond init OK" );
     49
     50  puts( "Init - pthread_mutex_lock - OK" );
     51  sc = pthread_mutex_lock( &mtx );
     52  fatal_posix_service_status( sc, 0, "mtx lock OK" );
     53
     54  puts( "Init - pthread_cond_timedwait - auto initialize - OK" );
     55  to.tv_sec = 1;
     56  to.tv_nsec = 1;
     57  sc = pthread_cond_timedwait( &cond4, &mtx, &to );
     58  fatal_posix_service_status( sc, ETIMEDOUT, "cond timedwait OK" );
     59
     60  puts( "Init - pthread_mutex_unlock - OK" );
     61  sc = pthread_mutex_unlock( &mtx );
     62  fatal_posix_service_status( sc, 0, "mtx unlock OK" );
     63
     64  puts( "Init - pthread_mutex_destroy - OK" );
     65  sc = pthread_mutex_destroy( &mtx );
     66  fatal_posix_service_status( sc, 0, "mtx destroy OK" );
     67
     68  puts( "Init - pthread_cond_destroy - OK" );
     69  sc = pthread_cond_destroy( &cond5 );
     70  fatal_posix_service_status( sc, 0, "cond destroy OK" );
     71
     72  puts( "Init - pthread_cond_destroy - EINVAL" );
     73  sc = pthread_cond_destroy( &cond5 );
     74  fatal_posix_service_status( sc, EINVAL, "cond destroy EINVAL" );
     75
     76  puts( "Init - pthread_cond_destroy - OK" );
     77  sc = pthread_cond_destroy( &cond4 );
     78  fatal_posix_service_status( sc, 0, "cond destroy OK" );
     79
     80  puts( "Init - pthread_cond_destroy - OK" );
     81  sc = pthread_cond_destroy( &cond3 );
     82  fatal_posix_service_status( sc, 0, "cond destroy OK" );
     83
     84  puts( "Init - pthread_cond_destroy - OK" );
     85  sc = pthread_cond_destroy( &cond2 );
     86  fatal_posix_service_status( sc, 0, "cond destroy OK" );
    4287
    4388  puts( "Init - pthread_cond_destroy - OK" );
     
    5297
    5398#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    54 #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
     99#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
    55100
    56101#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
    57102
    58103#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
    59 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
     104#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
    60105
    61106#define CONFIGURE_POSIX_INIT_THREAD_TABLE
  • testsuites/psxtests/psxautoinit02/psxautoinit02.scn

    r89fc9345 r5222488  
    1 *** POSIX TEST -- AUTOMATIC INITIALIZAITON 02 ***
     1*** BEGIN OF TEST PSXAUTOINIT 2 ***
    22Init - pthread_cond_broadcast - auto initialize - OK
    3 Init - pthread_cond_broadcast - auto initialize - EINVAL
     3Init - pthread_cond_signal - auto initialize - OK
     4Init - pthread_cond_init - auto initialize - OK
     5Init - pthread_mutex_lock - OK
     6Init - pthread_cond_timedwait - auto initialize - OK
     7Init - pthread_mutex_unlock - OK
     8Init - pthread_mutex_destroy - OK
    49Init - pthread_cond_destroy - OK
    5 *** END OF POSIX TEST AUTOMATIC INITIALIZATION 02 ***
     10Init - pthread_cond_destroy - OK
     11Init - pthread_cond_destroy - OK
     12Init - pthread_cond_destroy - OK
     13Init - pthread_cond_destroy - OK
     14*** END OF TEST PSXAUTOINIT 2 ***
  • testsuites/psxtests/psxcleanup/system.h

    r89fc9345 r5222488  
    4646#define CONFIGURE_MAXIMUM_TIMERS                    4
    4747#define CONFIGURE_MAXIMUM_POSIX_MUTEXES             2
    48 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
    4948
    5049
  • testsuites/psxtests/psxcond01/init.c

    r89fc9345 r5222488  
    9797#define CONFIGURE_MAXIMUM_POSIX_THREADS 2
    9898#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
    99 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
    10099
    101100#define CONFIGURE_POSIX_INIT_THREAD_TABLE
  • testsuites/psxtests/psxconfig01/init.c

    r89fc9345 r5222488  
    6161#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 17
    6262
    63 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 29
    6463#define POSIX_MQ_COUNT 5
    6564#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 19
     
    430429#endif
    431430
    432 #ifdef CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
    433   for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES; ++i) {
    434     pthread_cond_t cond;
    435     eno = pthread_cond_init(&cond, NULL);
    436     rtems_test_assert(eno == 0);
    437   }
    438   rtems_resource_snapshot_take(&snapshot);
    439   rtems_test_assert(
    440     snapshot.posix_api.active_condition_variables
    441       == CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES
    442   );
    443 #endif
    444 
    445431#ifdef POSIX_MQ_COUNT
    446432  for (i = 0; i < POSIX_MQ_COUNT; ++i) {
  • testsuites/psxtests/psxkey07/init.c

    r89fc9345 r5222488  
    199199#define CONFIGURE_MAXIMUM_POSIX_MUTEXES  2
    200200#define CONFIGURE_MAXIMUM_POSIX_KEYS     1
    201 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES  2
    202201#define CONFIGURE_UNIFIED_WORK_AREAS
    203202
  • testsuites/psxtests/psxsignal06/init.c

    r89fc9345 r5222488  
    127127
    128128#define CONFIGURE_MAXIMUM_POSIX_THREADS             2
    129 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
    130129#define CONFIGURE_MAXIMUM_POSIX_MUTEXES             1
    131130
  • testsuites/psxtests/psxtimer01/system.h

    r89fc9345 r5222488  
    4646#define CONFIGURE_MAXIMUM_TIMERS                    4
    4747#define CONFIGURE_MAXIMUM_POSIX_MUTEXES             2
    48 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
    4948
    5049
  • testsuites/psxtmtests/psxtmcond01/init.c

    r89fc9345 r5222488  
    8686
    8787/* configure an instance of the condition variable created and destroyed */
    88 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
    8988
    9089#define CONFIGURE_MAXIMUM_POSIX_THREADS     1
  • testsuites/psxtmtests/psxtmcond02/init.c

    r89fc9345 r5222488  
    6767
    6868#define CONFIGURE_MAXIMUM_POSIX_THREADS     1
    69 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
    7069#define CONFIGURE_POSIX_INIT_THREAD_TABLE
    7170
  • testsuites/psxtmtests/psxtmcond03/init.c

    r89fc9345 r5222488  
    107107
    108108#define CONFIGURE_MAXIMUM_POSIX_THREADS     2
    109 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
    110109#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
    111110#define CONFIGURE_POSIX_INIT_THREAD_TABLE
  • testsuites/psxtmtests/psxtmcond04/init.c

    r89fc9345 r5222488  
    100100
    101101#define CONFIGURE_MAXIMUM_POSIX_THREADS     2
    102 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
    103102#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
    104103#define CONFIGURE_POSIX_INIT_THREAD_TABLE
  • testsuites/psxtmtests/psxtmcond05/init.c

    r89fc9345 r5222488  
    6666
    6767#define CONFIGURE_MAXIMUM_POSIX_THREADS     1
    68 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
    6968#define CONFIGURE_POSIX_INIT_THREAD_TABLE
    7069
  • testsuites/psxtmtests/psxtmcond06/init.c

    r89fc9345 r5222488  
    124124
    125125#define CONFIGURE_MAXIMUM_POSIX_THREADS  2 + N
    126 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
    127126#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
    128127#define CONFIGURE_POSIX_INIT_THREAD_TABLE
  • testsuites/psxtmtests/psxtmcond07/init.c

    r89fc9345 r5222488  
    120120
    121121#define CONFIGURE_MAXIMUM_POSIX_THREADS  2 + N
    122 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
    123122#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
    124123#define CONFIGURE_POSIX_INIT_THREAD_TABLE
  • testsuites/psxtmtests/psxtmcond08/init.c

    r89fc9345 r5222488  
    170170
    171171#define CONFIGURE_MAXIMUM_POSIX_THREADS     OPERATION_COUNT + 2
    172 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
    173172#define CONFIGURE_POSIX_INIT_THREAD_TABLE
    174 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 2
    175173#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 2
    176174
  • testsuites/sptests/spsysinit01/init.c

    r89fc9345 r5222488  
    3737#ifdef RTEMS_POSIX_API
    3838#include <rtems/posix/barrierimpl.h>
    39 #include <rtems/posix/condimpl.h>
    4039#include <rtems/posix/mqueueimpl.h>
    4140#include <rtems/posix/muteximpl.h>
     
    105104  POSIX_THREADS_PRE,
    106105  POSIX_THREADS_POST,
    107   POSIX_CONDITION_VARIABLE_PRE,
    108   POSIX_CONDITION_VARIABLE_POST,
    109106  POSIX_MUTEX_PRE,
    110107  POSIX_MUTEX_POST,
     
    442439}
    443440
    444 FIRST(RTEMS_SYSINIT_POSIX_CONDITION_VARIABLE)
    445 {
    446   assert(_POSIX_Condition_variables_Information.maximum == 0);
    447   next_step(POSIX_CONDITION_VARIABLE_PRE);
    448 }
    449 
    450 LAST(RTEMS_SYSINIT_POSIX_CONDITION_VARIABLE)
    451 {
    452   assert(_POSIX_Condition_variables_Information.maximum != 0);
    453   next_step(POSIX_CONDITION_VARIABLE_POST);
    454 }
    455 
    456441FIRST(RTEMS_SYSINIT_POSIX_MUTEX)
    457442{
     
    734719#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
    735720
    736 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
    737 
    738721#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 1
    739722
  • testsuites/sptests/spthreadq01/init.c

    r89fc9345 r5222488  
    131131  rtems_test_assert(eno == 0);
    132132
    133   rtems_test_assert(get_wait_id(ctx) == ctx->pcv);
    134 
    135133  eno = pthread_cond_signal(&ctx->pcv);
    136134  rtems_test_assert(eno == 0);
     
    344342#if defined(RTEMS_POSIX_API)
    345343  #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
    346   #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
    347344  #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 1
    348345  #define CONFIGURE_MESSAGE_BUFFER_MEMORY \
Note: See TracChangeset for help on using the changeset viewer.