Skip to content
Snippets Groups Projects
Commit 93e470eb authored by Christian Mehlis's avatar Christian Mehlis
Browse files

Merge pull request #110 from mehlis/master

fix changed prototype parameter 1 of thread_stack_init from void* to void(*)(void)
parents 6d95d8a4 63146190
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ void board_init(void); ...@@ -29,7 +29,7 @@ void board_init(void);
* *
* @return stack pointer * @return stack pointer
*/ */
char *thread_stack_init(void *task_func, void *stack_start, int stack_size); char *thread_stack_init(void (*task_func)(void), void *stack_start, int stack_size);
/** /**
* @brief Removes thread from scheduler and set status to STATUS_STOPPED * @brief Removes thread from scheduler and set status to STATUS_STOPPED
......
...@@ -38,7 +38,7 @@ void thread_yield(void) ...@@ -38,7 +38,7 @@ void thread_yield(void)
* Processor specific routine - here for ARM7 * Processor specific routine - here for ARM7
* sizeof(void*) = sizeof(int) * sizeof(void*) = sizeof(int)
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
char *thread_stack_init(void *task_func, void *stack_start, int stack_size) char *thread_stack_init(void (*task_func)(void), void *stack_start, int stack_size)
{ {
unsigned int *stk; unsigned int *stk;
int i; int i;
......
...@@ -46,7 +46,7 @@ void cpu_switch_context_exit(void) ...@@ -46,7 +46,7 @@ void cpu_switch_context_exit(void)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Processor specific routine - here for MSP // Processor specific routine - here for MSP
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
char *thread_stack_init(void *task_func, void *stack_start, int stack_size) char *thread_stack_init(void (*task_func)(void), void *stack_start, int stack_size)
{ {
unsigned short *stk; unsigned short *stk;
stk = (unsigned short *)(stack_start + stack_size); stk = (unsigned short *)(stack_start + stack_size);
......
...@@ -45,7 +45,7 @@ void thread_print_stack(void) ...@@ -45,7 +45,7 @@ void thread_print_stack(void)
return; return;
} }
char *thread_stack_init(void *task_func, void *stack_start, int stacksize) char *thread_stack_init(void (*task_func)(void), void *stack_start, int stacksize)
{ {
unsigned int *stk; unsigned int *stk;
ucontext_t *p; ucontext_t *p;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment