summaryrefslogtreecommitdiff
path: root/nuttx/arch
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch')
-rw-r--r--nuttx/arch/README.txt17
-rw-r--r--nuttx/arch/c5471/Make.defs3
-rw-r--r--nuttx/arch/c5471/defconfig14
-rw-r--r--nuttx/arch/c5471/include/irq.h12
-rw-r--r--nuttx/arch/c5471/include/types.h12
-rw-r--r--nuttx/arch/c5471/src/Makefile11
-rw-r--r--nuttx/arch/c5471/src/up_assert.c4
-rw-r--r--nuttx/arch/c5471/src/up_createstack.c6
-rw-r--r--nuttx/arch/c5471/src/up_schedulesigaction.c2
-rw-r--r--nuttx/arch/c5471/src/up_serial.c8
-rw-r--r--nuttx/arch/c5471/src/up_usestack.c6
-rw-r--r--nuttx/arch/sim/Make.defs3
-rw-r--r--nuttx/arch/sim/defconfig14
-rw-r--r--nuttx/arch/sim/include/irq.h6
-rw-r--r--nuttx/arch/sim/include/types.h12
-rw-r--r--nuttx/arch/sim/src/Makefile11
-rw-r--r--nuttx/arch/sim/src/up_createstack.c9
-rw-r--r--nuttx/arch/sim/src/up_head.c4
-rw-r--r--nuttx/arch/sim/src/up_usestack.c9
19 files changed, 115 insertions, 48 deletions
diff --git a/nuttx/arch/README.txt b/nuttx/arch/README.txt
index ff0fd4f00..0c7e19536 100644
--- a/nuttx/arch/README.txt
+++ b/nuttx/arch/README.txt
@@ -142,7 +142,18 @@ include/types.h
This provides architecture/toolchain-specific definitions for
standard types. This file should typedef:
- sbyte, ubyte, uint8, boolean, sint16, uint16, sint32, uint32, sint64, uint64
+ sbyte, ubyte, uint8, boolean, sint16, uint16, sint32, uint32
+
+ and
+
+ sint64, uint64
+
+ if the architecture supports 64-bit integers.
+
+ irqstate_t
+
+ Must be defined to the be the size required to hold the interrupt
+ enable/disable state.
This file will be included by include/sys/types.h and be made
available to all files.
@@ -154,9 +165,9 @@ include/irq.h
- struct xcptcontext. This structures represents the saved context
of a thread.
- - uint32 irqsave(void) -- Used to disable all interrupts.
+ - irqstate_t irqsave(void) -- Used to disable all interrupts.
- - void irqrestore(uint32 flags) -- Used to restore interrupt
+ - void irqrestore(irqstate_t flags) -- Used to restore interrupt
enables to the same state as before irqsave was called.
This file must also define NR_IRQS, the total number of IRQs supported
diff --git a/nuttx/arch/c5471/Make.defs b/nuttx/arch/c5471/Make.defs
index 7e68d8e56..8f0013670 100644
--- a/nuttx/arch/c5471/Make.defs
+++ b/nuttx/arch/c5471/Make.defs
@@ -52,7 +52,7 @@ ARCHSCRIPT = -T$(TOPDIR)/arch/$(CONFIG_ARCH)/ld.script
CROSSDEV = arm-elf-
CC = $(CROSSDEV)gcc
LD = $(CROSSDEV)ld
-AR = $(CROSSDEV)ar
+AR = $(CROSSDEV)ar rcs
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
@@ -62,6 +62,7 @@ CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
LDFLAGS = $(ARCHSCRIPT)
EXTRA_LIBS =
+LIBEXT = .a
ifeq ("${CONFIG_DEBUG}","y")
LDFLAGS += -g
diff --git a/nuttx/arch/c5471/defconfig b/nuttx/arch/c5471/defconfig
index 3871d7e14..2dd38f014 100644
--- a/nuttx/arch/c5471/defconfig
+++ b/nuttx/arch/c5471/defconfig
@@ -132,6 +132,8 @@ CONFIG_ARCH_KFREE=n
#
# General Compile environment setup
#
+# CONFIG_SMALL_MEMORY - enable if your processor supports
+# 16-bit addressing; disable if it supports 32-bit.
# CONFIG_HAVE_INLINE - enable if your compiler supports
# inline functions
# CONFIG_HAVE_DOUBLE - enable if your compiler supports type
@@ -139,21 +141,26 @@ CONFIG_ARCH_KFREE=n
# CONFIG_HAVE_LONG_LONG - enable if your architecture supports
# long long types and if you plan to use them
# CONFIG_CAN_PASS_STRUCTS - enable if your compiler supports
-# passing structures and unions as values
+# passing and assiging structures and unions as values
+# CONFIG_CAN_CAST_POINTERS - enable if you can cast between
+# integers and pointer.
# CONFIG_HAVE_WEAKFUNCTIONS - enable if you compiler supports
# weak functions (see include/nuttx/comp
#
+CONFIG_SMALL_MEMORY=n
CONFIG_HAVE_INLINE=y
CONFIG_HAVE_DOUBLE=y
CONFIG_HAVE_LONG_LONG=n
CONFIG_CAN_PASS_STRUCTS=y
+CONFIG_CAN_CAST_POINTERS=y
CONFIG_HAVE_WEAKFUNCTIONS=y
#
# General build options
#
-# CONFIG_RRLOAD_BINY - make the rrload binary format used with
+# CONFIG_RRLOAD_BINARY - make the rrload binary format used with
# BSPs from www.ridgerun.com
+#
CONFIG_RRLOAD_BINARY=y
#
@@ -175,6 +182,8 @@ CONFIG_RRLOAD_BINARY=y
# CONFIG_MQ_MAXMSGSIZE - Message structures are allocated with
# a fixed payload size given by this settin (does not include
# other message structure overhead.
+# CONFIG_MAX_WDOGPARMS - Maximum number of parameters that
+# can be passed to a watchdog handler
# CONFIG_PREALLOC_WDOGS - The number of pre-allocated watchdog
# structures. The system manages a pool of preallocated
# watchdog structures to minimize dynamic allocations
@@ -186,6 +195,7 @@ CONFIG_STDIO_BUFFER_SIZE=1024
CONFIG_NUNGET_CHARS=2
CONFIG_PREALLOC_MQ_MSGS=32
CONFIG_MQ_MAXMSGSIZE=32
+CONFIG_MAX_WDOGPARMS=4
CONFIG_PREALLOC_WDOGS=32
#
diff --git a/nuttx/arch/c5471/include/irq.h b/nuttx/arch/c5471/include/irq.h
index 0745ba6aa..c6a89e951 100644
--- a/nuttx/arch/c5471/include/irq.h
+++ b/nuttx/arch/c5471/include/irq.h
@@ -177,10 +177,10 @@ struct xcptcontext
/* Save the current interrupt enable state & disable IRQs */
-static inline uint32 irqsave(void)
+static inline irqstate_t irqsave(void)
{
- unsigned long flags;
- unsigned long temp;
+ unsigned int flags;
+ unsigned int temp;
__asm__ __volatile__
(
"\tmrs %0, cpsr\n"
@@ -194,7 +194,7 @@ static inline uint32 irqsave(void)
/* Restore saved IRQ & FIQ state */
-static inline void irqrestore(uint32 flags)
+static inline void irqrestore(irqstate_t flags)
{
__asm__ __volatile__
(
@@ -204,8 +204,8 @@ static inline void irqrestore(uint32 flags)
: "memory");
}
-static inline void system_call(swint_t func, uint32 parm1,
- uint32 parm2, uint32 parm3)
+static inline void system_call(swint_t func, int parm1,
+ int parm2, int parm3)
{
__asm__ __volatile__
(
diff --git a/nuttx/arch/c5471/include/types.h b/nuttx/arch/c5471/include/types.h
index 7b39302f0..5ec6e81e1 100644
--- a/nuttx/arch/c5471/include/types.h
+++ b/nuttx/arch/c5471/include/types.h
@@ -52,6 +52,10 @@
* Type Declarations
************************************************************/
+#ifndef __ASSEMBLY__
+
+/* These are the sizes of the standard GNU types */
+
typedef char sbyte;
typedef unsigned char ubyte;
typedef unsigned char uint8;
@@ -63,6 +67,14 @@ typedef unsigned int uint32;
typedef long long sint64;
typedef unsigned long long uint64;
+/* This is the size of the interrupt state save returned by
+ * irqsave()
+ */
+
+typedef unsigned int irqstate_t;
+
+#endif /* __ASSEMBLY__ */
+
/************************************************************
* Global Function Prototypes
************************************************************/
diff --git a/nuttx/arch/c5471/src/Makefile b/nuttx/arch/c5471/src/Makefile
index a4f953c6f..57d741aaa 100644
--- a/nuttx/arch/c5471/src/Makefile
+++ b/nuttx/arch/c5471/src/Makefile
@@ -56,7 +56,7 @@ COBJS = $(CSRCS:.c=.o)
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
-all: up_head.o libarch.a
+all: up_head.o libarch$(LIBEXT)
$(AOBJS) up_head.o: %.o: %.S
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
@@ -64,8 +64,11 @@ $(AOBJS) up_head.o: %.o: %.S
$(COBJS): %.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
-libarch.a: $(OBJS)
- $(AR) rcs $@ $(OBJS)
+libarch$(LIBEXT): $(OBJS)
+ ( for obj in $(OBJS) ; do \
+ $(AR) $@ $${obj} || \
+ { echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
+ done ; )
.depend: Makefile $(SRCS)
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@@ -74,7 +77,7 @@ libarch.a: $(OBJS)
depend: .depend
clean:
- rm -f libarch.a *.o *~
+ rm -f libarch$(LIBEXT) *.o *~
distclean: clean
rm -f Make.dep .depend
diff --git a/nuttx/arch/c5471/src/up_assert.c b/nuttx/arch/c5471/src/up_assert.c
index eaddc7c8e..8b70349f4 100644
--- a/nuttx/arch/c5471/src/up_assert.c
+++ b/nuttx/arch/c5471/src/up_assert.c
@@ -63,7 +63,7 @@
* Name: up_assert
************************************************************/
-void up_assert(const ubyte *filename, uint32 lineno)
+void up_assert(const ubyte *filename, int lineno)
{
dbg("Assertion failed at file:%s line: %d\n",
filename, lineno);
@@ -74,7 +74,7 @@ void up_assert(const ubyte *filename, uint32 lineno)
* Name: up_assert_code
************************************************************/
-void up_assert_code(const ubyte *filename, uint32 lineno, uint16 errorcode)
+void up_assert_code(const ubyte *filename, int lineno, int errorcode)
{
dbg("Assertion failed at file:%s line: %d error code: %d\n",
filename, lineno, errorcode);
diff --git a/nuttx/arch/c5471/src/up_createstack.c b/nuttx/arch/c5471/src/up_createstack.c
index 90919e265..0e1f0690a 100644
--- a/nuttx/arch/c5471/src/up_createstack.c
+++ b/nuttx/arch/c5471/src/up_createstack.c
@@ -78,7 +78,7 @@
* must be allocated.
************************************************************/
-STATUS up_create_stack(_TCB *tcb, uint32 stack_size)
+STATUS up_create_stack(_TCB *tcb, size_t stack_size)
{
if (tcb->stack_alloc_ptr &&
tcb->adj_stack_size != stack_size)
@@ -94,8 +94,8 @@ STATUS up_create_stack(_TCB *tcb, uint32 stack_size)
if (tcb->stack_alloc_ptr)
{
- uint32 top_of_stack;
- uint32 size_of_stack;
+ size_t top_of_stack;
+ size_t size_of_stack;
/* The Arm7Tdmi uses a push-down stack: the stack grows
* toward loweraddresses in memory. The stack pointer
diff --git a/nuttx/arch/c5471/src/up_schedulesigaction.c b/nuttx/arch/c5471/src/up_schedulesigaction.c
index 4ea39bec2..3f4e32ec9 100644
--- a/nuttx/arch/c5471/src/up_schedulesigaction.c
+++ b/nuttx/arch/c5471/src/up_schedulesigaction.c
@@ -101,7 +101,7 @@ void up_schedule_sigaction(_TCB *tcb, sig_deliver_t sigdeliver)
if (!tcb->xcp.sigdeliver)
{
- uint32 flags;
+ irqstate_t flags;
/* Make sure that interrupts are disabled */
diff --git a/nuttx/arch/c5471/src/up_serial.c b/nuttx/arch/c5471/src/up_serial.c
index df4927660..b11bfc070 100644
--- a/nuttx/arch/c5471/src/up_serial.c
+++ b/nuttx/arch/c5471/src/up_serial.c
@@ -721,7 +721,7 @@ static void up_uartsetup(up_dev_t *dev)
static void shutdown(up_dev_t * dev)
{
- uint32 flags;
+ irqstate_t flags;
uint16 msr;
/* Free the IRQ */
@@ -878,7 +878,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
case TIOCSBRK: /* BSD compatibility: Turn break on, unconditionally */
{
- uint32 flags = irqsave();
+ irqstate_t flags = irqsave();
up_enablebreaks(dev);
irqrestore(flags);
}
@@ -886,7 +886,7 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg)
case TIOCCBRK: /* BSD compatibility: Turn break off, unconditionally */
{
- uint32 flags;
+ irqstate_t flags;
flags = irqsave();
up_disablebreaks(dev);
irqrestore(flags);
@@ -973,7 +973,7 @@ static int up_open(struct file *filep)
if (++dev->open_count == 1)
{
- int flags = irqsave();
+ irqstate_t flags = irqsave();
/* If this is the console, then the UART has already
* been initialized.
diff --git a/nuttx/arch/c5471/src/up_usestack.c b/nuttx/arch/c5471/src/up_usestack.c
index 4cab9209f..315314569 100644
--- a/nuttx/arch/c5471/src/up_usestack.c
+++ b/nuttx/arch/c5471/src/up_usestack.c
@@ -78,10 +78,10 @@
*
************************************************************/
-STATUS up_use_stack(_TCB *tcb, uint32 *stack, uint32 stack_size)
+STATUS up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
{
- uint32 top_of_stack;
- uint32 size_of_stack;
+ size_t top_of_stack;
+ size_t size_of_stack;
if (tcb->stack_alloc_ptr)
{
diff --git a/nuttx/arch/sim/Make.defs b/nuttx/arch/sim/Make.defs
index 12e288a57..19c2b5db6 100644
--- a/nuttx/arch/sim/Make.defs
+++ b/nuttx/arch/sim/Make.defs
@@ -51,7 +51,7 @@ ARCHSCRIPT =
CROSSDEV =
CC = $(CROSSDEV)gcc
LD = $(CROSSDEV)ld
-AR = $(CROSSDEV)ar
+AR = $(CROSSDEV)ar rcs
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
@@ -61,6 +61,7 @@ CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
LDFLAGS = $(ARCHSCRIPT)
EXTRA_LIBS = -lc
+LIBEXT = .a
ifeq ("${CONFIG_DEBUG}","y")
LDFLAGS += -g
diff --git a/nuttx/arch/sim/defconfig b/nuttx/arch/sim/defconfig
index 80de3cbdc..5b6f2ae6f 100644
--- a/nuttx/arch/sim/defconfig
+++ b/nuttx/arch/sim/defconfig
@@ -99,6 +99,8 @@ CONFIG_ARCH_KFREE=n
#
# General Compile environment setup
#
+# CONFIG_SMALL_MEMORY - enable if your processor supports
+# 16-bit addressing; disable if it supports 32-bit.
# CONFIG_HAVE_INLINE - enable if your compiler supports
# inline functions
# CONFIG_HAVE_DOUBLE - enable if your compiler supports type
@@ -106,21 +108,26 @@ CONFIG_ARCH_KFREE=n
# CONFIG_HAVE_LONG_LONG - enable if your architecture supports
# long long types and if you plan to use them
# CONFIG_CAN_PASS_STRUCTS - enable if your compiler supports
-# passing structures and unions as values
+# passing and assiging structures and unions as values
+# CONFIG_CAN_CAST_POINTERS - enable if you can cast between
+# integers and pointer.
# CONFIG_HAVE_WEAKFUNCTIONS - enable if you compiler supports
# weak functions (see include/nuttx/comp
#
+CONFIG_SMALL_MEMORY=n
CONFIG_HAVE_INLINE=y
CONFIG_HAVE_DOUBLE=y
CONFIG_HAVE_LONG_LONG=n
CONFIG_CAN_PASS_STRUCTS=y
+CONFIG_CAN_CAST_POINTERS=y
CONFIG_HAVE_WEAKFUNCTIONS=y
#
# General build options
#
-# CONFIG_RRLOAD_BINY - make the rrload binary format used with
+# CONFIG_RRLOAD_BINARY - make the rrload binary format used with
# BSPs from www.ridgerun.com
+#
CONFIG_RRLOAD_BINARY=n
#
@@ -142,6 +149,8 @@ CONFIG_RRLOAD_BINARY=n
# CONFIG_MQ_MAXMSGSIZE - Message structures are allocated with
# a fixed payload size given by this settin (does not include
# other message structure overhead.
+# CONFIG_MAX_WDOGPARMS - Maximum number of parameters that
+# can be passed to a watchdog handler
# CONFIG_PREALLOC_WDOGS - The number of pre-allocated watchdog
# structures. The system manages a pool of preallocated
# watchdog structures to minimize dynamic allocations
@@ -153,6 +162,7 @@ CONFIG_STDIO_BUFFER_SIZE=1024
CONFIG_NUNGET_CHARS=2
CONFIG_PREALLOC_MQ_MSGS=32
CONFIG_MQ_MAXMSGSIZE=32
+CONFIG_MAX_WDOGPARMS=4
CONFIG_PREALLOC_WDOGS=32
#
diff --git a/nuttx/arch/sim/include/irq.h b/nuttx/arch/sim/include/irq.h
index 3ae46aa42..f866da50d 100644
--- a/nuttx/arch/sim/include/irq.h
+++ b/nuttx/arch/sim/include/irq.h
@@ -44,6 +44,8 @@
* Included Files
************************************************************/
+#include <sys/types.h>
+
/************************************************************
* Definitions
************************************************************/
@@ -72,12 +74,12 @@ struct xcptcontext
************************************************************/
#ifndef __ASSEMBLY__
-static inline uint32 irqsave(void)
+static inline irqstate_t irqsave(void)
{
return 0;
}
-static inline void irqrestore(uint32 flags)
+static inline void irqrestore(irqstate_t flags)
{
}
#endif
diff --git a/nuttx/arch/sim/include/types.h b/nuttx/arch/sim/include/types.h
index 39232af7d..1c7636886 100644
--- a/nuttx/arch/sim/include/types.h
+++ b/nuttx/arch/sim/include/types.h
@@ -52,6 +52,10 @@
* Type Declarations
************************************************************/
+#ifndef __ASSEMBLY__
+
+/* These are the sizes of the standard GNU types */
+
typedef char sbyte;
typedef unsigned char ubyte;
typedef unsigned char uint8;
@@ -63,6 +67,14 @@ typedef unsigned int uint32;
typedef long long sint64;
typedef unsigned long long uint64;
+/* This is the size of the interrupt state save returned by
+ * irqsave()
+ */
+
+typedef unsigned int irqstate_t;
+
+#endif /* __ASSEMBLY__ */
+
/************************************************************
* Global Function Prototypes
************************************************************/
diff --git a/nuttx/arch/sim/src/Makefile b/nuttx/arch/sim/src/Makefile
index 780cff596..53b4c6a7e 100644
--- a/nuttx/arch/sim/src/Makefile
+++ b/nuttx/arch/sim/src/Makefile
@@ -49,7 +49,7 @@ COBJS = $(CSRCS:.c=.o)
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
-all: up_head.o libarch.a
+all: up_head.o libarch$(LIBEXT)
$(AOBJS): %.o: %.S
$(CC) -c $(CFLAGS) -D__ASSEMBLY__ $< -o $@
@@ -57,8 +57,11 @@ $(AOBJS): %.o: %.S
$(COBJS) up_head.o: %.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
-libarch.a: $(OBJS)
- $(AR) rcs $@ $(OBJS)
+libarch$(LIBEXT): $(OBJS)
+ ( for obj in $(OBJS) ; do \
+ $(AR) $@ $${obj} || \
+ { echo "$(AR) $@ $obj FAILED!" ; exit 1 ; } ; \
+ done ; )
.depend: Makefile $(SRCS)
$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@@ -67,7 +70,7 @@ libarch.a: $(OBJS)
depend: .depend
clean:
- rm -f libarch.a *.o *~
+ rm -f libarch$(LIBEXT) *.o *~
distclean: clean
rm -f Make.dep .depend
diff --git a/nuttx/arch/sim/src/up_createstack.c b/nuttx/arch/sim/src/up_createstack.c
index 0e2c63e4d..845c76661 100644
--- a/nuttx/arch/sim/src/up_createstack.c
+++ b/nuttx/arch/sim/src/up_createstack.c
@@ -81,14 +81,14 @@
*
************************************************************/
-STATUS up_create_stack(_TCB *tcb, uint32 stack_size)
+STATUS up_create_stack(_TCB *tcb, size_t stack_size)
{
STATUS ret = ERROR;
/* Move up to next even word boundary if necessary */
- uint32 adj_stack_size = (stack_size + 3) & ~3;
- uint32 adj_stack_words = adj_stack_size >> 2;
+ size_t adj_stack_size = (stack_size + 3) & ~3;
+ size_t adj_stack_words = adj_stack_size >> 2;
/* Allocate the memory for the stack */
@@ -97,9 +97,10 @@ STATUS up_create_stack(_TCB *tcb, uint32 stack_size)
{
/* This is the address of the last word in the allocation */
- uint32 *adj_stack_ptr = &stack_alloc_ptr[adj_stack_words - 1];
+ size_t *adj_stack_ptr = &stack_alloc_ptr[adj_stack_words - 1];
/* Save the values in the TCB */
+
tcb->adj_stack_size = adj_stack_size;
tcb->stack_alloc_ptr = stack_alloc_ptr;
tcb->adj_stack_ptr = adj_stack_ptr;
diff --git a/nuttx/arch/sim/src/up_head.c b/nuttx/arch/sim/src/up_head.c
index 9d1ccf153..1fc705b5b 100644
--- a/nuttx/arch/sim/src/up_head.c
+++ b/nuttx/arch/sim/src/up_head.c
@@ -64,13 +64,13 @@ int main(int argc, char **argv, char **envp)
return 0;
}
-void up_assert(const ubyte *filename, uint32 line)
+void up_assert(const ubyte *filename, int line)
{
fprintf(stderr, "Assertion failed at file:%s line: %d\n", filename, line);
longjmp(sim_abort, 1);
}
-void up_assert_code(const ubyte *filename, uint32 line, uint16 code)
+void up_assert_code(const ubyte *filename, int line, int code)
{
fprintf(stderr, "Assertion failed at file:%s line: %d error code: %d\n", filename, line, code);
longjmp(sim_abort, 1);
diff --git a/nuttx/arch/sim/src/up_usestack.c b/nuttx/arch/sim/src/up_usestack.c
index 26bf14b21..0c6e7650f 100644
--- a/nuttx/arch/sim/src/up_usestack.c
+++ b/nuttx/arch/sim/src/up_usestack.c
@@ -81,18 +81,19 @@
*
************************************************************/
-STATUS up_use_stack(_TCB *tcb, uint32 *stack, uint32 stack_size)
+STATUS up_use_stack(_TCB *tcb, void *stack, size_t stack_size)
{
/* Move up to next even word boundary if necessary */
- uint32 adj_stack_size = stack_size & ~3;
- uint32 adj_stack_words = adj_stack_size >> 2;
+ size_t adj_stack_size = stack_size & ~3;
+ size_t adj_stack_words = adj_stack_size >> 2;
/* This is the address of the last word in the allocation */
- uint32 *adj_stack_ptr = &stack[adj_stack_words - 1];
+ size_t *adj_stack_ptr = &stack[adj_stack_words - 1];
/* Save the values in the TCB */
+
tcb->adj_stack_size = adj_stack_size;
tcb->stack_alloc_ptr = stack;
tcb->adj_stack_ptr = adj_stack_ptr;