Changeset 8c5267a in rtems for cpukit/posix


Ignore:
Timestamp:
Oct 10, 2017, 5:11:29 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
4f9ed26
Parents:
da9f5f1
Message:

posix: Simplify pthread_attr_setstack()

Simplify

  • pthread_attr_setstack(), and
  • pthread_attr_setstacksize().

Update #2514.

Location:
cpukit/posix/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/src/pthreadattrsetstack.c

    rda9f5f1 r8c5267a  
    2323#if HAVE_DECL_PTHREAD_ATTR_SETSTACK
    2424
    25 #include <rtems/posix/pthreadimpl.h>
    26 #include <rtems/score/stackimpl.h>
    27 
    2825#include <pthread.h>
    2926#include <errno.h>
     
    3835    return EINVAL;
    3936
    40   if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
    41     attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
    42   else
    43     attr->stacksize = stacksize;
    44 
     37  attr->stacksize = stacksize;
    4538  attr->stackaddr = stackaddr;
    4639  return 0;
  • cpukit/posix/src/pthreadattrsetstacksize.c

    rda9f5f1 r8c5267a  
    2121#endif
    2222
    23 #include <rtems/posix/pthreadimpl.h>
    24 #include <rtems/score/stackimpl.h>
    25 
    2623#include <pthread.h>
    2724#include <errno.h>
     
    3532    return EINVAL;
    3633
    37   if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
    38     attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
    39   else
    40     attr->stacksize = stacksize;
     34  attr->stacksize = stacksize;
    4135  return 0;
    4236}
Note: See TracChangeset for help on using the changeset viewer.