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

📄 test3.c

📁 用于移植在pthread环境中开发的应用程序到没有pthread支持的环境
💻 C
字号:
/* test if there is error when a null recycle thread(task) running
 * responding to the SCTP's  <sctp_eshell_> thread's error, number 3d0002
 */

#include "test_i.h"

void *cld1_3( void *p )
{
	struct timespec t;
	
	printf("Entering cld1_4....\n");
	
	t.tv_sec = 2;
	t.tv_nsec = 0;
	
	for(;;)
	{
		pthread_delay_np( &t );
	}
}

int test3( void )
{
	pthread_t idThread;
		
	if( pthread_create( &idThread, 0, cld1_3, NULL, 0) == PTHR_FAILURE)
	{
		printf("ERROR: create thr error\n");
	}
	else
	{
		printf("creat thr succ\n");
	}
}
 

⌨️ 快捷键说明

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