guile-devel
[Top][All Lists]
Advanced

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

Re: C level mutices and condition variables


From: Neil Jerram
Subject: Re: C level mutices and condition variables
Date: 26 Oct 2002 22:28:33 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Marius" == Marius Vollmer <address@hidden> writes:

    Marius> Hi,
    Marius> currently, we support the scm_t_mutex and scm_t_cond types, along 
with
    Marius> some functions.  You can declare a variable of type scm_t_mutex and
    Marius> initialize it with scm_mute_init, for example.

    Marius> This makes it hard to have SCM data in a scm_t_mutex since you have 
to
    Marius> protect it without the help from the user of the mutex.  Also, this 
is
    Marius> not 'astract' enough when we make thread package support a run-time
    Marius> option (which we should).

    Marius> Dirk did some work in this direction in the 
dirk-thread-factorization
    Marius> branch.  I propose something simpler:

    Marius> Let's just remove C level support for mutex and condition variable
    Marius> objects and tell them to use the Scheme level mutices, which are 
also
    Marius> available to C.  (With deprecation.)

    Marius> Ok?

I don't understand, I'm afraid.

- Why would you want "to have SCM data in a scm_t_mutex"? - isn't the
  data that you are protecting access to normally a separate variable
  (or set of variables) from the mutex itself?

- What do you mean by not abstract enough?

- In "tell them to use the Scheme level mutices", who is "them", and
  would it be possible for them to use Scheme mutexes from C code, or
  are you saying that people who need mutexes must code in Scheme?

Regards,
        Neil





reply via email to

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