guile-devel
[Top][All Lists]
Advanced

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

Cooperative POSIX threads?


From: Marius Vollmer
Subject: Cooperative POSIX threads?
Date: 21 Oct 2002 17:46:25 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Hi,

I noticed that signal delivery does not really work when using coop
threads together with the LinuxThreads compatability workaround (i.e,
when configured --with-threads=coop and --enable-linuxthreads)

While pondering what to do, I thought about the following:

Let's make another thread suport option, "coop-pthreads" that will use
pthreads for implementing threads but will rig it so that all threads
that use Guile are executing cooperatively.

There will be new C functions that will bring a thread into Guile
land, and make it leave again.  While a thread is in Guile land, it
can call Guile functions, etc.  When it is outside, it can't.  Threads
created by Guile itself will start in Guile land.  scm_boot_guile and
scm_init_guile will do the right thing, but I'm not yure yet what that
is for scm_init_guile.

We will need these Guile entering and leaving functions anyway when we
want external threads to use Guile since we need to know about the
relevant stack segments.  Those functions can take care that only one
thread is in Guile land at the same time.

Later the coop restriction can be lifted, when Guile itself can
survive this.

Thoughts?

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405




reply via email to

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