📄 tcce.c
字号:
/* *//* FUNCTION *//* *//* TCCE_Reset_Task *//* *//* DESCRIPTION *//* *//* This function performs error checking on the parameters supplied *//* to the reset task function. *//* *//* CALLED BY *//* *//* Application *//* *//* CALLS *//* *//* TCC_Reset_Task Actual reset task function *//* *//* INPUTS *//* *//* task_ptr Task control block pointer *//* argc Optional task parameter *//* argv Optional task parameter *//* *//* OUTPUTS *//* *//* NU_INVALID_TASK Indicates task pointer is *//* invalid *//* *//* HISTORY *//* *//* DATE REMARKS *//* *//* 03-01-1993 Created initial version 1.0 *//* 04-19-1993 Verified version 1.0 *//* 03-01-1994 Modified function interface, *//* added register optimizations, *//* resulting in version 1.1 *//* *//* 03-18-1994 Verified version 1.1 *//* *//*************************************************************************/STATUS TCCE_Reset_Task(NU_TASK *task_ptr, UNSIGNED argc, VOID *argv){TC_TCB *task; /* Task control block ptr */STATUS status; /* Status of the request */ /* Move input task control block pointer into internal pointer. */ task = (TC_TCB *) task_ptr; /* Determine if the task pointer is valid. */ if ((task == NU_NULL) || (task -> tc_id != TC_TASK_ID)) /* Task pointer is invalid. */ status = NU_INVALID_TASK; else /* Call actual function to reset the task. */ status = TCC_Reset_Task(task_ptr, argc, argv); /* Return completion status. */ return(status);}/*************************************************************************//* *//* FUNCTION *//* *//* TCCE_Terminate_Task *//* *//* DESCRIPTION *//* *//* This function performs error checking on the parameters supplied *//* to the terminate task function. *//* *//* CALLED BY *//* *//* Application *//* *//* CALLS *//* *//* TCC_Terminate_Task Actual terminate task funct *//* *//* INPUTS *//* *//* task_ptr Task control block pointer *//* *//* OUTPUTS *//* *//* NU_INVALID_TASK Indicates task pointer is *//* invalid *//* *//* HISTORY *//* *//* DATE REMARKS *//* *//* 03-01-1993 Created initial version 1.0 *//* 04-19-1993 Verified version 1.0 *//* 03-01-1994 Modified function interface, *//* added register optimizations, *//* resulting in version 1.1 *//* *//* 03-18-1994 Verified version 1.1 *//* *//*************************************************************************/STATUS TCCE_Terminate_Task(NU_TASK *task_ptr){TC_TCB *task; /* Task control block ptr */STATUS status; /* Status return */ /* Move input task control block pointer into internal pointer. */ task = (TC_TCB *) task_ptr; /* Determine if the task pointer is valid. */ if ((task == NU_NULL) || (task -> tc_id != TC_TASK_ID)) /* Task pointer is invalid. */ status = NU_INVALID_TASK; else /* Call actual function to terminate the task. */ status = TCC_Terminate_Task(task_ptr); /* Return completion status. */ return(status);}/*************************************************************************//* *//* FUNCTION *//* *//* TCCE_Resume_Service *//* *//* DESCRIPTION *//* *//* This function performs error checking on the parameters supplied *//* to the resume task function. *//* *//* CALLED BY *//* *//* Application *//* *//* CALLS *//* *//* TCCE_Validate_Resume Function that checks the *//* current task status for a *//* valid resume request *//* TCC_Resume_Service Actual task resume service *//* *//* INPUTS *//* *//* task_ptr Task control block pointer *//* *//* OUTPUTS *//* *//* NU_SUCCESS If successful completion *//* NU_INVALID_TASK Task pointer is invalid *//* NU_INVALID_RESUME Not previously suspended *//* *//* HISTORY *//* *//* DATE REMARKS *//* *//* 03-01-1993 Created initial version 1.0 *//* 04-19-1993 Verified version 1.0 *//* 03-01-1994 Modified logic that checked task *//* status without protection of *//* scheduling structures, *//* resulting in version 1.0a *//* 03-01-1994 Verified version 1.0a *//* 03-01-1994 Modified function interface, *//* added register optimizations, *//* moved validate resume function *//* to this file, resulting in *//* version 1.1 *//* 03-18-1994 Verified version 1.1 *//* *//*************************************************************************/STATUS TCCE_Resume_Service(NU_TASK *task_ptr){TC_TCB *task; /* Task control block ptr */STATUS status; /* Completion status */ /* Move task control block pointer into internal pointer. */ task = (TC_TCB *) task_ptr; /* Determine if the task pointer is valid. */ if ((task == NU_NULL) || (task -> tc_id != TC_TASK_ID)) /* Task pointer is invalid. */ status = NU_INVALID_TASK; /* Make sure that the task is suspended in an identical manner. */ else if (TCCE_Validate_Resume(NU_PURE_SUSPEND, task_ptr)) /* Task is not unconditionally suspended, return error status. */ status = NU_INVALID_RESUME; else /* Call the actual resume service. */ status = TCC_Resume_Service(task_ptr); /* Return the completion status. */ return(status);}/*************************************************************************//* *//* FUNCTION *//* *//* TCCE_Suspend_Service *//* *//* DESCRIPTION *//* *//* This function performs error checking on the suspend service. *//* */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -