9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Benjamin Purcell <benjapurcell@gmail.com>
To: 9front@9front.org
Subject: Spew's Concurrency Extension
Date: Fri, 1 Jul 2016 14:45:27 -0500	[thread overview]
Message-ID: <CAAsuYKdk==tKjQR5vvneQzz5NKj2KiSHHmdgA9kwjH6_WwGq+Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2432 bytes --]

Hello everybody!

Attached is a paper describing the concurrency extension I wrote.  The
paper can also be found in contrib at /n/contrib/spew/ccc/doc.  There
has already been a small amount of discussion in
irc.freenode.net!#cat-v about it that suggests this may be better
implemented as a preprocessor for C programs something like tbl for
troff or cinap_lenrek's mpc for C. But perhaps I am getting ahead of
myself as we can at least first consider this first attempt.

The whole functionality is contained the file cc/thread.c.  Calls are
made into this file in a few places.  cc/com.c calls into this file to
re-write trees that represent receives on channels and cc.y calls into
this file to construct the other kinds of thread operations.

The entire source can be found at /n/contrib/spew/ccc.  There are some
changes needed to the entry points into libthread.  That is why there
is a new copy of libthread in that directory.  None of the changes are
breaking changes for threaded programs written in the traditional way.
So far I have only implemented the libthread changes for amd64 and
386.

I have also started porting the system to use the concurrency
extensions instead of traditional calls into libthread.  Thus, I have
modified libdraw to return a "typed channel" for receiving mouse and
keyboard events and made some small modifications to some of the
headers to accommodate that as well.  If you are interested in trying
the extension out for yourself then I recommend installing those
libraries and headers.

My current plan is to finish porting the system in order to provide an
iso for further evaluation.  I am about halfway through porting acme
and can probably have the rest of the system done in a week if I have
enough spare time.

To see the extension in action look in /n/contrib/spew/ccc/tests for
functionality tests; in /n/contrib/spew/aplay for a gui audio player;
and in /n/contrib/spew/squint for an implementation of squinting at
power series.

As a final note, anything that does not use the concurrency extensions
will compile byte for byte the same.  The extension essentially
already functions as a preprocessor though because it is implemented
in the compiler it is able to call on the type checking already
provided by KenCC.

I'm sending this out for comments and criticisms. For the non plan 9 users
a copy of everything can be found at github.com/spewspew/ConcurrentC

Happy friday!
spew

[-- Attachment #2: ccc.pdf --]
[-- Type: application/pdf, Size: 45122 bytes --]

             reply	other threads:[~2016-07-01 19:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01 19:45 Benjamin Purcell [this message]
2016-07-02  0:57 ` [9front] " kokamoto
2016-07-02 12:07 ` cinap_lenrek

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAsuYKdk==tKjQR5vvneQzz5NKj2KiSHHmdgA9kwjH6_WwGq+Q@mail.gmail.com' \
    --to=benjapurcell@gmail.com \
    --cc=9front@9front.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 NNTP newsgroup(s).