Back to index

python3.2  3.2.2
Classes | Defines | Typedefs | Functions | Variables
multiprocessing.h File Reference
#include "Python.h"
#include "structmember.h"
#include "pythread.h"
#include <fcntl.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <arpa/inet.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ConnectionObject

Defines

#define PY_SSIZE_T_CLEAN
#define HANDLE   int
#define SOCKET   int
#define BOOL   int
#define UINT32   uint32_t
#define INT32   int32_t
#define TRUE   1
#define FALSE   0
#define INVALID_HANDLE_VALUE   (-1)
#define SEM_VALUE_MAX   INT_MAX
#define PY_SSIZE_T_MAX   INT_MAX
#define PY_SSIZE_T_MIN   INT_MIN
#define F_PY_SSIZE_T   "i"
#define PyInt_FromSsize_t(n)   PyInt_FromLong((long)n)
#define F_POINTER   "k"
#define T_POINTER   T_ULONG
#define F_HANDLE   "i"
#define T_HANDLE   T_INT
#define F_SEM_HANDLE   F_POINTER
#define T_SEM_HANDLE   T_POINTER
#define F_RBUFFER   "s"
#define MP_SUCCESS   (0)
#define MP_STANDARD_ERROR   (-1)
#define MP_MEMORY_ERROR   (-1001)
#define MP_END_OF_FILE   (-1002)
#define MP_EARLY_END_OF_FILE   (-1003)
#define MP_BAD_MESSAGE_LENGTH   (-1004)
#define MP_SOCKET_ERROR   (-1005)
#define MP_EXCEPTION_HAS_BEEN_SET   (-1006)
#define PICKLE_MODULE   "cPickle"
#define FROM_FORMAT   PyString_FromFormat
#define PyVarObject_HEAD_INIT(type, size)   PyObject_HEAD_INIT(type) size,
#define Py_TPFLAGS_HAVE_WEAKREFS   0
#define CONNECTION_BUFFER_SIZE   1024
#define MAX_MESSAGE_LENGTH   0x7fffffff
#define MIN(x, y)   ((x) < (y) ? x : y)
#define MAX(x, y)   ((x) > (y) ? x : y)

Typedefs

typedef int Py_ssize_t

Functions

PyObjectmp_SetError (PyObject *Type, int num)

Variables

PyObjectpickle_dumps
PyObjectpickle_loads
PyObjectpickle_protocol
PyObjectBufferTooShort
PyTypeObject SemLockType
PyTypeObject ConnectionType
PyTypeObject PipeConnectionType
HANDLE sigint_event

Class Documentation

struct ConnectionObject

Definition at line 170 of file multiprocessing.h.

Collaboration diagram for ConnectionObject:
Class Members
char buffer
int flags
PyObject_HEAD HANDLE handle
PyObject * weakreflist

Define Documentation

#define BOOL   int

Definition at line 42 of file multiprocessing.h.

#define CONNECTION_BUFFER_SIZE   1024

Definition at line 168 of file multiprocessing.h.

#define F_HANDLE   "i"

Definition at line 102 of file multiprocessing.h.

#define F_POINTER   "k"

Definition at line 85 of file multiprocessing.h.

#define F_PY_SSIZE_T   "i"

Definition at line 74 of file multiprocessing.h.

#define F_RBUFFER   "s"

Definition at line 111 of file multiprocessing.h.

#define F_SEM_HANDLE   F_POINTER

Definition at line 104 of file multiprocessing.h.

#define FALSE   0

Definition at line 46 of file multiprocessing.h.

#define FROM_FORMAT   PyString_FromFormat

Definition at line 153 of file multiprocessing.h.

#define HANDLE   int

Definition at line 40 of file multiprocessing.h.

#define INT32   int32_t

Definition at line 44 of file multiprocessing.h.

#define INVALID_HANDLE_VALUE   (-1)

Definition at line 47 of file multiprocessing.h.

#define MAX (   x,
 
)    ((x) > (y) ? x : y)

Definition at line 186 of file multiprocessing.h.

#define MAX_MESSAGE_LENGTH   0x7fffffff

Definition at line 182 of file multiprocessing.h.

#define MIN (   x,
 
)    ((x) < (y) ? x : y)

Definition at line 185 of file multiprocessing.h.

#define MP_BAD_MESSAGE_LENGTH   (-1004)

Definition at line 123 of file multiprocessing.h.

#define MP_EARLY_END_OF_FILE   (-1003)

Definition at line 122 of file multiprocessing.h.

#define MP_END_OF_FILE   (-1002)

Definition at line 121 of file multiprocessing.h.

#define MP_EXCEPTION_HAS_BEEN_SET   (-1006)

Definition at line 125 of file multiprocessing.h.

#define MP_MEMORY_ERROR   (-1001)

Definition at line 120 of file multiprocessing.h.

#define MP_SOCKET_ERROR   (-1005)

Definition at line 124 of file multiprocessing.h.

#define MP_STANDARD_ERROR   (-1)

Definition at line 119 of file multiprocessing.h.

#define MP_SUCCESS   (0)

Definition at line 118 of file multiprocessing.h.

#define PICKLE_MODULE   "cPickle"

Definition at line 152 of file multiprocessing.h.

Definition at line 4 of file multiprocessing.h.

#define PY_SSIZE_T_MAX   INT_MAX

Definition at line 72 of file multiprocessing.h.

#define PY_SSIZE_T_MIN   INT_MIN

Definition at line 73 of file multiprocessing.h.

#define Py_TPFLAGS_HAVE_WEAKREFS   0

Definition at line 161 of file multiprocessing.h.

#define PyInt_FromSsize_t (   n)    PyInt_FromLong((long)n)

Definition at line 75 of file multiprocessing.h.

Definition at line 157 of file multiprocessing.h.

#define SEM_VALUE_MAX   INT_MAX

Definition at line 61 of file multiprocessing.h.

#define SOCKET   int

Definition at line 41 of file multiprocessing.h.

#define T_HANDLE   T_INT

Definition at line 103 of file multiprocessing.h.

#define T_POINTER   T_ULONG

Definition at line 86 of file multiprocessing.h.

#define T_SEM_HANDLE   T_POINTER

Definition at line 105 of file multiprocessing.h.

#define TRUE   1

Definition at line 45 of file multiprocessing.h.

#define UINT32   uint32_t

Definition at line 43 of file multiprocessing.h.


Typedef Documentation

typedef int Py_ssize_t

Definition at line 71 of file multiprocessing.h.


Function Documentation

PyObject* mp_SetError ( PyObject Type,
int  num 
)

Definition at line 27 of file multiprocessing.c.

{
    switch (num) {
#ifdef MS_WINDOWS
    case MP_STANDARD_ERROR:
        if (Type == NULL)
            Type = PyExc_WindowsError;
        PyErr_SetExcFromWindowsErr(Type, 0);
        break;
    case MP_SOCKET_ERROR:
        if (Type == NULL)
            Type = PyExc_WindowsError;
        PyErr_SetExcFromWindowsErr(Type, WSAGetLastError());
        break;
#else /* !MS_WINDOWS */
    case MP_STANDARD_ERROR:
    case MP_SOCKET_ERROR:
        if (Type == NULL)
            Type = PyExc_OSError;
        PyErr_SetFromErrno(Type);
        break;
#endif /* !MS_WINDOWS */
    case MP_MEMORY_ERROR:
        PyErr_NoMemory();
        break;
    case MP_END_OF_FILE:
        PyErr_SetNone(PyExc_EOFError);
        break;
    case MP_EARLY_END_OF_FILE:
        PyErr_SetString(PyExc_IOError,
                        "got end of file during message");
        break;
    case MP_BAD_MESSAGE_LENGTH:
        PyErr_SetString(PyExc_IOError, "bad message length");
        break;
    case MP_EXCEPTION_HAS_BEEN_SET:
        break;
    default:
        PyErr_Format(PyExc_RuntimeError,
                     "unkown error number %d", num);
    }
    return NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 20 of file multiprocessing.c.

Definition at line 19 of file multiprocessing.c.

Definition at line 19 of file multiprocessing.c.

Definition at line 19 of file multiprocessing.c.

Definition at line 586 of file semaphore.c.