1 /* src/threads/lockword.cpp - lockword implementation
4 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
6 This file is part of CACAO.
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2, or (at
11 your option) any later version.
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
31 #include "threads/lock.hpp"
35 * Inflate the lock of the given object. This may only be called by
36 * the owner of the monitor of the object.
38 * PRE-CONDITION: The current thread must be the owner of this
39 * object's monitor AND of the lock record's lock!
41 * @param lr The lock-record to install. The current thread must own
42 * the lock of this lock record!
44 void Lockword::inflate(lock_record_t* lr)
48 assert(get_fat_lock() == lr);
53 assert(get_thin_lock_without_count() == thread_get_current()->thinlock);
55 // Copy the count from the thinlock.
56 lr->count = get_thin_lock_count();
58 // DEBUGLOCKS(("[lock_inflate : lr=%p, t=%p, o=%p, o->lockword=%lx, count=%d]",
59 // lr, thread_get_current(), o, get_thin_lock(), lr->count));
61 // Install the lock-record in the lockword.
67 * These are local overrides for various environment variables in Emacs.
68 * Please do not remove this and leave it at the end of the file, where
69 * Emacs will automagically detect them.
70 * ---------------------------------------------------------------------
77 * vim:noexpandtab:sw=4:ts=4: