diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-09-02 11:22:01 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-09-02 11:22:01 +0200 |
commit | d31ae2c363cf92b62260e9513534c7c046a4315f (patch) | |
tree | e5cbafee5098d60b825aa5360dafe29499ad6e7c /libguile | |
parent | ac37b82d5bc0bc7fc5777b069a7f198622b6cbb7 (diff) | |
download | guile-d31ae2c363cf92b62260e9513534c7c046a4315f.tar.gz |
Avoid calls to `scm_current_thread' in `fat_mutex_unlock'.
* libguile/threads.c (fat_mutex_unlock): Use `t->handle' instead of
calling `scm_current_thread'.
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/threads.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/threads.c b/libguile/threads.c index 7c377d735..457b1903f 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -1381,7 +1381,7 @@ fat_mutex_unlock (SCM mutex, SCM cond, owner = m->owner; - if (!scm_is_eq (owner, scm_current_thread ())) + if (!scm_is_eq (owner, t->handle)) { if (m->level == 0) { @@ -1390,7 +1390,7 @@ fat_mutex_unlock (SCM mutex, SCM cond, scm_i_pthread_mutex_unlock (&m->lock); scm_misc_error (NULL, "mutex not locked", SCM_EOL); } - owner = scm_current_thread (); + owner = t->handle; } else if (!m->allow_external_unlock) { |