Skip to content

Commit

Permalink
updated stack size
Browse files Browse the repository at this point in the history
  • Loading branch information
rajszym committed Aug 31, 2017
1 parent 4cf9320 commit 93d2a31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions StateOS/kernel/src/os_tsk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@file StateOS: os_tsk.c
@author Rajmund Szymanski
@date 29.08.2017
@date 31.08.2017
@brief This file provides set of functions for StateOS.
******************************************************************************
Expand Down Expand Up @@ -49,7 +49,7 @@ void tsk_init( tsk_t *tsk, unsigned prio, fun_t *state, stk_t *stack, unsigned s
tsk->basic = prio;
tsk->state = state;
tsk->stack = stack;
tsk->top = (stk_t *) ALLO((size_t)stack+size);
tsk->top = (stk_t *) ALLO((size_t)stack + size);

core_ctx_init(tsk);
core_tsk_insert(tsk);
Expand All @@ -69,7 +69,7 @@ tsk_t *tsk_create( unsigned prio, fun_t *state, unsigned size )
if (size == 0)
size = OS_STACK_SIZE;

size = ALHI(size)+ALHI(sizeof(tsk_t))-sizeof(tsk);
size = ALHI(sizeof(tsk_t) + size) - sizeof(tsk_t);

port_sys_lock();

Expand Down

0 comments on commit 93d2a31

Please sign in to comment.