andrzej-kaczmarek commented on code in PR #3042:
URL: https://github.com/apache/mynewt-core/pull/3042#discussion_r1265232905


##########
kernel/sim/src/sim_sched_gen.c:
##########
@@ -183,7 +183,14 @@ sim_task_stack_init(struct os_task *t, os_stack_t 
*stack_top, int size)
     sf = (struct stack_frame *) ((uint8_t *) stack_top - sizeof(*sf));
     sf->sf_task = t;
 
-    os_arch_frame_init(sf);
+    if (sizeof(void *) == 4) {
+        os_arch_frame_init(sf);
+    } else if (sizeof(void *) == 8) {
+        os_arch_frame_init_64bit(sf);
+    } else {
+        printf("Void pointer should be either 4 or 8 bytes. Exiting.\n");
+        exit(0);

Review Comment:
   `#if __SIZEOF_POINTER__ == xxx` and then `#error` instead of printf would be 
better since it gives an error during build



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to