⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 delctx.c

📁 T-kernel 的extension源代码
💻 C
字号:
/* *---------------------------------------------------------------------- *    T-Kernel / Standard Extension * *    Copyright (C) 2006 by Ken Sakamura. All rights reserved. *    T-Kernel / Standard Extension is distributed  *      under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * *    Version:   1.00.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* *	delctx.c (libtkse) * *	Discard the task context. * *	Processing within library when task context is unnecessary  *      such as the task exit time, etc. */#include <tk/tkernel.h>#include <sys/libs.h>#include <extension/proctask.h>Inline	ID	gettid( void );EXPORT	FP	__atdelctx_entry;Inline ID gettid( void ){	return tkse_get_tid();}/* * The function to be called when task context is discarded. *	Discard the library context corresponding to the task of "tskid". *	Select the invoking task when "tskid = 0" */EXPORT void _delete_libctx( ID tskid ){	if ( __atdelctx_entry != NULL ) {		if ( tskid == 0 ) {			tskid = gettid();		}		(*__atdelctx_entry)(tskid);	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -