diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-18 19:53:15 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-18 19:53:15 (GMT) |
commit | 009b811d678f36cf63be4fe26f3fbaa38aa0078e (patch) | |
tree | a24ddae0e641ac1bce8a5b33526bd05bd04d264c /Python | |
parent | 6c32585f677b71eb1206852d24f077f602780c85 (diff) | |
download | cpython-009b811d678f36cf63be4fe26f3fbaa38aa0078e.zip cpython-009b811d678f36cf63be4fe26f3fbaa38aa0078e.tar.gz cpython-009b811d678f36cf63be4fe26f3fbaa38aa0078e.tar.bz2 |
Removed unintentional trailing spaces in non-external and non-generated C files.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval_gil.h | 12 | ||||
-rw-r--r-- | Python/condvar.h | 6 | ||||
-rw-r--r-- | Python/pyfpe.c | 4 | ||||
-rw-r--r-- | Python/pystate.c | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/Python/ceval_gil.h b/Python/ceval_gil.h index 4db56b6..aafcbc2 100644 --- a/Python/ceval_gil.h +++ b/Python/ceval_gil.h @@ -31,7 +31,7 @@ static unsigned long gil_interval = DEFAULT_INTERVAL; variable (gil_drop_request) is used for that purpose, which is checked at every turn of the eval loop. That variable is set after a wait of `interval` microseconds on `gil_cond` has timed out. - + [Actually, another volatile boolean variable (eval_breaker) is used which ORs several conditions into one. Volatile booleans are sufficient as inter-thread signalling means since Python is run @@ -41,7 +41,7 @@ static unsigned long gil_interval = DEFAULT_INTERVAL; time (`interval` microseconds) before setting gil_drop_request. This encourages a defined switching period, but doesn't enforce it since opcodes can take an arbitrary time to execute. - + The `interval` value is available for the user to read and modify using the Python API `sys.{get,set}switchinterval()`. @@ -51,7 +51,7 @@ static unsigned long gil_interval = DEFAULT_INTERVAL; the value of gil_last_holder is changed to something else than its own thread state pointer, indicating that another thread was able to take the GIL. - + This is meant to prohibit the latency-adverse behaviour on multi-core machines where one thread would speculatively release the GIL, but still run and end up being the first to re-acquire it, making the "timeslices" @@ -186,7 +186,7 @@ static void drop_gil(PyThreadState *tstate) _Py_atomic_store_relaxed(&gil_locked, 0); COND_SIGNAL(gil_cond); MUTEX_UNLOCK(gil_mutex); - + #ifdef FORCE_SWITCHING if (_Py_atomic_load_relaxed(&gil_drop_request) && tstate != NULL) { MUTEX_LOCK(switch_mutex); @@ -215,7 +215,7 @@ static void take_gil(PyThreadState *tstate) if (!_Py_atomic_load_relaxed(&gil_locked)) goto _ready; - + while (_Py_atomic_load_relaxed(&gil_locked)) { int timed_out = 0; unsigned long saved_switchnum; @@ -254,7 +254,7 @@ _ready: if (tstate->async_exc != NULL) { _PyEval_SignalAsyncExc(); } - + MUTEX_UNLOCK(gil_mutex); errno = err; } diff --git a/Python/condvar.h b/Python/condvar.h index ef818c4..bb5b1b6 100644 --- a/Python/condvar.h +++ b/Python/condvar.h @@ -1,4 +1,4 @@ -/* +/* * Portable condition variable support for windows and pthreads. * Everything is inline, this header can be included where needed. * @@ -105,7 +105,7 @@ PyCOND_TIMEDWAIT(PyCOND_T *cond, PyMUTEX_T *mut, PY_LONG_LONG us) return 1; else if (r) return -1; - else + else return 0; } @@ -255,7 +255,7 @@ _PyCOND_WAIT_MS(PyCOND_T *cv, PyMUTEX_T *cs, DWORD ms) * a new thread comes along, it will pass right throuhgh, having * adjusted it to (waiting == 0 && sem.count == 0). */ - + if (wait == WAIT_FAILED) return -1; /* return 0 on success, 1 on timeout */ diff --git a/Python/pyfpe.c b/Python/pyfpe.c index 4b7f5ba..ab0ef83 100644 --- a/Python/pyfpe.c +++ b/Python/pyfpe.c @@ -1,6 +1,6 @@ #include "pyconfig.h" #include "pyfpe.h" -/* +/* * The signal handler for SIGFPE is actually declared in an external * module fpectl, or as preferred by the user. These variable * definitions are required in order to compile Python without @@ -13,7 +13,7 @@ jmp_buf PyFPE_jbuf; int PyFPE_counter = 0; #endif -/* Have this outside the above #ifdef, since some picky ANSI compilers issue a +/* Have this outside the above #ifdef, since some picky ANSI compilers issue a warning when compiling an empty file. */ double diff --git a/Python/pystate.c b/Python/pystate.c index ee1e469..926ef07 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -228,7 +228,7 @@ new_threadstate(PyInterpreterState *interp, int init) tstate->next->prev = tstate; interp->tstate_head = tstate; HEAD_UNLOCK(); - + #if defined _MSC_VER && _MSC_VER >= 1900 /* Issue #23524: Temporary fix to disable termination due to invalid parameters */ _set_thread_local_invalid_parameter_handler((_invalid_parameter_handler)_Py_silent_invalid_parameter_handler); |