📄 tcce.c
字号:
/* resulting in version 1.1 */
/* R. Pfaff - */
/* D. Lamie 03-18-1994 Verified version 1.1 */
/* */
/*************************************************************************/
STATUS TCCE_Delete_HISR(NU_HISR *hisr_ptr)
{
TC_HCB *hisr; /* HISR control block ptr */
STATUS status; /* Completion status */
/* Move input HISR control block pointer into internal pointer. */
hisr = (TC_HCB *) hisr_ptr;
/* Determine if the supplied HISR pointer is valid. */
if ((hisr) && (hisr -> tc_id == TC_HISR_ID))
/* Valid HISR pointer, call the function to delete the HISR. */
status = TCC_Delete_HISR(hisr_ptr);
else
/* Invalid HISR pointer, indicate with the status. */
status = NU_INVALID_HISR;
/* Return the completion status. */
return(status);
}
/*************************************************************************/
/* */
/* FUNCTION */
/* */
/* TCCE_Reset_Task */
/* */
/* DESCRIPTION */
/* */
/* This function performs error checking on the parameters supplied */
/* to the reset task function. */
/* */
/* AUTHOR */
/* */
/* William E. Lamie, Accelerated Technology, Inc. */
/* */
/* 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 */
/* */
/* NAME DATE REMARKS */
/* */
/* W. Lamie 03-01-1993 Created initial version 1.0 */
/* D. Lamie 04-19-1993 Verified version 1.0 */
/* W. Lamie 03-01-1994 Modified function interface, */
/* added register optimizations, */
/* resulting in version 1.1 */
/* R. Pfaff - */
/* D. Lamie 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. */
/* */
/* AUTHOR */
/* */
/* William E. Lamie, Accelerated Technology, Inc. */
/* */
/* 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 */
/* */
/* NAME DATE REMARKS */
/* */
/* W. Lamie 03-01-1993 Created initial version 1.0 */
/* D. Lamie 04-19-1993 Verified version 1.0 */
/* W. Lamie 03-01-1994 Modified function interface, */
/* added register optimizations, */
/* resulting in version 1.1 */
/* R. Pfaff - */
/* D. Lamie 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. */
/* */
/* AUTHOR */
/* */
/* William E. Lamie, Accelerated Technology, Inc. */
/* */
/* 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 */
/* */
/* NAME DATE REMARKS */
/* */
/* W. Lamie 03-01-1993 Created initial version 1.0 */
/* D. Lamie 04-19-1993 Verified version 1.0 */
/* W. Lamie 03-01-1994 Modified logic that checked task */
/* status without protection of */
/* scheduling structures, */
/* resulting in version 1.0a */
/* D. Lamie 03-01-1994 Verified version 1.0a */
/* W. Lamie 03-01-1994 Modified function interface, */
/* added register optimizations, */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -