Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:40

0001 /* SPDX-License-Identifier: BSD-2-Clause */
0002 
0003 /**
0004  *  @file
0005  *
0006  *  This include file contains information that is included in every
0007  *  function in the test set.
0008  */
0009 
0010 /*
0011  *  COPYRIGHT (c) 1989-2012.
0012  *  On-Line Applications Research Corporation (OAR).
0013  *
0014  * Redistribution and use in source and binary forms, with or without
0015  * modification, are permitted provided that the following conditions
0016  * are met:
0017  * 1. Redistributions of source code must retain the above copyright
0018  *    notice, this list of conditions and the following disclaimer.
0019  * 2. Redistributions in binary form must reproduce the above copyright
0020  *    notice, this list of conditions and the following disclaimer in the
0021  *    documentation and/or other materials provided with the distribution.
0022  *
0023  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
0024  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
0025  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
0026  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
0027  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
0028  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
0029  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
0030  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
0031  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
0032  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0033  * POSSIBILITY OF SUCH DAMAGE.
0034  */
0035 
0036 /* functions */
0037 
0038 #include <pmacros.h>
0039 #include <unistd.h>
0040 #include <errno.h>
0041 #include <sched.h>
0042 #include <tmacros.h>
0043 
0044 void *POSIX_Init(void *argument);
0045 void *Task_1_through_3(void *argument);
0046 void *Task_4(void *argument);
0047 void *Task_5(void *argument);
0048 
0049 /* configuration information */
0050 
0051 #define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
0052 #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
0053 
0054 #define CONFIGURE_POSIX_INIT_THREAD_TABLE
0055 
0056 #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
0057 
0058 #define CONFIGURE_MAXIMUM_POSIX_THREADS         5
0059 #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 10
0060 #if defined(RTEMS_POSIX_API)
0061 #define CONFIGURE_MAXIMUM_POSIX_TIMERS          4
0062 #define CONFIGURE_MAXIMUM_TIMERS                4
0063 #endif
0064 
0065 #define CONFIGURE_POSIX_INIT_THREAD_TABLE
0066 #define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
0067         (RTEMS_MINIMUM_STACK_SIZE * 10)
0068 
0069 #include <rtems/confdefs.h>
0070 
0071 /* global variables */
0072 
0073 TEST_EXTERN pthread_t        Init_id;
0074 TEST_EXTERN pthread_t        Task_id;
0075 
0076 #define MSGSIZE   9
0077 #define MAXMSG    4
0078 
0079 typedef enum {
0080   RD_QUEUE,   /* Read only queue               */
0081   WR_QUEUE,   /* Write only queue              */
0082   RW_QUEUE,   /* Read Write non-blocking queue */
0083   BLOCKING,   /* Read Write blocking queue     */
0084   DEFAULT_RW, /* default must be last          */
0085   CLOSED,     /* Created and closed queue      */
0086   NUMBER_OF_TEST_QUEUES
0087 } Test_Queue_Types;
0088 extern int Priority_Order[MAXMSG+1];
0089 void *Task_1 ( void *argument );
0090 void *Task_2( void *argument );
0091 void *Task_3( void *argument );
0092 void *Task_4( void *argument );
0093 
0094 /* end of include file */