Changeset fd27bae in rtems for testsuites


Ignore:
Timestamp:
Aug 7, 2018, 4:25:47 AM (16 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
f51aec8
Parents:
97417bb
git-author:
Sebastian Huber <sebastian.huber@…> (08/07/18 04:25:47)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/08/18 06:15:13)
Message:

CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE

Make CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE configurable by the user.

Update #3434.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/psxconfig01/init.c

    r97417bb rfd27bae  
    2626#endif
    2727
     28#define _GNU_SOURCE
     29
    2830#include <rtems/test.h>
    2931#include <tmacros.h>
     
    6567#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 41
    6668#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
     69
     70#define CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE CPU_STACK_MINIMUM_SIZE
    6771
    6872#define CONFIGURE_MAXIMUM_POSIX_THREADS 3
     
    463467  for (i = 0; i < CONFIGURE_MAXIMUM_POSIX_THREADS; ++i) {
    464468    pthread_t thread;
     469    pthread_attr_t attr;
     470    size_t stack_size;
     471
    465472    eno = pthread_create(&thread, NULL, posix_thread, NULL);
     473    rtems_test_assert(eno == 0);
     474
     475    eno = pthread_getattr_np(thread, &attr);
     476    rtems_test_assert(eno == 0);
     477
     478    eno = pthread_attr_getstacksize(&attr, &stack_size);
     479    rtems_test_assert(eno == 0);
     480    rtems_test_assert(stack_size == CPU_STACK_MINIMUM_SIZE);
     481
     482    eno = pthread_attr_destroy(&attr);
    466483    rtems_test_assert(eno == 0);
    467484  }
Note: See TracChangeset for help on using the changeset viewer.