diff options
Diffstat (limited to 'winsup/cygwin/sync.cc')
-rw-r--r-- | winsup/cygwin/sync.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/sync.cc b/winsup/cygwin/sync.cc index d8b3d8f54..f3796272f 100644 --- a/winsup/cygwin/sync.cc +++ b/winsup/cygwin/sync.cc @@ -4,8 +4,7 @@ which is intended to operate similarly to a mutex but attempts to avoid making expensive calls to the kernel. - Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010, 2011, 2012 - Red Hat, Inc. + Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, 2010 Red Hat, Inc. This file is part of Cygwin. @@ -110,8 +109,10 @@ muto::acquired () /* Return the muto lock. Needs to be called once per every acquire. */ int -muto::release (_cygtls *this_tls) +muto::release () { + void *this_tls = &_my_tls; + if (tls != this_tls || !visits) { SetLastError (ERROR_NOT_OWNER); /* Didn't have the lock. */ |