* [bug #27457] Threads, mutexes, and critical sections
@ 2009-09-15 23:33 Ludovic Courtès
2010-05-11 21:45 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2009-09-15 23:33 UTC (permalink / raw)
To: Ludovic Courtès, bug-guile
URL:
<http://savannah.gnu.org/bugs/?27457>
Summary: Threads, mutexes, and critical sections
Project: Guile
Submitted by: civodul
Submitted on: Tue 15 Sep 2009 11:33:00 PM GMT
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
With Guile 1.9.3, the test case below eventually leads to "throw from within
critical section" errors (that's on a dual-core).
#v+
(use-modules (srfi srfi-18))
(let loop ()
(display ".")
(let ((t (make-thread (lambda () #t) 'thread-join-3)))
(thread-start! t)
(false-if-exception (throw 'x)))
(loop))
#v-
First, it's worth noting that `scm_ithrow ()' and `scm_dynthrow ()', which
produce this kind of error, are sloppy. To be less sloppy, they should use a
memory barrier (as introduced by, e.g., GCC's `__sync_fetch_and_add ()'
built-in), just like `SCM_CRITICAL_SECTION_{START,END}'. But apparently
that's not enough.
Presumably, it would also help if the queue primitives in `threads.c' didn't
use the critical section macros.
Thanks,
Ludo'.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?27457>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* [bug #27457] Threads, mutexes, and critical sections
2009-09-15 23:33 [bug #27457] Threads, mutexes, and critical sections Ludovic Courtès
@ 2010-05-11 21:45 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2010-05-11 21:45 UTC (permalink / raw)
To: Ludovic Courtès, bug-guile
Update of bug #27457 (project guile):
Status: None => Wont Fix
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
I can't reproduce the problem with 1.9.10 where `throw' is now implemented in
Scheme, which scm_ithrow () simply invokes.
IOW, this bug is obsolete. :-)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?27457>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-11 21:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-15 23:33 [bug #27457] Threads, mutexes, and critical sections Ludovic Courtès
2010-05-11 21:45 ` Ludovic Courtès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).