summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-04-08 11:00:31 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-04-08 11:00:31 (GMT)
commit941893291a43008ebdc85eddd832de5edb07c2d1 (patch)
treecced58e423d2a0ed34c2b4ad533739690df98e21
parentde10f4054b6bd6dd286559d7bbaaff7364282fc7 (diff)
downloadcpython-941893291a43008ebdc85eddd832de5edb07c2d1.zip
cpython-941893291a43008ebdc85eddd832de5edb07c2d1.tar.gz
cpython-941893291a43008ebdc85eddd832de5edb07c2d1.tar.bz2
faulthandler: fix variable name, timeout_ms => timeout_us
The comment was already correct.
-rw-r--r--Modules/faulthandler.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index d2852f9..4edb16b 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -46,7 +46,7 @@ static struct {
static struct {
PyObject *file;
int fd;
- PY_TIMEOUT_T timeout_ms; /* timeout in microseconds */
+ PY_TIMEOUT_T timeout_us; /* timeout in microseconds */
int repeat;
PyInterpreterState *interp;
int exit;
@@ -413,7 +413,7 @@ faulthandler_thread(void *unused)
do {
st = PyThread_acquire_lock_timed(thread.cancel_event,
- thread.timeout_ms, 0);
+ thread.timeout_us, 0);
if (st == PY_LOCK_ACQUIRED) {
PyThread_release_lock(thread.cancel_event);
break;
@@ -457,7 +457,7 @@ faulthandler_dump_tracebacks_later(PyObject *self,
{
static char *kwlist[] = {"timeout", "repeat", "file", "exit", NULL};
double timeout;
- PY_TIMEOUT_T timeout_ms;
+ PY_TIMEOUT_T timeout_us;
int repeat = 0;
PyObject *file = NULL;
int fd;
@@ -473,8 +473,8 @@ faulthandler_dump_tracebacks_later(PyObject *self,
PyErr_SetString(PyExc_OverflowError, "timeout value is too large");
return NULL;
}
- timeout_ms = (PY_TIMEOUT_T)timeout;
- if (timeout_ms <= 0) {
+ timeout_us = (PY_TIMEOUT_T)timeout;
+ if (timeout_us <= 0) {
PyErr_SetString(PyExc_ValueError, "timeout must be greater than 0");
return NULL;
}
@@ -497,7 +497,7 @@ faulthandler_dump_tracebacks_later(PyObject *self,
Py_INCREF(file);
thread.file = file;
thread.fd = fd;
- thread.timeout_ms = timeout_ms;
+ thread.timeout_us = timeout_us;
thread.repeat = repeat;
thread.interp = tstate->interp;
thread.exit = exit;