mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-02-22 10:30:10 +03:00
Add comment for UnixLock
The Lock/Unlock mechanism on Unix is a manual, hand-coded implementation of PTHREAD_MUTEX_RECURSIVE. We avoid using the PTHREAD_MUTEX_RECURSIVE directly because it exhibits critical bugs, such as deadlocks on certain older systems(Linux, Solaris, or macOS). followup #2219
This commit is contained in:
@ -1849,6 +1849,8 @@ void UnixUnlockEx(LOCK *lock, bool inner)
|
||||
}
|
||||
|
||||
// Lock
|
||||
// Recursive locking is implemented manually instead of using PTHREAD_MUTEX_RECURSIVE.
|
||||
// See: https://github.com/SoftEtherVPN/SoftEtherVPN/pull/2219
|
||||
bool UnixLock(LOCK *lock)
|
||||
{
|
||||
pthread_mutex_t *mutex;
|
||||
|
||||
Reference in New Issue
Block a user