简体   繁体   English

比较返回值与EBUSY

[英]Compare return value to EBUSY

So, I'm getting an error on this line of code; 因此,我在这行代码中遇到了错误;

else if(lockError == EBUSY)

I get the error; 我得到了错误;

use of undeclared identifier 'EBUSY'

How do I compare my int lockError to the EBUSY that might be returned when I try a pthread_mutex_unlock. 我如何将我的int lockError与尝试pthread_mutex_unlock时可能返回的EBUSY进行比较。

You forgot to include #include<errno.h> where EBSUY is defined. 您忘记了在其中定义EBSUY地方包括#include<errno.h> See errno.h . 参见errno.h

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM