主题 : mini2440的ADC转换测试问题? 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 25552
精华: 0
发帖: 64
金钱: 320 两
威望: 64 点
综合积分: 128 分
注册时间: 2010-07-26
最后登录: 2011-01-04
楼主  发表于: 2010-08-21 15:37

 mini2440的ADC转换测试问题?

           自己写了个ADC程序,定义了个互斥量,怎么就是获得不了啊!下面是问题的主要程序:
      DECLARE_MUTEX(LY_ADC_LOCK);
                int ret;
    ret = down_trylock(&LY_ADC_LOCK);
    if(down_trylock(&LY_ADC_LOCK))
    {
        printk(KERN_ERR"sigle is busing!\n");
        return ret;
    }
就是老是打印出 sigle is busing!    
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2010-08-21 17:47
你连调了两次down, 当然就是这样
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."