mirror of
https://github.com/gatieme/LDD-LinuxDeviceDrivers.git
synced 2026-11-09 08:38:04 +08:00
init_MUTEX被废除(解决rror: implicit declaration of function ‘init_MUTEX’)--http://blog.csdn.net/gatieme/article/details/71598127
This commit is contained in:
1 parent
c4f1ad5d41
commit
40377d669a
1 file changed
+1
-1
@@ -56,7 +56,7 @@ static inline void sema_init(struct semaphore *sem, int val)
|
||||
|
||||
```cpp
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 36) && !defined(init_MUTEX)
|
||||
sema_init(&sem);
|
||||
sema_init(&sem, 1);
|
||||
#else
|
||||
init_MUTEX(&sem);
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user