1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

Rename lockreleasempm to lockrelease. this name was changed because of a clash with a symbol in scriptworks, and that's no longer a concern. see <https://info.ravenbrook.com/project/mps/import/2001-09-27/mminfo/doc/meeting/general/1997-02-19>. if we get symbol name clashes in future, we can try the .name.single strategy, or maybe objcopy --prefix.

Copied from Perforce
 Change: 187322
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-10-21 22:35:30 +01:00
parent 2d6578f527
commit d0ae2f62ae
10 changed files with 35 additions and 35 deletions

View file

@ -438,7 +438,7 @@ void GlobalsPrepareToDestroy(Globals arenaGlobals)
arenaGlobals->defaultChain = NULL;
ChainDestroy(defaultChain);
LockReleaseMPM(arenaGlobals->lock);
LockRelease(arenaGlobals->lock);
/* Theoretically, another thread could grab the lock here, but it's */
/* not worth worrying about, since an attempt after the lock has been */
/* destroyed would lead to a crash just the same. */
@ -591,7 +591,7 @@ void ArenaLeaveLock(Arena arena, Bool recursive)
if(recursive) {
LockReleaseRecursive(lock);
} else {
LockReleaseMPM(lock);
LockRelease(lock);
}
return;
}

View file

@ -1,7 +1,7 @@
/* lock.h: RECURSIVE LOCKS
*
* $Id$
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
*
* .description: [@@@@ Should be combined with <design/lock/>]
* This defines the type Lock, which supports simple recursive
@ -32,10 +32,10 @@
* There is a limit on the number of recursive claims which
* depends on the implementation. See issue.lock-claim-limit.
*
* LockClaim and LockReleaseMPM are the same as the Recursive versions,
* LockClaim and LockRelease are the same as the Recursive versions,
* except that LockClaim may only be used by a thread that doesn't
* already own the lock, and LockReleaseMPM may only be used to release
* a lock with one claim. LockClaim and LockReleaseMPM if used, must
* already own the lock, and LockRelease may only be used to release
* a lock with one claim. LockClaim and LockRelease if used, must
* be used symmetrically in pairs.
*
* There are two intended uses. Here is an example:
@ -48,7 +48,7 @@
* ;; lock owned by this thread.
* ;; Cannot call binaryUse() at this point.
* ;; only one thread at a time may be at this point.
* LockReleaseMPM(&lockStruct);
* LockRelease(&lockStruct);
* ;; lock not owned by this thread.
* }
*
@ -129,20 +129,20 @@ extern void LockReleaseRecursive(Lock lock);
* This may only be used when the lock is not already owned by
* the calling thread.
* When used it behaves like LockClaimRecursive, but must be
* matched by a call to LockReleaseMPM.
* matched by a call to LockRelease.
*/
extern void LockClaim(Lock lock);
/* LockReleaseMPM
/* LockRelease
*
* This must only be used to release a Lock symmetrically
* with LockClaim. It therefore should only be called with
* a single claim.
*/
extern void LockReleaseMPM(Lock lock);
extern void LockRelease(Lock lock);
/* LockCheck -- Validation */
@ -204,7 +204,7 @@ extern void LockReleaseGlobal(void);
#define LockClaimRecursive(lock) UNUSED(lock)
#define LockReleaseRecursive(lock) UNUSED(lock)
#define LockClaim(lock) UNUSED(lock)
#define LockReleaseMPM(lock) UNUSED(lock)
#define LockRelease(lock) UNUSED(lock)
#define LockCheck(lock) ((void)lock, TRUE)
#define LockClaimGlobalRecursive()
#define LockReleaseGlobalRecursive()
@ -220,7 +220,7 @@ extern void LockReleaseGlobal(void);
/* C. COPYRIGHT AND LICENSE
*
* Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
* All rights reserved. This is an open source license. Contact
* Ravenbrook for commercial licensing options.
*

View file

@ -1,7 +1,7 @@
/* lockan.c: ANSI RECURSIVE LOCKS
*
* $Id$
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
*
* .purpose: This is a trivial implementation of recursive locks
* that assumes we are not running in a multi-threaded environment.
@ -58,7 +58,7 @@ void (LockClaim)(Lock lock)
lock->claims = 1;
}
void (LockReleaseMPM)(Lock lock)
void (LockRelease)(Lock lock)
{
AVERT(Lock, lock);
AVER(lock->claims == 1);
@ -118,13 +118,13 @@ void (LockClaimGlobal)(void)
void (LockReleaseGlobal)(void)
{
LockReleaseMPM(globalLock);
LockRelease(globalLock);
}
/* C. COPYRIGHT AND LICENSE
*
* Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
* All rights reserved. This is an open source license. Contact
* Ravenbrook for commercial licensing options.
*

View file

@ -46,7 +46,7 @@ int main(int argc, char *argv[])
LockClaimGlobalRecursive();
LockReleaseGlobal();
LockClaimGlobal();
LockReleaseMPM(a);
LockRelease(a);
LockClaimGlobalRecursive();
LockReleaseGlobal();
LockClaimRecursive(b);
@ -59,7 +59,7 @@ int main(int argc, char *argv[])
LockClaimRecursive(a);
LockReleaseGlobalRecursive();
LockReleaseRecursive(a);
LockReleaseMPM(a);
LockRelease(a);
LockFinish(a);
LockReleaseGlobalRecursive();

View file

@ -1,7 +1,7 @@
/* lockix.c: RECURSIVE LOCKS FOR POSIX SYSTEMS
*
* $Id$
* Copyright (c) 2001,2007 Ravenbrook Limited. See end of file for license.
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
*
* .posix: The implementation uses a POSIX interface, and should be reusable
* for many Unix-like operating systems.
@ -131,9 +131,9 @@ void (LockClaim)(Lock lock)
}
/* LockReleaseMPM -- release a lock (non-recursive) */
/* LockRelease -- release a lock (non-recursive) */
void (LockReleaseMPM)(Lock lock)
void (LockRelease)(Lock lock)
{
int res;
@ -239,13 +239,13 @@ void (LockClaimGlobal)(void)
void (LockReleaseGlobal)(void)
{
LockReleaseMPM(globalLock);
LockRelease(globalLock);
}
/* C. COPYRIGHT AND LICENSE
*
* Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
* All rights reserved. This is an open source license. Contact
* Ravenbrook for commercial licensing options.
*

View file

@ -1,7 +1,7 @@
/* lockli.c: RECURSIVE LOCKS FOR POSIX SYSTEMS
*
* $Id$
* Copyright (c) 2001-2013 Ravenbrook Limited. See end of file for license.
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
*
* .linux: This implementation currently just supports LinuxThreads
* (platform MPS_OS_LI), Single Unix i/f.
@ -145,9 +145,9 @@ void (LockClaim)(Lock lock)
}
/* LockReleaseMPM -- release a lock (non-recursive) */
/* LockRelease -- release a lock (non-recursive) */
void (LockReleaseMPM)(Lock lock)
void (LockRelease)(Lock lock)
{
int res;
@ -253,13 +253,13 @@ void (LockClaimGlobal)(void)
void (LockReleaseGlobal)(void)
{
LockReleaseMPM(globalLock);
LockRelease(globalLock);
}
/* C. COPYRIGHT AND LICENSE
*
* Copyright (C) 2001-2013 Ravenbrook Limited <http://www.ravenbrook.com/>.
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
* All rights reserved. This is an open source license. Contact
* Ravenbrook for commercial licensing options.
*

View file

@ -49,7 +49,7 @@ static void inc(unsigned long i)
tmp = shared;
shared = tmp+1;
i--;
LockReleaseMPM(lock);
LockRelease(lock);
}
}

View file

@ -1,7 +1,7 @@
/* lockw3.c: RECURSIVE LOCKS IN WIN32
*
* $Id$
* Copyright (c) 2001 Ravenbrook Limited. See end of file for license.
* Copyright (c) 2001-2014 Ravenbrook Limited. See end of file for license.
*
* .design: These are implemented using critical sections.
* See the section titled "Synchronization functions" in the Groups
@ -79,7 +79,7 @@ void (LockClaim)(Lock lock)
lock->claims = 1;
}
void (LockReleaseMPM)(Lock lock)
void (LockRelease)(Lock lock)
{
AVERT(Lock, lock);
AVER(lock->claims == 1); /* The lock should only be held once */
@ -152,13 +152,13 @@ void (LockClaimGlobal)(void)
void (LockReleaseGlobal)(void)
{
AVER(globalLockInit);
LockReleaseMPM(globalLock);
LockRelease(globalLock);
}
/* C. COPYRIGHT AND LICENSE
*
* Copyright (C) 2001-2002 Ravenbrook Limited <http://www.ravenbrook.com/>.
* Copyright (C) 2001-2014 Ravenbrook Limited <http://www.ravenbrook.com/>.
* All rights reserved. This is an open source license. Contact
* Ravenbrook for commercial licensing options.
*

View file

@ -6,7 +6,7 @@
* .purpose: Simple interface to threads that makes it possible to
* write test cases that are portable between Windows (using the
* implementation in testthrw3.c) and Unix (using the implementation
* in testthrix.c).
* in testthrix.c). See <design/testthr/>.
*/
#ifndef testthr_h

View file

@ -116,7 +116,7 @@ Before finalisation the lock must not beowned by any thread.
Claims ownership of a lock that was previously not held by current
thread.
``void LockReleaseMPM(Lock lock)``
``void LockRelease(Lock lock)``
Releases ownership of a lock that is currently owned.