[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regexp_exec thread-unsafe

From: Paul Eggert
Subject: Re: regexp_exec thread-unsafe
Date: Wed, 29 May 2013 17:59:53 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

On 05/26/2013 03:11 PM, Paolo Bonzini wrote:
> Use the lock module instead.

Adding the lock module should work.  But this will require
some reengineering of Guile, so that Guile uses the lock module
rather than its own thread packaging.  Another possibility, which
might be a bit simpler, would be for Guile to pretend to
have the lock module.  It could do that by creating a file
glthread/lock.h that looks something like this:

  #include "../libguile/threads.h"
  #define gl_lock_define(class, name) class scm_i_pthread_mutex_t name;
  #define glthread_lock_init scm_i_pthread_mutex_init
  #define glthread_lock_destroy scm_i_pthread_mutex_destroy
  #define glthread_lock_lock scm_i_pthread_mutex_lock
  #define glthread_lock_unlock scm_i_pthread_mutex_lock_unlock

and by putting AC_DEFINE([GNULIB_LOCK]) into configure.ac.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]