Changeset c5b7942 in rtems


Ignore:
Timestamp:
08/19/22 05:22:17 (3 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
5
Children:
cab00c70
Parents:
b9de5b3b
git-author:
Chris Johns <chrisj@…> (08/19/22 05:22:17)
git-committer:
Chris Johns <chrisj@…> (08/27/22 00:36:27)
Message:

cpukit/include: Fix including in C++

Closes #4709

Location:
cpukit/include
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/link_elf.h

    rb9de5b3b rc5b7942  
    1313#include <stdint.h>
    1414#include <rtems/rtl/rtl-obj-fwd.h>
     15
     16#ifdef __cplusplus
     17extern "C" {
     18#endif
    1519
    1620enum sections
     
    7781 */
    7882void _rtld_linkmap_delete (rtems_rtl_obj* obj);
     83
     84#ifdef __cplusplus
     85}
     86#endif
    7987#endif  /* _LINK_ELF_H_ */
  • cpukit/include/linux/rbtree.h

    rb9de5b3b rc5b7942  
    1717
    1818#include <rtems/score/rbtree.h>
     19
     20#ifdef __cplusplus
     21extern "C" {
     22#endif
    1923
    2024#define rb_node RBTree_Node
     
    97101static inline void rb_replace_node(
    98102  struct rb_node *victim,
    99   struct rb_node *replacement, 
     103  struct rb_node *replacement,
    100104  struct rb_root *root
    101105)
     
    139143  )
    140144
     145#ifdef __cplusplus
     146}
     147#endif
     148
    141149#endif /* _LINUX_RBTREE_H */
  • cpukit/include/rtems/capture.h

    rb9de5b3b rc5b7942  
    839839rtems_capture_task_control (rtems_tcb* tcb)
    840840{
    841   return tcb->Capture.control;
     841  return (rtems_capture_control*) tcb->Capture.control;
    842842}
    843843
     
    854854rtems_capture_task_control_flags (rtems_tcb* tcb)
    855855{
    856   rtems_capture_control*  control = tcb->Capture.control;
     856  rtems_capture_control*  control = rtems_capture_task_control (tcb);
    857857  if (!control)
    858858    return 0;
  • cpukit/include/rtems/posix/muteximpl.h

    rb9de5b3b rc5b7942  
    33 *
    44 * @brief Private Inlined Routines for POSIX Mutex's.
    5  * 
    6  * This include file contains the static inline implementation of the private 
     5 *
     6 * This include file contains the static inline implementation of the private
    77 * inlined routines for POSIX mutex's.
    88 */
     
    105105)
    106106{
    107   return flags & POSIX_MUTEX_PROTOCOL_MASK;
     107  return (POSIX_Mutex_Protocol) (flags & POSIX_MUTEX_PROTOCOL_MASK);
    108108}
    109109
     
    485485#endif
    486486/*  end of include file */
    487 
  • cpukit/include/rtems/posix/pthreadattrimpl.h

    rb9de5b3b rc5b7942  
    7373  const POSIX_API_Control *api;
    7474
    75   api = the_thread->API_Extensions[ THREAD_API_POSIX ];
     75  api = (const POSIX_API_Control*) the_thread->API_Extensions[ THREAD_API_POSIX ];
    7676  param->sched_ss_low_priority = _POSIX_Priority_From_core(
    7777    scheduler,
  • cpukit/include/rtems/rtl/rtl-obj.h

    rb9de5b3b rc5b7942  
    232232  void*               tramp_brk;    /**< Trampoline memory allocator. MD
    233233                                     *   relocators can take memory from the
    234                                      *   break upto the size. */
     234                                     *   break up to the size. */
    235235  size_t              tramp_relocs; /**< Number of slots reserved for
    236236                                     *   relocs. The remainder are for
     
    334334  return
    335335    (address >= obj->text_base) &&
    336     (address < (obj->text_base + obj->text_size));
     336    ((char*) address < ((char*) obj->text_base + obj->text_size));
    337337}
    338338
     
    375375 * @retval bool Returns @true if the space is available.
    376376 */
     377static inline size_t rtems_rtl_obj_tramp_avail_space (const rtems_rtl_obj* obj)
     378{
     379  return (char*) obj->tramp_brk - (char*) obj->trampoline;
     380}
     381
     382/**
     383 * Is there space in the trampoline memory for a trapoline.
     384 *
     385 * @param obj The object file's descriptor to check for available space.
     386 * @param size The size to be allocated.
     387 * @retval bool Returns @true if the space is available.
     388 */
    377389static inline bool rtems_rtl_obj_has_tramp_space (const rtems_rtl_obj* obj,
    378390                                                  const size_t         size)
    379391{
    380392  return (obj->trampoline != NULL &&
    381           ((obj->tramp_brk - obj->trampoline) + size) <= obj->tramps_size);
     393          (rtems_rtl_obj_tramp_avail_space (obj) + size) <= obj->tramps_size);
    382394}
    383395
     
    403415{
    404416  return obj->trampoline == NULL || obj->tramp_size == 0 ?
    405     0 : (obj->tramp_brk - obj->trampoline) / obj->tramp_size;
     417    0 : rtems_rtl_obj_tramp_avail_space (obj) / obj->tramp_size;
    406418}
    407419
  • cpukit/include/rtems/rtl/rtl.h

    rb9de5b3b rc5b7942  
    8989 * variable.
    9090 */
    91 extern void _rtld_debug_state (void);
     91void _rtld_debug_state (void);
    9292
    9393/**
  • cpukit/include/rtems/score/priority.h

    rb9de5b3b rc5b7942  
    2525#include <rtems/score/rbtree.h>
    2626
    27 struct _Scheduler_Control;
    28 
    2927#ifdef __cplusplus
    3028extern "C" {
    3129#endif
     30
     31struct _Scheduler_Control;
    3232
    3333/**
  • cpukit/include/rtems/score/priorityimpl.h

    rb9de5b3b rc5b7942  
    390390  const Priority_Node    *the_right;
    391391
    392   the_left = left;
     392  the_left = (const Priority_Control*) left;
    393393  the_right = RTEMS_CONTAINER_OF( right, Priority_Node, Node.RBTree );
    394394
  • cpukit/include/rtems/score/scheduleredfimpl.h

    rb9de5b3b rc5b7942  
    101101  Priority_Control          prio_right;
    102102
    103   the_left = left;
     103  the_left = (const Priority_Control*) left;
    104104  the_right = RTEMS_CONTAINER_OF( right, Scheduler_EDF_Node, Node );
    105105
     
    129129  Priority_Control          prio_right;
    130130
    131   the_left = left;
     131  the_left = (const Priority_Control*) left;
    132132  the_right = RTEMS_CONTAINER_OF( right, Scheduler_EDF_Node, Node );
    133133
  • cpukit/include/rtems/score/tls.h

    rb9de5b3b rc5b7942  
    223223  void *tls_block = (char *) tls_area
    224224    + _TLS_Get_thread_control_block_area_size( (uintptr_t) _TLS_Alignment );
    225   TLS_Thread_control_block *tcb = tls_area;
     225  TLS_Thread_control_block *tcb = (TLS_Thread_control_block*) tls_area;
    226226  uintptr_t aligned_size = _TLS_Heap_align_up( (uintptr_t) _TLS_Size );
    227227  TLS_Dynamic_thread_vector *dtv = (TLS_Dynamic_thread_vector *)
  • cpukit/include/rtems/score/watchdogimpl.h

    rb9de5b3b rc5b7942  
    151151)
    152152{
    153   return RB_COLOR( &the_watchdog->Node.RBTree, Node );
     153  return (Watchdog_State) RB_COLOR( &the_watchdog->Node.RBTree, Node );
    154154}
    155155
Note: See TracChangeset for help on using the changeset viewer.