diff options
author | Christian Mauderer <Christian.Mauderer@embedded-brains.de> | 2016-08-01 13:16:57 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-08-02 07:47:04 +0200 |
commit | 5fe6d07ad5690e3d9c6445ca3a465a700a5a5015 (patch) | |
tree | 61843d4323136d7edb385735d68bfaed863ab3c5 /cpukit/score/include/rtems/linkersets.h | |
parent | score: Fix for RTEMS_DEBUG (diff) | |
download | rtems-5fe6d07ad5690e3d9c6445ca3a465a700a5a5015.tar.bz2 |
linker set: Allow adding any variable into content
The newly created macro adds any kind of variable into a linker set. It
allows (for example) the saving an execution state of a function using
the following method:
- put a group of different variables into one linker set
- save the memory area containing the group of variables before the
execution of a function
- restore the memory area after the function has been executed
Diffstat (limited to 'cpukit/score/include/rtems/linkersets.h')
-rw-r--r-- | cpukit/score/include/rtems/linkersets.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/linkersets.h b/cpukit/score/include/rtems/linkersets.h index e40be6679d..47c210db32 100644 --- a/cpukit/score/include/rtems/linkersets.h +++ b/cpukit/score/include/rtems/linkersets.h @@ -57,6 +57,10 @@ extern "C" { type volatile const _Linker_set_##set##_##item \ RTEMS_SECTION( ".rtemsroset." #set ".content.1" ) RTEMS_USED +#define RTEMS_LINKER_ROSET_CONTENT( set, decl ) \ + decl \ + RTEMS_SECTION( ".rtemsroset." #set ".content" ) + #define RTEMS_LINKER_RWSET_DECLARE( set, type ) \ extern type volatile RTEMS_LINKER_SET_BEGIN( set )[0]; \ extern type volatile RTEMS_LINKER_SET_END( set )[0] @@ -89,6 +93,10 @@ extern "C" { type volatile _Linker_set_##set##_##item \ RTEMS_SECTION( ".rtemsrwset." #set ".content.1" ) RTEMS_USED +#define RTEMS_LINKER_RWSET_CONTENT( set, decl ) \ + decl \ + RTEMS_SECTION( ".rtemsrwset." #set ".content" ) + #ifdef __cplusplus } #endif /* __cplusplus */ |