cpython-extension.git
9 years agoCOPYING: Everything I've done is CC0 master
W. Trevor King [Wed, 17 Apr 2013 16:23:09 +0000 (12:23 -0400)]
COPYING: Everything I've done is CC0

I imagine the examples I copied from the Python docs are under the
PSF-2, since that's the most recent license listed in Python 3.3.0's
LICENSE file.  That said, I think the chunks copied are short enough
to qualify as fair use.

9 years agoREADME.rst: Add a symlink for GitHub rendering.
W. Trevor King [Wed, 17 Apr 2013 16:19:41 +0000 (12:19 -0400)]
README.rst: Add a symlink for GitHub rendering.

9 years agoREADME: Explain what this test is for and how it works
W. Trevor King [Wed, 17 Apr 2013 16:18:39 +0000 (12:18 -0400)]
README: Explain what this test is for and how it works

9 years agograb-cores.py: Use threading.Thread to call spam.busy
W. Trevor King [Wed, 17 Apr 2013 16:15:49 +0000 (12:15 -0400)]
grab-cores.py: Use threading.Thread to call spam.busy

Usually Python threads can only use one core at a time due to the
Python global interpreter lock.  This script allows us to see if
dropping the GIL with Py_BEGIN_ALLOW_THREADS allows us to use multiple
cores simultaneously.

9 years agospammify.c: Require a certain count instead of elapsed time
W. Trevor King [Wed, 17 Apr 2013 16:07:19 +0000 (12:07 -0400)]
spammify.c: Require a certain count instead of elapsed time

Increasing the number of threads time sharing on the same core does
not increase total execution time if the threads are only checking for
elapsed time.  We need them to actually *do* something.

9 years agospammify.c: Convert spam.system to spam.busy for a GIL-less wait
W. Trevor King [Wed, 17 Apr 2013 15:58:21 +0000 (11:58 -0400)]
spammify.c: Convert spam.system to spam.busy for a GIL-less wait

I want to see if GIL-dropping commands will use several cores.

9 years agosetup.py: Oops, the module name is 'spam' not 'spammify'
W. Trevor King [Wed, 17 Apr 2013 15:45:11 +0000 (11:45 -0400)]
setup.py: Oops, the module name is 'spam' not 'spammify'

With the old version you get:

  ImportError: dynamic module does not define init function (PyInit_spammify)

9 years agospammify.c: Replace spam_doc with NULL
W. Trevor King [Wed, 17 Apr 2013 15:42:54 +0000 (11:42 -0400)]
spammify.c: Replace spam_doc with NULL

We're not interested in setting a module docstring here.

9 years agosetup.py: Add basic setup.py for a C extension
W. Trevor King [Wed, 17 Apr 2013 15:41:05 +0000 (11:41 -0400)]
setup.py: Add basic setup.py for a C extension

Tweaked from http://docs.python.org/3/extending/building.html#building

9 years agospammify.c: Add the basic extension code
W. Trevor King [Wed, 17 Apr 2013 15:39:29 +0000 (11:39 -0400)]
spammify.c: Add the basic extension code

From http://docs.python.org/3/extending/extending.html