[Python-Dev] cpython: expose sched.h functions (closes #12655)
Georg Brandl
g.brandl at gmx.net
Wed Aug 3 08:22:54 CEST 2011
Am 03.08.2011 00:30, schrieb benjamin.peterson:
> http://hg.python.org/cpython/rev/89e92e684b37
> changeset: 71704:89e92e684b37
> user: Benjamin Peterson <benjamin at python.org>
> date: Tue Aug 02 17:30:04 2011 -0500
> summary:
> expose sched.h functions (closes #12655)
> +static PyObject *
> +posix_sched_setaffinity(PyObject *self, PyObject *args)
> +{
> + pid_t pid;
> + Py_cpu_set *cpu_set;
> +
> + if (!PyArg_ParseTuple(args, _Py_PARSE_PID "O!|sched_setaffinity",
[...]
> +static PyObject *
> +posix_sched_getaffinity(PyObject *self, PyObject *args)
> +{
> + pid_t pid;
> + int ncpus;
> + Py_cpu_set *res;
> +
> + if (!PyArg_ParseTuple(args, _Py_PARSE_PID "i|sched_getaffinity",
These should be separated by ":", not "|", if I'm not mistaken?
Georg
More information about the Python-Dev
mailing list