[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for fields of `struct buffer'
From: |
Richard Stallman |
Subject: |
Re: Patch for fields of `struct buffer' |
Date: |
Tue, 01 Feb 2011 11:39:46 -0500 |
Stefan> AFAICT, none of what he did is done because of preemptive threading.
Stefan> IOW, I don't think you can do it much more simply, even if you
assume
Stefan> a cooperative threading model.
Yeah, you could. On a thread-switch, you could unwind all the old
thread's bindings, then restore the new thread's bindings.
This would let all the existing C code work without indirections or
macro trickery; the downsides are that you have to have user-space
control over thread switching, and thread switching becomes expensive.
That's exactly the implementation I have in mind. It means that
thread switching is slower, but the other approach slows down
execution within a thread.
With this approach, you pay for threads only when you use them.
With the other, you pay all the time.
If multi-core is used for the machines where each core is also as fast
as can be, pay-if-you-use-threads seems like the best choice.
--
Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org, www.gnu.org
- Re: Patch for fields of `struct buffer', (continued)
- Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/08
- Re: Patch for fields of `struct buffer', Helmut Eller, 2011/02/08
- Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/11
- Re: Patch for fields of `struct buffer', Helmut Eller, 2011/02/12
- Re: Patch for fields of `struct buffer', Stefan Monnier, 2011/02/08
Re: Patch for fields of `struct buffer', Richard Stallman, 2011/02/01
Re: Patch for fields of `struct buffer',
Richard Stallman <=
Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/01
Re: Patch for fields of `struct buffer', Andreas Schwab, 2011/02/01
Re: Patch for fields of `struct buffer', Tom Tromey, 2011/02/01