[rtems commit] config: Improve _Configure_From_workspace()

Sebastian Huber sebh at rtems.org
Tue Feb 25 11:32:19 UTC 2020


Module:    rtems
Branch:    master
Commit:    cfe683859cbf77fccf7857f7a29291eb24df82c6
Changeset: http://git.rtems.org/rtems/commit/?id=cfe683859cbf77fccf7857f7a29291eb24df82c6

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Feb 21 07:28:13 2020 +0100

config: Improve _Configure_From_workspace()

Commit 4c09f4b3fefc7ba5c5868a97ad00c1ee14a06677 changed the cast from
size_t to ssize_t to try to fix an workspace issue on 16-bit
architectures.  This change was reverted by commit
7ff6115b8b913d848b8fe76daf72ca0b4bbf2548 for the workspace but not
_Configure_From_workspace().  Change the cast to uintptr_t to be in line
with the Heap Handler.

---

 cpukit/include/rtems/confdefs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/include/rtems/confdefs.h b/cpukit/include/rtems/confdefs.h
index fa19be0..50e4646 100644
--- a/cpukit/include/rtems/confdefs.h
+++ b/cpukit/include/rtems/confdefs.h
@@ -1239,7 +1239,7 @@ const Thread_Idle_body _Thread_Idle_body = CONFIGURE_IDLE_TASK_BODY;
  * may be applied.
  */
 #define _Configure_From_workspace(_size) \
-  (ssize_t) (_Configure_Zero_or_One(_size) * \
+  (uintptr_t) (_Configure_Zero_or_One(_size) * \
     _Configure_Align_up(_size + HEAP_BLOCK_HEADER_SIZE, \
       _CONFIGURE_HEAP_MIN_BLOCK_SIZE))
 



More information about the vc mailing list