summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-13 19:32:50 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-01-13 19:32:50 +0000
commit11944b9bc356ee7a40bcb46aaeee287762265cf7 (patch)
tree1df26ac11a76e5c5dd8058ebc4a4f457dc9213ef /testsuites/psxtests
parentAdded test case for broadcast to queue with messages pending. (diff)
downloadrtems-11944b9bc356ee7a40bcb46aaeee287762265cf7.tar.bz2
POSIX message queues now include complete functionality including
blocking sends when the queue is full. The SuperCore was enhanced to support blocking on send. The existing POSIX API was debugged and numerous test cases were added to psxmsgq01 by Jennifer Averett. SuperCore enhancements and resulting modifications to other APIs were done by Joel. There is one significant point of interpretation for the POSIX API. What happens to threads already blocked on a message queue when the mode of that same message queue is changed from blocking to non-blocking? We decided to unblock all waiting tasks with an EAGAIN error just as if a non-blocking version of the same operation had returned unsatisfied. This case is not discussed in the POSIX standard and other implementations may have chosen differently.
Diffstat (limited to 'testsuites/psxtests')
-rw-r--r--testsuites/psxtests/psxmsgq01/system.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/testsuites/psxtests/psxmsgq01/system.h b/testsuites/psxtests/psxmsgq01/system.h
index c5d04b5aa2..97775c304e 100644
--- a/testsuites/psxtests/psxmsgq01/system.h
+++ b/testsuites/psxtests/psxmsgq01/system.h
@@ -38,12 +38,14 @@ void *Task_1_through_3(
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-#define CONFIGURE_MAXIMUM_POSIX_THREADS 2
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 5
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 10
+#define CONFIGURE_MAXIMUM_POSIX_TIMERS 4
+#define CONFIGURE_MAXIMUM_TIMERS 4
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
- (RTEMS_MINIMUM_STACK_SIZE * 4)
+ (RTEMS_MINIMUM_STACK_SIZE * 10)
#include <confdefs.h>
@@ -52,6 +54,24 @@ void *Task_1_through_3(
TEST_EXTERN pthread_t Init_id;
TEST_EXTERN pthread_t Task_id;
+#define MSGSIZE 9
+#define MAXMSG 4
+
+typedef enum {
+ RD_QUEUE, /* Read only queue */
+ WR_QUEUE, /* Write only queue */
+ RW_QUEUE, /* Read Write non-blocking queue */
+ BLOCKING, /* Read Write blocking queue */
+ DEFAULT_RW, /* default must be last */
+ CLOSED, /* Created and closed queue */
+ NUMBER_OF_TEST_QUEUES
+} Test_Queue_Types;
+extern int Priority_Order[MAXMSG+1];
+void *Task_1 ( void *argument );
+void *Task_2( void *argument );
+void *Task_3( void *argument );
+void *Task_4( void *argument );
+
/* end of include file */