在驱动程序内核线程中代码如下:
int count;
printk("\n read_data thread count is (before if) %d " ,count);
if(count!=0)canread=1;
{
static int first,second;
first=4096-RxWrite(dev);
printk("\n read_data thread count is %d ,write start bytes is %d" ,count ,RxWrite(dev));
......}
可是输出:
read_data thread count is (before if) 0
read_data thread count is 0 ,write start bytes is 0
count是0,为什么if的判断能成立?
整个人都不好了啊
int count;
printk("\n read_data thread count is (before if) %d " ,count);
if(count!=0)canread=1;
{
static int first,second;
first=4096-RxWrite(dev);
printk("\n read_data thread count is %d ,write start bytes is %d" ,count ,RxWrite(dev));
......}
可是输出:
read_data thread count is (before if) 0
read_data thread count is 0 ,write start bytes is 0
count是0,为什么if的判断能成立?
整个人都不好了啊