From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: multi-threading
Date: Sat, 11 Oct 2008 18:55:12 +0200 [thread overview]
Message-ID: <87tzbjvzpr.fsf@gnu.org> (raw)
In-Reply-To: 49dd78620810101440m355483e9va2b618bb11666922@mail.gmail.com
Hi,
"Neil Jerram" <neiljerram@googlemail.com> writes:
> On 06/10/2008, Ludovic Courtès <ludo@gnu.org> wrote:
>>
>> Surely. AFAIUI, the reason why Debian doesn't do this is that, (1) part
>> of the test suite used to fail --with-threads, and (2) when the problem
>> eventually disappeared, people noticed that Guile --with and
>> --without-threads aren't ABI-compatible, so Debian has to stick to
>> --without-threads for 1.8's lifetime.
>
> Do you know the details of the ABI compatibility issue?
We'd have to dig the archive for additional details, but a typical
example is `scm_cell ()', which is inlined and refers to
`scm_i_freelist', which is either a `pthread_key_t' or an
`scm_i_pthread_key_t' from "null-threads.h", depending on whether we're
using threads; in one case `pthread_getspecific ()' is used, in the
other the value is directly accessed.
> The problem is that there's no 'hook' to associate this doc with. We
> can't say 'if you do so-and-so, take care to note that only the main
> thread can use Guile', because there is no so-and-so - because
> --without-threads is the default.
The default is `--with-threads'. But yes, I don't know where this could
fit into the doc.
> So I think we should do that - but preferably after solving the ABI issue first.
I'm not sure we can really "solve it".
We could solve it by not having any macro or inline function referring
to thread-local storage, but there may be a performance penalty[*].
We'd also need to not have any public structure containing
`scm_i_pthread_*' objects, in particular the `scm_i_thread' structure.
Thanks,
Ludo'.
[*] BTW, we may eventually want to use the compiler's TLS support, via
the `__thread' storage qualifier, which would be yet another barrier
against.
prev parent reply other threads:[~2008-10-11 16:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <486FF23B.6000301@pp2.inet.fi>
[not found] ` <49dd78620807051534s3270381bs686248f7def631ea@mail.gmail.com>
[not found] ` <1215326411.15674.4.camel@henux>
2008-10-03 22:29 ` multi-threading Neil Jerram
2008-10-04 14:15 ` multi-threading David Séverin
2008-10-06 22:42 ` multi-threading Ludovic Courtès
2008-10-10 21:40 ` multi-threading Neil Jerram
2008-10-11 16:55 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tzbjvzpr.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).