Changeset 24b5807 in rtems for testsuites


Ignore:
Timestamp:
Oct 24, 2018, 5:35:51 AM (14 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
4a7be22
Parents:
4b801ac
git-author:
Sebastian Huber <sebastian.huber@…> (10/24/18 05:35:51)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/24/18 08:19:14)
Message:

config: Modify CONFIGURE_INTERRUPT_STACK_SIZE

Use CPU_STACK_MINIMUM_SIZE instead of CONFIGURE_MINIMUM_TASK_STACK_SIZE
to set the default value.

Close #3480.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/spconfig01/init.c

    r4b801ac r24b5807  
    1313 */
    1414
     15#define _GNU_SOURCE
     16
    1517#ifdef HAVE_CONFIG_H
    1618#include "config.h"
     
    1921#include <sys/stat.h>
    2022#include <errno.h>
     23#include <pthread.h>
    2124
    2225#include <bsp.h>
     
    8487}
    8588
     89static void test_stack_config(void)
     90{
     91  pthread_attr_t attr;
     92  size_t stack_size;
     93  int eno;
     94
     95  rtems_test_assert(
     96    rtems_configuration_get_interrupt_stack_size() == CPU_STACK_MINIMUM_SIZE
     97  );
     98
     99  eno = pthread_getattr_np(pthread_self(), &attr);
     100  rtems_test_assert(eno == 0);
     101
     102  eno = pthread_attr_getstacksize(&attr, &stack_size);
     103  rtems_test_assert(eno == 0);
     104  rtems_test_assert(stack_size == 2 * CPU_STACK_MINIMUM_SIZE);
     105
     106  eno = pthread_attr_destroy(&attr);
     107  rtems_test_assert(eno == 0);
     108}
     109
    86110static void Init(rtems_task_argument arg)
    87111{
    88112  checkpoint(3);
     113  test_stack_config();
    89114  TEST_END();
    90115  rtems_test_exit(0);
    91116}
     117
     118#ifdef BSP_INTERRUPT_STACK_SIZE
     119#warning "BSP_INTERRUPT_STACK_SIZE will be #undef for this test"
     120#undef BSP_INTERRUPT_STACK_SIZE
     121#endif
    92122
    93123#ifdef CONFIGURE_BSP_PREREQUISITE_DRIVERS
     
    111141#define CONFIGURE_MAXIMUM_TASKS 1
    112142
     143#define CONFIGURE_MINIMUM_TASK_STACK_SIZE (2 * CPU_STACK_MINIMUM_SIZE)
     144
    113145#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
    114146
Note: See TracChangeset for help on using the changeset viewer.