Changeset 77fbbd6 in rtems


Ignore:
Timestamp:
07/03/18 09:50:53 (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
e755782
Parents:
e07b51a7
git-author:
Sebastian Huber <sebastian.huber@…> (07/03/18 09:50:53)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/05/18 05:10:04)
Message:

posix: Check for new <pthread.h> prototypes

Update #3342.
Update #3343.

Location:
cpukit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/configure.ac

    re07b51a7 r77fbbd6  
    115115  #define _GNU_SOURCE
    116116  #include <pthread.h>])
     117
     118AC_LANG_PUSH(C)
     119AC_MSG_CHECKING([for pthread_mutex_getprioceiling(const pthread_mutex_t *, ...)])
     120AC_COMPILE_IFELSE([AC_LANG_SOURCE([
     121#include <pthread.h>
     122int pthread_mutex_getprioceiling(const pthread_mutex_t *__restrict, int *);
     123])],[
     124AC_MSG_RESULT([yes])
     125AC_DEFINE(HAVE_PTHREAD_MUTEX_GETCEILING_CONST, [], [pthread_mutex_getprioceiling(const pthread_mutex_t *, ...)])
     126],[
     127AC_MSG_RESULT([no])
     128])
     129AC_MSG_CHECKING([for pthread_setschedparam(..., const struct sched_param *)])
     130AC_COMPILE_IFELSE([AC_LANG_SOURCE([
     131#include <pthread.h>
     132int pthread_setschedparam(pthread_t, int, const struct sched_param *);
     133])],[
     134AC_MSG_RESULT([yes])
     135AC_DEFINE(HAVE_PTHREAD_SETSCHEDPARAM_CONST, [], [pthread_setschedparam(..., const struct sched_param *)])
     136],[
     137AC_MSG_RESULT([no])
     138])
     139AC_LANG_POP(C)
    117140
    118141# Mandated by POSIX, not declared in some versions of newlib.
  • cpukit/include/rtems/posix/pthreadimpl.h

    re07b51a7 r77fbbd6  
    9898int _POSIX_Thread_Translate_sched_param(
    9999  int                                  policy,
    100   struct sched_param                  *param,
     100  const struct sched_param            *param,
    101101  Thread_CPU_budget_algorithms        *budget_algorithm,
    102102  Thread_CPU_budget_algorithm_callout *budget_callout
  • cpukit/posix/src/mutexgetprioceiling.c

    re07b51a7 r77fbbd6  
    2727
    2828int pthread_mutex_getprioceiling(
    29   pthread_mutex_t   *mutex,
    30   int               *prioceiling
     29#ifdef HAVE_PTHREAD_MUTEX_GETCEILING_CONST
     30  const pthread_mutex_t *mutex,
     31#else
     32  pthread_mutex_t       *mutex,
     33#endif
     34  int                   *prioceiling
    3135)
    3236{
     
    3943  }
    4044
    41   the_mutex = _POSIX_Mutex_Get( mutex );
     45  the_mutex = _POSIX_Mutex_Get( RTEMS_DECONST( pthread_mutex_t *, mutex ) );
    4246  POSIX_MUTEX_VALIDATE_OBJECT( the_mutex, flags );
    4347
  • cpukit/posix/src/psxtransschedparam.c

    re07b51a7 r77fbbd6  
    4343int _POSIX_Thread_Translate_sched_param(
    4444  int                                  policy,
    45   struct sched_param                  *param,
     45  const struct sched_param            *param,
    4646  Thread_CPU_budget_algorithms        *budget_algorithm,
    4747  Thread_CPU_budget_algorithm_callout *budget_callout
  • cpukit/posix/src/pthreadsetschedparam.c

    re07b51a7 r77fbbd6  
    3434  Thread_Control                       *the_thread,
    3535  int                                   policy,
    36   struct sched_param                   *param,
     36  const struct sched_param             *param,
    3737  Thread_CPU_budget_algorithms          budget_algorithm,
    3838  Thread_CPU_budget_algorithm_callout   budget_callout,
     
    114114
    115115int pthread_setschedparam(
    116   pthread_t           thread,
    117   int                 policy,
    118   struct sched_param *param
     116  pthread_t                 thread,
     117  int                       policy,
     118#ifdef HAVE_PTHREAD_SETSCHEDPARAM_CONST
     119  const struct sched_param *param
     120#else
     121  struct sched_param       *param
     122#endif
    119123)
    120124{
Note: See TracChangeset for help on using the changeset viewer.