Changeset 17e3808 in rtems


Ignore:
Timestamp:
Jul 22, 2009, 3:37:54 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
51cec29
Parents:
7e9765d
Message:

2009-07-22 Joel Sherrill <joel.sherrill@…>

  • psxsem01/Makefile.am, psxsem01/init.c: Much clean up.
  • psxsem01/system.h: Removed.
Location:
testsuites/psxtests
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/ChangeLog

    r7e9765d r17e3808  
     12009-07-22      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * psxsem01/Makefile.am, psxsem01/init.c: Much clean up.
     4        * psxsem01/system.h: Removed.
     5
    162009-07-22      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • testsuites/psxtests/psxsem01/Makefile.am

    r7e9765d r17e3808  
    66
    77rtems_tests_PROGRAMS = psxsem01
    8 psxsem01_SOURCES = init.c system.h ../include/pmacros.h \
     8psxsem01_SOURCES = init.c ../include/pmacros.h \
    99     ../../support/src/test_support.c
    1010
  • testsuites/psxtests/psxsem01/init.c

    r7e9765d r17e3808  
    1 #define CONFIGURE_INIT
    2 #include "system.h"
     1/*
     2 *  COPYRIGHT (c) 1989-2009.
     3 *  On-Line Applications Research Corporation (OAR).
     4 *
     5 *  The license and distribution terms for this file may be
     6 *  found in the file LICENSE in this distribution or at
     7 *  http://www.rtems.com/license/LICENSE.
     8 *
     9 *  $Id$
     10 */
     11
    312#include <sched.h>
     13#include <semaphore.h>
     14#include <errno.h>
    415#include <fcntl.h>
    516#include <time.h>
    617#include <tmacros.h>
     18#include <pmacros.h>
    719#include "test_support.h"
     20
     21#define MAX_SEMS  10
    822
    923void *POSIX_Init(
     
    1428  int             value;
    1529  int             i;
    16   sem_t           sems[CONFIGURE_MAXIMUM_POSIX_SEMAPHORES];
     30  sem_t           sems[MAX_SEMS];
    1731  sem_t           sem2;
    1832  sem_t           *n_sem1;
     
    2943
    3044  puts( "Init: sem_init - SUCCESSFUL" );
    31   for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_SEMAPHORES; i++) {
     45  for (i = 0; i < MAX_SEMS; i++) {
    3246    status = sem_init(&sems[i], 0, i);
    3347    sprintf(failure_msg, "sem_init %d", i );
     
    4559
    4660  puts( "Init: sem_getvalue - SUCCESSFUL ");
    47   for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_SEMAPHORES; i++) {
     61  for (i = 0; i < MAX_SEMS; i++) {
    4862    status = sem_getvalue(&sems[i], &value);
    4963    sprintf( failure_msg, "sem_getvalue %d", i );
     
    144158
    145159  puts( "Init: sem_destroy - SUCCESSFUL" );
    146   for (i = 1; i < CONFIGURE_MAXIMUM_POSIX_SEMAPHORES; i++) {
     160  for (i = 1; i < MAX_SEMS; i++) {
    147161    status = sem_destroy(&sems[i]);
    148162    sprintf( failure_msg, "sem_destroy %d", i );
     
    288302  return NULL; /* just so the compiler thinks we returned something */
    289303}
     304
     305/* configuration information */
     306#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
     307#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
     308
     309#define CONFIGURE_POSIX_INIT_THREAD_TABLE
     310
     311#define CONFIGURE_MAXIMUM_POSIX_THREADS     1
     312#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES  MAX_SEMS
     313
     314#define CONFIGURE_POSIX_INIT_THREAD_TABLE
     315#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE \
     316        (RTEMS_MINIMUM_STACK_SIZE * 4)
     317
     318#define CONFIGURE_INIT
     319#include <rtems/confdefs.h>
Note: See TracChangeset for help on using the changeset viewer.