Skip to content

Commit 5bda2c6

Browse files
Updated UTs
1 parent 4bd831f commit 5bda2c6

3 files changed

Lines changed: 4 additions & 12 deletions

File tree

app/src/application.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int main(void)
4646
/*** SYNCH BARRIER USING PROCEDURE CALL CHANNELS ***/
4747
/*
4848
In kconfig.h set:
49-
RK_CONF_N_USRTASKS 5
49+
RK_CONF_N_USRTASKS_MAX 5
5050
*/
5151

5252
#define LOG_PRIORITY 5
@@ -223,7 +223,7 @@ VOID Task3(VOID *args)
223223

224224
/*
225225
in kconfig.h set:
226-
RK_CONF_N_USRTASKS 4
226+
RK_CONF_N_USRTASKS_MAX 4
227227
*/
228228

229229
#define STACKSIZE 256

core/inc/kconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
/***[ DYNAMIC TASK CREATION **************************************************/
3939
/* Enables/disables runtime task creation via kTaskSpawn(). */
4040
#ifndef RK_CONF_DYNAMIC_TASK
41-
#define RK_CONF_DYNAMIC_TASK (OFF)
41+
#define RK_CONF_DYNAMIC_TASK (ON)
4242
#endif
4343

4444
/***[ MAXIMUM NUMBER OF USER TASKS ******************************************/

core/src/ksch.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -560,15 +560,7 @@ RK_ERR kTaskSpawn(RK_DYNAMIC_TASK_ATTR const *taskAttrPtr,
560560
return (RK_ERR_INVALID_OBJ);
561561
}
562562

563-
if ((stackMemPtr->blkSize % sizeof(RK_STACK)) != 0U)
564-
{
565-
#if (RK_CONF_ERR_CHECK == ON)
566-
kErrHandler(RK_FAULT_INVALID_PARAM);
567-
#endif
568-
return (RK_ERR_INVALID_PARAM);
569-
}
570-
571-
ULONG const stackSize = (stackMemPtr->blkSize / sizeof(RK_STACK));
563+
ULONG const stackSize = (stackMemPtr->blkSize / RK_WORD_SIZE);
572564
if ((stackSize < RK_MIN_STACKSIZE) || ((stackSize & 1U) != 0U))
573565
{
574566
#if (RK_CONF_ERR_CHECK == ON)

0 commit comments

Comments
 (0)