change log for rtems (2011-12-09)

rtems-vc at rtems.org rtems-vc at rtems.org
Fri Dec 9 16:32:13 UTC 2011


 *sh*:
2011-12-09	Sebastian Huber <sebastian.huber at embedded-brains.de>

	* psxconfig01/.cvsignore, psxconfig01/Makefile.am, psxconfig01/init.c,
	psxconfig01/psxconfig01.doc, psxconfig01/psxconfig01.scn: New files.
	* Makefile.am, configure.ac: Reflect changes above.

M  1.377  testsuites/psxtests/ChangeLog
M   1.78  testsuites/psxtests/Makefile.am
M   1.89  testsuites/psxtests/configure.ac
A    1.1  testsuites/psxtests/psxconfig01/.cvsignore
A    1.1  testsuites/psxtests/psxconfig01/Makefile.am
A    1.1  testsuites/psxtests/psxconfig01/init.c
A    1.1  testsuites/psxtests/psxconfig01/psxconfig01.doc
A    1.1  testsuites/psxtests/psxconfig01/psxconfig01.scn

diff -u rtems/testsuites/psxtests/ChangeLog:1.376 rtems/testsuites/psxtests/ChangeLog:1.377
--- rtems/testsuites/psxtests/ChangeLog:1.376	Thu Dec  8 15:38:19 2011
+++ rtems/testsuites/psxtests/ChangeLog	Fri Dec  9 10:27:11 2011
@@ -1,3 +1,9 @@
+2011-12-09	Sebastian Huber <sebastian.huber at embedded-brains.de>
+
+	* psxconfig01/.cvsignore, psxconfig01/Makefile.am, psxconfig01/init.c,
+	psxconfig01/psxconfig01.doc, psxconfig01/psxconfig01.scn: New files.
+	* Makefile.am, configure.ac: Reflect changes above.
+
 2011-12-08	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	PR 1589/build

diff -u rtems/testsuites/psxtests/Makefile.am:1.77 rtems/testsuites/psxtests/Makefile.am:1.78
--- rtems/testsuites/psxtests/Makefile.am:1.77	Sun Jul 31 17:40:30 2011
+++ rtems/testsuites/psxtests/Makefile.am	Fri Dec  9 10:27:11 2011
@@ -11,7 +11,7 @@
     psxaio01 psxaio02 psxaio03 \
     psxalarm01 psxautoinit01 psxautoinit02 psxbarrier01 \
     psxcancel psxcancel01 psxclassic01 psxcleanup psxcleanup01 \
-    psxcond01 psxenosys psxkey01 psxkey02 psxkey03 \
+    psxcond01 psxconfig01 psxenosys psxkey01 psxkey02 psxkey03 \
     psxitimer psxmsgq01 psxmsgq02 psxmsgq03 psxmsgq04 \
     psxmutexattr01 psxobj01 psxrwlock01 psxsem01 psxsignal01 psxsignal02 \
     psxsignal03 psxsignal04 psxsignal05 psxsignal06 \

diff -u rtems/testsuites/psxtests/configure.ac:1.88 rtems/testsuites/psxtests/configure.ac:1.89
--- rtems/testsuites/psxtests/configure.ac:1.88	Thu Dec  8 02:49:19 2011
+++ rtems/testsuites/psxtests/configure.ac	Fri Dec  9 10:27:11 2011
@@ -102,6 +102,7 @@
 psxcleanup01/Makefile
 psxclock/Makefile
 psxcond01/Makefile
+psxconfig01/Makefile
 psxeintr_join/Makefile
 psxenosys/Makefile
 psxfatal01/Makefile

diff -u /dev/null rtems/testsuites/psxtests/psxconfig01/.cvsignore:1.1
--- /dev/null	Fri Dec  9 10:32:12 2011
+++ rtems/testsuites/psxtests/psxconfig01/.cvsignore	Fri Dec  9 10:27:11 2011
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in

diff -u /dev/null rtems/testsuites/psxtests/psxconfig01/Makefile.am:1.1
--- /dev/null	Fri Dec  9 10:32:13 2011
+++ rtems/testsuites/psxtests/psxconfig01/Makefile.am	Fri Dec  9 10:27:11 2011
@@ -0,0 +1,28 @@
+##
+## $Id$
+##
+
+
+rtems_tests_PROGRAMS = psxconfig01
+psxconfig01_SOURCES = init.c ../include/pmacros.h
+
+dist_rtems_tests_DATA = psxconfig01.scn
+dist_rtems_tests_DATA += psxconfig01.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+
+AM_CPPFLAGS += -I$(top_srcdir)/include
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(psxconfig01_OBJECTS)
+LINK_LIBS = $(psxconfig01_LDLIBS)
+
+psxconfig01$(EXEEXT): $(psxconfig01_OBJECTS) \
+    $(psxconfig01_DEPENDENCIES)
+	@rm -f psxconfig01$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am

diff -u /dev/null rtems/testsuites/psxtests/psxconfig01/init.c:1.1
--- /dev/null	Fri Dec  9 10:32:13 2011
+++ rtems/testsuites/psxtests/psxconfig01/init.c	Fri Dec  9 10:27:11 2011
@@ -0,0 +1,293 @@
+/**
+ * @file
+ *
+ * @ingroup psxtests
+ *
+ * @brief Test that the workspace size estimate is correct.
+ */
+
+/*
+ * Copyright (c) 2011 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Obere Lagerstr. 30
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems at embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#ifdef HAVE_CONFIG_H
+  #include "config.h"
+#endif
+
+#include <tmacros.h>
+
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <inttypes.h>
+
+#define MQ_0_COUNT 2
+#define MQ_1_COUNT 3
+#define MQ_2_COUNT 5
+#define MQ_3_COUNT 7
+#define MQ_4_COUNT 11
+#define MQ_5_COUNT 13
+#define MQ_6_COUNT 17
+
+#define MQ_0_SIZE 101
+#define MQ_1_SIZE 103
+#define MQ_2_SIZE 107
+#define MQ_3_SIZE 109
+#define MQ_4_SIZE 113
+#define MQ_5_SIZE 127
+#define MQ_6_SIZE 131
+
+#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
+  CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(MQ_0_COUNT, MQ_0_SIZE) \
+    + CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(MQ_1_COUNT, MQ_1_SIZE) \
+    + CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(MQ_2_COUNT, MQ_2_SIZE) \
+    + CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(MQ_3_COUNT, MQ_3_SIZE) \
+    + CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(MQ_4_COUNT, MQ_4_SIZE) \
+    + CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(MQ_5_COUNT, MQ_5_SIZE) \
+    + CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(MQ_6_COUNT, MQ_6_SIZE)
+
+#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 17
+
+#define CONFIGURE_MAXIMUM_BARRIERS 31
+#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 7
+#define CONFIGURE_MAXIMUM_PARTITIONS 37
+#define CONFIGURE_MAXIMUM_PERIODS 41
+#define CONFIGURE_MAXIMUM_REGIONS 43
+#define CONFIGURE_MAXIMUM_SEMAPHORES 47
+#define CONFIGURE_MAXIMUM_TASKS 11
+#define CONFIGURE_MAXIMUM_TASK_VARIABLES 13
+#define CONFIGURE_MAXIMUM_TIMERS 59
+
+#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 29
+#define CONFIGURE_MAXIMUM_POSIX_KEYS 23
+#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 19
+#define CONFIGURE_MAXIMUM_POSIX_THREADS 3
+
+static const uint8_t mq_counts [CONFIGURE_MAXIMUM_MESSAGE_QUEUES] = {
+  MQ_0_COUNT,
+  MQ_1_COUNT,
+  MQ_2_COUNT,
+  MQ_3_COUNT,
+  MQ_4_COUNT,
+  MQ_5_COUNT,
+  MQ_6_COUNT
+};
+
+static const uint8_t mq_sizes [CONFIGURE_MAXIMUM_MESSAGE_QUEUES] = {
+  MQ_0_SIZE,
+  MQ_1_SIZE,
+  MQ_2_SIZE,
+  MQ_3_SIZE,
+  MQ_4_SIZE,
+  MQ_5_SIZE,
+  MQ_6_SIZE
+};
+
+typedef struct {
+  uint32_t data [32];
+} area;
+
+static area partition_areas [CONFIGURE_MAXIMUM_PARTITIONS];
+
+static area region_areas [CONFIGURE_MAXIMUM_REGIONS];
+
+static void *task_var;
+
+static void task_var_dtor(void *var __attribute__((unused)))
+{
+  /* Do nothing */
+}
+
+static void *posix_thread(void *arg __attribute__((unused)))
+{
+  rtems_test_assert(0);
+}
+
+static void posix_key_dtor(void *key __attribute__((unused)))
+{
+  /* Do nothing */
+}
+
+static void print_info(void)
+{
+  Heap_Information_block info;
+  bool ok = rtems_workspace_get_information(&info);
+  rtems_test_assert(ok);
+
+  printf(
+    "used blocks = %" PRIu32 ", "
+    "largest used block = %" PRIu32 ", "
+    "used space = %" PRIu32 "\n"
+    "free blocks = %" PRIu32 ", "
+    "largest free block = %" PRIu32 ", "
+    "free space = %" PRIu32 "\n",
+    info.Used.number,
+    info.Used.largest,
+    info.Used.total,
+    info.Free.number,
+    info.Free.largest,
+    info.Free.total
+  );
+}
+
+rtems_task Init(rtems_task_argument argument)
+{
+  rtems_status_code sc = RTEMS_SUCCESSFUL;
+  rtems_id id = RTEMS_ID_NONE;
+  rtems_name name = rtems_build_name('C', 'O', 'N', 'F');
+  rtems_extensions_table table;
+  int oflag = O_WRONLY | O_CREAT | O_TRUNC;
+  mode_t mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
+  int fd_a = open("/a", oflag, mode);
+  int fd_b = open("/b", oflag, mode);
+  int i = 0;
+  int eno = 0;
+
+  puts("\n\n*** POSIX TEST CONFIG 01 ***");
+
+  print_info();
+
+  rtems_test_assert(fd_a == 3);
+  rtems_test_assert(fd_b == 4);
+
+  memset(&table, 0, sizeof(table));
+  for (i = 0; i < CONFIGURE_MAXIMUM_USER_EXTENSIONS; ++i) {
+    sc = rtems_extension_create(name, &table, &id);
+    directive_failed(sc, "rtems_extension_create");
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_BARRIERS; ++i) {
+    sc = rtems_barrier_create(name, RTEMS_DEFAULT_ATTRIBUTES, 1, &id);
+    directive_failed(sc, "rtems_barrier_create");
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_MESSAGE_QUEUES; ++i) {
+    sc = rtems_message_queue_create(
+      name,
+      mq_counts [i],
+      mq_sizes [i],
+      RTEMS_DEFAULT_ATTRIBUTES,
+      &id
+    );
+    directive_failed(sc, "rtems_message_queue_create");
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_PARTITIONS; ++i) {
+    sc = rtems_partition_create(
+      name,
+      partition_areas + i,
+      sizeof(partition_areas [0]),
+      sizeof(partition_areas [0]),
+      RTEMS_DEFAULT_ATTRIBUTES,
+      &id
+    );
+    directive_failed(sc, "rtems_partition_create");
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_PERIODS; ++i) {
+    sc = rtems_rate_monotonic_create(name, &id);
+    directive_failed(sc, "rtems_rate_monotonic_create");
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_REGIONS; ++i) {
+    sc = rtems_region_create(
+      name,
+      region_areas + i,
+      sizeof(region_areas [0]),
+      1,
+      RTEMS_DEFAULT_ATTRIBUTES,
+      &id
+    );
+    directive_failed(sc, "rtems_region_create");
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_SEMAPHORES; ++i) {
+    sc = rtems_semaphore_create(
+      name,
+      0,
+      RTEMS_DEFAULT_ATTRIBUTES,
+      0,
+      &id
+    );
+    directive_failed(sc, "rtems_semaphore_create");
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_TASKS - 1; ++i) {
+    sc = rtems_task_create(
+      name,
+      RTEMS_MINIMUM_PRIORITY,
+      RTEMS_MINIMUM_STACK_SIZE,
+      RTEMS_DEFAULT_MODES,
+      RTEMS_DEFAULT_ATTRIBUTES,
+      &id
+    );
+    directive_failed(sc, "rtems_task_create");
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_TASK_VARIABLES; ++i) {
+    sc = rtems_task_variable_add(RTEMS_SELF, &task_var, task_var_dtor);
+    directive_failed(sc, "rtems_task_variable_add");
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_TIMERS; ++i) {
+    sc = rtems_timer_create(name, &id);
+    directive_failed(sc, "rtems_timer_create");
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES; ++i) {
+    pthread_cond_t cond;
+    eno = pthread_cond_init(&cond, NULL);
+    rtems_test_assert(eno == 0);
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_KEYS; ++i) {
+    pthread_key_t key;
+    eno = pthread_key_create(&key, posix_key_dtor);
+    rtems_test_assert(eno == 0);
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_MUTEXES; ++i) {
+    pthread_mutex_t mutex;
+    eno = pthread_mutex_init(&mutex, NULL);
+    rtems_test_assert(eno == 0);
+  }
+
+  for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_THREADS; ++i) {
+    pthread_t thread;
+    eno = pthread_create(&thread, NULL, posix_thread, NULL);
+    rtems_test_assert(eno == 0);
+  }
+
+  printf("object creation done\n");
+  print_info();
+
+  puts("*** END OF POSIX TEST CONFIG 01 ***");
+
+  rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 5
+
+#define CONFIGURE_MAXIMUM_DRIVERS 2
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>

diff -u /dev/null rtems/testsuites/psxtests/psxconfig01/psxconfig01.doc:1.1
--- /dev/null	Fri Dec  9 10:32:13 2011
+++ rtems/testsuites/psxtests/psxconfig01/psxconfig01.doc	Fri Dec  9 10:27:11 2011
@@ -0,0 +1,19 @@
+#
+#  $Id$
+#
+#  Copyright (c) 2011 embedded brains GmbH.
+#
+#  The license and distribution terms for this file may be
+#  found in the file LICENSE in this distribution or at
+#  http://www.rtems.com/license/LICENSE.
+#
+
+This file describes the directives and concepts tested by this test set.
+
+test set name:  spconfig01
+
+directives:
+
+concepts:
+
++ Ensure that the workspace size estimate is correct

diff -u /dev/null rtems/testsuites/psxtests/psxconfig01/psxconfig01.scn:1.1
--- /dev/null	Fri Dec  9 10:32:13 2011
+++ rtems/testsuites/psxtests/psxconfig01/psxconfig01.scn	Fri Dec  9 10:27:11 2011
@@ -0,0 +1,7 @@
+*** POSIX TEST CONFIG 01 ***
+used blocks = 46, largest used block = 8264, used space = 64344
+free blocks = 1, largest free block = 97040, free space = 97040
+object creation done
+used blocks = 204, largest used block = 8264, used space = 160984
+free blocks = 1, largest free block = 400, free space = 400
+*** END OF POSIX TEST CONFIG 01 ***


 *joel*:
2011-12-09	Joel Sherrill <joel.sherrill at oarcorp.com>

	* make/custom/gen68360.cfg, make/custom/gen68360_040.cfg,
	make/custom/pgh360.cfg: Simplify and clean up.

M  1.137  c/src/lib/libbsp/m68k/gen68360/ChangeLog
M    1.3  c/src/lib/libbsp/m68k/gen68360/make/custom/gen68360.cfg
M    1.2  c/src/lib/libbsp/m68k/gen68360/make/custom/gen68360_040.cfg
M    1.3  c/src/lib/libbsp/m68k/gen68360/make/custom/pgh360.cfg

diff -u rtems/c/src/lib/libbsp/m68k/gen68360/ChangeLog:1.136 rtems/c/src/lib/libbsp/m68k/gen68360/ChangeLog:1.137
--- rtems/c/src/lib/libbsp/m68k/gen68360/ChangeLog:1.136	Fri Feb 11 06:30:09 2011
+++ rtems/c/src/lib/libbsp/m68k/gen68360/ChangeLog	Fri Dec  9 10:12:46 2011
@@ -1,3 +1,8 @@
+2011-12-09	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* make/custom/gen68360.cfg, make/custom/gen68360_040.cfg,
+	make/custom/pgh360.cfg: Simplify and clean up.
+
 2011-02-11	Ralf Corsépius <ralf.corsepius at rtems.org>
 
 	* include/bsp.h:

diff -u rtems/c/src/lib/libbsp/m68k/gen68360/make/custom/gen68360.cfg:1.2 rtems/c/src/lib/libbsp/m68k/gen68360/make/custom/gen68360.cfg:1.3
--- rtems/c/src/lib/libbsp/m68k/gen68360/make/custom/gen68360.cfg:1.2	Wed Oct 21 05:48:18 2009
+++ rtems/c/src/lib/libbsp/m68k/gen68360/make/custom/gen68360.cfg	Fri Dec  9 10:12:46 2011
@@ -5,22 +5,10 @@
 #
 
 RTEMS_CPU=m68k
-
-ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes)
-RTEMS_CPU_MODEL=m68040
-else
 RTEMS_CPU_MODEL=m68360
-endif
 
 include $(RTEMS_ROOT)/make/custom/default.cfg
 
-# This contains the compiler options necessary to select the CPU model
-# and (hopefully) optimize for it.
-ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes)
-CPU_CFLAGS = -mcpu=68040
-else
 CPU_CFLAGS = -mcpu=cpu32
-endif
 
-# optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer

diff -u rtems/c/src/lib/libbsp/m68k/gen68360/make/custom/gen68360_040.cfg:1.1 rtems/c/src/lib/libbsp/m68k/gen68360/make/custom/gen68360_040.cfg:1.2
--- rtems/c/src/lib/libbsp/m68k/gen68360/make/custom/gen68360_040.cfg:1.1	Thu Oct 15 04:15:00 2009
+++ rtems/c/src/lib/libbsp/m68k/gen68360/make/custom/gen68360_040.cfg	Fri Dec  9 10:12:46 2011
@@ -4,11 +4,11 @@
 #  $Id$
 #
 
-#
-#  All gen68360 configurations share the same base file, only the cpu model
-#  differs.
-#  
+RTEMS_CPU=m68k
+RTEMS_CPU_MODEL=m68040
 
-RTEMS_GEN68360_COMPANION_MODE=yes
+CPU_CFLAGS = -mcpu=68040
 
-include $(RTEMS_ROOT)/make/custom/gen68360.cfg
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer

diff -u rtems/c/src/lib/libbsp/m68k/gen68360/make/custom/pgh360.cfg:1.2 rtems/c/src/lib/libbsp/m68k/gen68360/make/custom/pgh360.cfg:1.3
--- rtems/c/src/lib/libbsp/m68k/gen68360/make/custom/pgh360.cfg:1.2	Wed Oct 21 05:48:18 2009
+++ rtems/c/src/lib/libbsp/m68k/gen68360/make/custom/pgh360.cfg	Fri Dec  9 10:12:46 2011
@@ -9,9 +9,6 @@
 
 include $(RTEMS_ROOT)/make/custom/default.cfg
 
-# This contains the compiler options necessary to select the CPU model
-# and (hopefully) optimize for it.
 CPU_CFLAGS = -mcpu32
 
-# optimize flag: typically -O2
 CFLAGS_OPTIMIZE_V = -O2 -g -fomit-frame-pointer



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20111209/f9e25790/attachment-0001.html>


More information about the vc mailing list