Copyright assignment

2009-03-25 Thread Daniel Kraft
Hi Ludovic and others, I got finally my copyright assignment processed! I will resubmit the patch I posted here some months ago when I find time to do so :) Yours, Daniel

Re: Locks and threads

2009-03-25 Thread Neil Jerram
Neil Jerram writes: > I've been running Linas's define-race test program, and hitting the > `throw from within critical section' quite a lot. > > We've already discussed this a couple of times: > http://www.mail-archive.com/bug-gu...@gnu.org/msg04613.html > http://www.mail-archive.com/guile-devel

Re: Locks and threads

2009-03-25 Thread Neil Jerram
Neil Jerram writes: >> Yes, it's an unrelated bug. All of the places that raise errors (and >> so exit non-locally) should exit the critical section first. > >> You're absolutely right. I'll leave this part out, and generate a >> separate patch for it. > > Here's the separate patch... > Subjec

Re: Locks and threads

2009-03-25 Thread Ludovic Courtès
Hi Neil, Neil Jerram writes: > Neil Jerram writes: >> Subject: [PATCH] Avoid throw from critical section, given invalid sigaction >> call >> >> * libguile/scmsigs.c (scm_sigaction_for_thread): Exit critical section >> before raising out-of-range error. >> >> * test-suite/Makefile.am (SCM_TE

Problems with and libguile/__scm.h on HP-UX/IA64

2009-03-25 Thread Albert Chin
libguile/__scm.h has: # if defined (__ia64__) /* For IA64, emulate the setjmp API using getcontext. */ # include # include typedef struct { ucontext_t ctx; int fresh; } jmp_buf; # define setjmp(JB) \ ( (JB).fresh = 1,

Re: Locks and threads

2009-03-25 Thread Neil Jerram
Linas Vepstas writes: > Well, once you identify the section that needs locking, > you'll want to use an rwlock instead of a mutex. The > rwlock (pthread_rwlock_rdlock) allows multiple > simultaneous readers. The writers, however, get > exclusive access. (pthread_rwlock_wrlock) I forgot to comm

Re: Locks and threads

2009-03-25 Thread Linas Vepstas
2009/3/25 Neil Jerram : > Linas Vepstas writes: > >> Well, once you identify the section that needs locking, >> you'll want to use an rwlock instead of a mutex.  The >> rwlock (pthread_rwlock_rdlock) allows multiple >> simultaneous readers.  The writers, however, get >> exclusive access. (pthread_

Re: Locks and threads

2009-03-25 Thread Neil Jerram
Neil Jerram writes: > Many thanks for your input on this. I'll go ahead with a mutex or > rwlock. First thing is to see if it fixes the problem; if it does, > I'll try to measure the performance impact. Attached are 3 patches relating to thread-safe define. #1 is Linas's test-define-race test

Re: Locks and threads

2009-03-25 Thread Linas Vepstas
2009/3/25 Neil Jerram : > #2 makes the symbols hash thread-safe, and it appears that this > completely fixes the define-race problem. I reviewed patch2 as best I could, but I'm cross-eyed cause its late at night, and I don't know guile internals well. So I'm not sure my review means much. Howev