lishuang.xie c42c2cea82 update dev_ck_v2.1_feature#1609 to dev_ck_v2.1
1. add error return(inc/err_num.h and osp/inc/err_num.h)
2. change the task init function:
   old: typedef void(*OSP_TASKINIT_FUNC)(void);
   new: typedef int(*OSP_TASKINIT_FUNC)(void);
3. osp_task_create:
   3.1 before create task should call the init function first
   3.2 if the init function return error, don't call the create task, return error
4. Test:
   4.1 spu_case0_arm_case0_cpri:      Pass
   4.2 spu_case14_arm_case20_cpri:    Pass
   4.3 spu_case20_arm_case20_cpri:    Pass
   4.4 spu_case21_arm_case21_cpri:    Pass
   4.5 spu_case34_arm_case5:          Pass
   4.6 spu_case44_arm_case5:         Pass
   4.7 spu_case20_arm_case20_task_ok: Pass
   4.8 spu_case20_arm_case20_task_ng: Pass
2024-01-29 09:54:23 +08:00

20 lines
886 B
C

#ifndef __ERR_NUM_H__
#define __ERR_NUM_H__
#define OSP_OK (0) /* 正常返回 */
#define OSP_PAR_ILL (1) /* 入参错误 */
#define OSP_PAR_REP (2) /* 入参重复 */
#define OSP_QUE_FULL (3) /* 软队列满 */
#define OSP_QUE_EMPT (4) /* 软队列空 */
#define OSP_MEM_FULL (5) /* 内存申请失败 */
#define OSP_NO_FILE (6) /* 无对应配置文件 */
#define OSP_ERROR (7) /* 失败返回 */
#define OSP_HW_BAND (8) /* 硬件队列绑定失败 */
#define OSP_HW_VECT (9) /* 硬件队列获取中断号失败 */
#define OSP_HW_IRQ (10) /* 硬件队列注册中断服务失败 */
#define OSP_HW_EMPTY_ERR (11) /* 硬件队列非空中断使能失败 */
#define OSP_TASK_INIT_ERR (12) /* 任务初始化函数返回失败 */
#endif