mirror of
https://github.com/kelvinlawson/atomthreads.git
synced 2026-02-08 07:53:16 +01:00
Add support for architectures with stack alignment requirements in preparation for various 32 bit ports.
NOTE: The atomThreadCreate() and atmoOSInit() APIs have changed to take stack_bottom rather than stack_top and to allow optional stack-checking on a per-thread basis.
This commit is contained in:
@@ -62,7 +62,7 @@ typedef struct atom_tcb
|
||||
|
||||
/* Details used if thread stack-checking is required */
|
||||
#ifdef ATOM_STACK_CHECKING
|
||||
POINTER stack_top; /* Pointer to top of stack allocation */
|
||||
POINTER stack_bottom; /* Pointer to bottom of stack allocation */
|
||||
uint32_t stack_size; /* Size of stack allocation in bytes */
|
||||
#endif
|
||||
|
||||
@@ -98,7 +98,7 @@ extern uint8_t atomOSStarted;
|
||||
|
||||
|
||||
/* Function prototypes */
|
||||
extern uint8_t atomOSInit (void *idle_thread_stack_top, uint32_t stack_size);
|
||||
extern uint8_t atomOSInit (void *idle_thread_stack_bottom, uint32_t idle_thread_stack_size, uint8_t idle_thread_stack_check);
|
||||
extern void atomOSStart (void);
|
||||
|
||||
extern void atomSched (uint8_t timer_tick);
|
||||
@@ -113,7 +113,7 @@ extern ATOM_TCB *tcbDequeuePriority (ATOM_TCB **tcb_queue_ptr, uint8_t priority)
|
||||
|
||||
extern ATOM_TCB *atomCurrentContext (void);
|
||||
|
||||
extern uint8_t atomThreadCreate (ATOM_TCB *tcb_ptr, uint8_t priority, void (*entry_point)(uint32_t), uint32_t entry_param, void *stack_top, uint32_t stack_size);
|
||||
extern uint8_t atomThreadCreate (ATOM_TCB *tcb_ptr, uint8_t priority, void (*entry_point)(uint32_t), uint32_t entry_param, void *stack_bottom, uint32_t stack_size, uint8_t stack_check);
|
||||
extern uint8_t atomThreadStackCheck (ATOM_TCB *tcb_ptr, uint32_t *used_bytes, uint32_t *free_bytes);
|
||||
|
||||
extern void archContextSwitch (ATOM_TCB *old_tcb_ptr, ATOM_TCB *new_tcb_ptr);
|
||||
|
||||
Reference in New Issue
Block a user