布尔变量----改变程序执行流程

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "task.h"



// 
static int I2S_Init_flag = 0;
int main(int argc,char**argv)
{
	int ch = -1;
	char *string = "v::a::b::cdezgnmcv";
	int count = 0;
	int volume = -1;


	while(1)
	{
		if(!I2S_Init_flag)
		{
			// 
			// 
			printf("I2X_Init_flag
");
			I2S_Init_flag  = 1;
		}
	}


	//printf("argc backward is %d
",argc);
	//task_create();
    //printf("argc forward is %d
",argc);
    
	while(1)
	{
		if( getchar() == 'x')
		{
			printf("main phread
 ");
            break;
		}
		
	}

	return 0;
	
}

  作用: (1)解决递归调用,多次运行的同一段代码。

                (2)改变程序执行流程,事件通知.

一勤天下无难事。
原文地址:https://www.cnblogs.com/nowroot/p/13647806.html