unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Chris Vine <chris@cvine.freeserve.co.uk>
Cc: guile-devel@gnu.org
Subject: Re: wip-ports-refactor
Date: Thu, 12 May 2016 08:16:21 +0200	[thread overview]
Message-ID: <87shxnpzre.fsf@pobox.com> (raw)
In-Reply-To: <20160511114254.6b87c024@bother.homenet> (Chris Vine's message of "Wed, 11 May 2016 11:42:54 +0100")

On Wed 11 May 2016 12:42, Chris Vine <chris@cvine.freeserve.co.uk> writes:

> So you are saying that some parts of guile rely on the ordering
> guarantees of the x86 memory model (or something like it) with respect
> to atomic operations on some internal localised shared state?

Let's say you cons a fresh pair and pass it to another thread.  So first
Guile will allocate the pair then it will initialize the car and cdr
fields.  Does the other thread see the "car" and "cdr" values which the
first one set?

In Intel, yes.  But not all architectures are like that.  Storing a
value to the "car" of a pair might not imply any ordering with respect
to a read to that same memory location from another thread.  AFAIU
anyway.

> Looking at the pthread related stuff in libguile, it seems to be
> written by someone/people who know what they are doing.  Are you
> referring specifically to the guile VM, and if so is guile-2.2 likely
> to be more problematic than guile-2.0?

I think Guile 2.2 is likely to be better if only because the port
situation is better there, and also weak maps are thread-safe (because
they lock now).  Otherwise no significant change.

Andy



      reply	other threads:[~2016-05-12  6:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06 20:46 wip-ports-refactor Andy Wingo
2016-04-07  4:16 ` wip-ports-refactor Christopher Allan Webber
2016-04-12  8:52   ` wip-ports-refactor Andy Wingo
2016-04-13 14:27     ` wip-ports-refactor Christopher Allan Webber
2016-04-12  9:33 ` wip-ports-refactor Andy Wingo
2016-04-14 14:03 ` wip-ports-refactor Ludovic Courtès
2016-04-17  8:49   ` wip-ports-refactor Andy Wingo
2016-04-17 10:44     ` wip-ports-refactor Ludovic Courtès
2016-04-19  8:00       ` wip-ports-refactor Andy Wingo
2016-04-19 14:15         ` wip-ports-refactor Ludovic Courtès
2016-05-10 15:02     ` wip-ports-refactor Andy Wingo
2016-05-10 16:53       ` wip-ports-refactor Andy Wingo
2016-05-11 14:00       ` wip-ports-refactor Christopher Allan Webber
2016-05-11 14:23       ` wip-ports-refactor Ludovic Courtès
2016-05-12  8:15         ` wip-ports-refactor Andy Wingo
2016-04-24 11:05 ` wip-ports-refactor Chris Vine
2016-05-10 14:30   ` wip-ports-refactor Andy Wingo
2016-05-11 10:42     ` wip-ports-refactor Chris Vine
2016-05-12  6:16       ` Andy Wingo [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=87shxnpzre.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=chris@cvine.freeserve.co.uk \
    --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).