-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
- Add aliased typedef to handle renames from RTEMS 4.11 to RTEMS 5 - Cast to cpuaddress before assignment to `OS_module_address_t` elements
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,12 @@ | |
#include <rtems/malloc.h> | ||
#include <rtems/rtems/intr.h> | ||
|
||
#ifndef _RTEMS_5_ | ||
|
||
#include <rtems/rtl/rtl.h> /* needed for RTEMS 4.11 alias */ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
astrogeco
Author
Contributor
|
||
|
||
#endif | ||
|
||
#include "os-shared-globaldefs.h" | ||
|
||
/**************************************************************************************** | ||
|
@@ -60,17 +66,27 @@ | |
#define OSAL_UNRESOLV_REC_TYPE rtems_rtl_unresolv_rec | ||
#define OSAL_UNRESOLVED_SYMBOL rtems_rtl_unresolved_symbol | ||
#define OSAL_UNRESOLVED_ITERATE rtems_rtl_unresolved_iterate | ||
|
||
#else | ||
|
||
#define OSAL_HEAP_INFO_BLOCK region_information_block | ||
#define OSAL_UNRESOLV_REC_TYPE rtems_rtl_unresolv_rec_t | ||
#define OSAL_UNRESOLVED_SYMBOL rtems_rtl_unresolved_name | ||
#define OSAL_UNRESOLVED_ITERATE rtems_rtl_unresolved_interate | ||
|
||
#endif | ||
|
||
|
||
/**************************************************************************************** | ||
TYPEDEFS | ||
***************************************************************************************/ | ||
|
||
#ifndef _RTEMS_5_ | ||
|
||
typedef rtems_rtl_obj_t rtems_rtl_obj; /* Alias for RTEMS 4.11 */ | ||
|
||
#endif | ||
|
||
typedef struct | ||
{ | ||
uint32 ClockAccuracyNsec; | ||
|
3 comments
on commit 3560f99
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@acudmore and @jphickey here's my updated fix. It passess CI on RTEMS 4.11 and 5.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from my comment about the ifdef around rtl/rtl.h header, is there any reason this needs to touch os-rtems.h at all at this point? Couldn't the os-impl-loader.c file just have the conditional typedef locally at file scope? That would limit the need of RTL headers and data types to just that file where its relevant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only reason is I didn't know any better :)
I assumed we wanted to keep the RTEMS_5 ifdef in os-rtems.h
Just curious why this is needed to be wrapped in ifndef?
Both RTEMS 4.11 and 5 provide the rtl/rtl.h header, and I would think it would be needed on both.