mirror of
https://github.com/kelvinlawson/atomthreads.git
synced 2026-03-19 10:31:50 +01:00
Merge remote-tracking branch 'kelvin_atomthreads/master'
Conflicts: tests/kern1.c tests/kern3.c tests/kern4.c tests/mutex1.c tests/mutex2.c tests/mutex3.c tests/mutex4.c tests/mutex5.c tests/mutex6.c tests/mutex7.c tests/mutex8.c tests/mutex9.c tests/queue2.c tests/queue3.c tests/queue5.c tests/queue6.c tests/queue7.c tests/queue9.c tests/sem1.c tests/sem3.c tests/sem4.c tests/sem5.c tests/sem6.c tests/sem7.c tests/sem8.c tests/sem9.c tests/timer2.c
This commit is contained in:
@@ -30,6 +30,10 @@
|
||||
#ifndef __ATOM_H
|
||||
#define __ATOM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "atomtimer.h"
|
||||
#include "atomport.h"
|
||||
|
||||
@@ -62,7 +66,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
|
||||
|
||||
@@ -102,7 +106,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);
|
||||
@@ -117,7 +121,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);
|
||||
@@ -126,5 +130,8 @@ extern void archFirstThreadRestore(ATOM_TCB *new_tcb_ptr);
|
||||
|
||||
extern void atomTimerTick (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ATOM_H */
|
||||
|
||||
Reference in New Issue
Block a user