[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Several questions.
From: |
Michael Livshin |
Subject: |
Re: Several questions. |
Date: |
20 Apr 2001 23:29:19 +0300 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Crater Lake) |
Marius Vollmer <address@hidden> writes:
> Dirk Herrmann <address@hidden> writes:
>
> > On 20 Apr 2001, Marius Vollmer wrote:
> >
> > > > * scm_smobs is a malloc'd array that gets resized for every new
> > > > smob. With preemptive threading, this will not work well: It would
> > > > be
> > > > necessary to guard every access to scm_smobs with a mutex.
> > >
> > > Does pthreads offer something like a atomic update for a pointer?
> > > With such a thing, we could atomically swap in the new smobtable.
> >
> > I don't think so. The problem does not depend on whether the pointer can
> > be updated atomically.
just a small point: while the POSIX spec doesn't guarantee (or specify
a way to get) memory coherence (i.e. atomic updates) in general, all
the interesting platforms update word-sized (and word-aligned, of
course) locations atomically. ISTR that Java counts on it.
this is from memory, though.
--
This code is a piece of crap! You have no honor!
-- Klingon Programmer
- Several questions., Dirk Herrmann, 2001/04/20
- Re: Several questions., Marius Vollmer, 2001/04/20
- Re: Several questions., Dirk Herrmann, 2001/04/20
- Re: Several questions., Neil Jerram, 2001/04/21
- Re: Several questions., Dirk Herrmann, 2001/04/21
- Re: Several questions., Marius Vollmer, 2001/04/21
- Re: Several questions., Dirk Herrmann, 2001/04/22
- Handling deprecated features, Marius Vollmer, 2001/04/29
- Re: Handling deprecated features, Neil Jerram, 2001/04/29
- Re: Several questions., Marius Vollmer, 2001/04/21