aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2022-05-09 16:03:46 -0700
committerGitHub <noreply@github.com>2022-05-09 16:03:46 -0700
commit6ed7c353b8ded48a9128413f35921ddc4e5b1065 (patch)
treeafc47815078dc4b9eb7bc1ca47b97be3ebabcaac /Python/thread_pthread.h
parent22bddc864d3cc04ed218beb3b706ff1790db836a (diff)
downloadcpython-6ed7c353b8ded48a9128413f35921ddc4e5b1065.tar.gz
cpython-6ed7c353b8ded48a9128413f35921ddc4e5b1065.zip
gh-88750: Remove the PYTHONTHREADDEBUG env var support. (#92509)
Remove the `PYTHONTHREADDEBUG` env var support. Remove no-op dprintf() macro calls.
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index c90ab25d484..2237018e9cb 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -252,7 +252,6 @@ PyThread_start_new_thread(void (*func)(void *), void *arg)
size_t tss;
#endif
- dprintf(("PyThread_start_new_thread called\n"));
if (!initialized)
PyThread_init_thread();
@@ -358,7 +357,6 @@ PyThread_get_thread_native_id(void)
void _Py_NO_RETURN
PyThread_exit_thread(void)
{
- dprintf(("PyThread_exit_thread called\n"));
if (!initialized)
exit(0);
pthread_exit(0);
@@ -376,7 +374,6 @@ PyThread_allocate_lock(void)
sem_t *lock;
int status, error = 0;
- dprintf(("PyThread_allocate_lock called\n"));
if (!initialized)
PyThread_init_thread();
@@ -392,7 +389,6 @@ PyThread_allocate_lock(void)
}
}
- dprintf(("PyThread_allocate_lock() -> %p\n", (void *)lock));
return (PyThread_type_lock)lock;
}
@@ -403,7 +399,6 @@ PyThread_free_lock(PyThread_type_lock lock)
int status, error = 0;
(void) error; /* silence unused-but-set-variable warning */
- dprintf(("PyThread_free_lock(%p) called\n", lock));
if (!thelock)
return;
@@ -435,8 +430,6 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds,
int status, error = 0;
(void) error; /* silence unused-but-set-variable warning */
- dprintf(("PyThread_acquire_lock_timed(%p, %lld, %d) called\n",
- lock, microseconds, intr_flag));
_PyTime_t timeout; // relative timeout
if (microseconds >= 0) {
@@ -544,8 +537,6 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds,
success = PY_LOCK_FAILURE;
}
- dprintf(("PyThread_acquire_lock_timed(%p, %lld, %d) -> %d\n",
- lock, microseconds, intr_flag, success));
return success;
}
@@ -556,7 +547,6 @@ PyThread_release_lock(PyThread_type_lock lock)
int status, error = 0;
(void) error; /* silence unused-but-set-variable warning */
- dprintf(("PyThread_release_lock(%p) called\n", lock));
status = sem_post(thelock);
CHECK_STATUS("sem_post");
@@ -573,7 +563,6 @@ PyThread_allocate_lock(void)
pthread_lock *lock;
int status, error = 0;
- dprintf(("PyThread_allocate_lock called\n"));
if (!initialized)
PyThread_init_thread();
@@ -599,7 +588,6 @@ PyThread_allocate_lock(void)
}
}
- dprintf(("PyThread_allocate_lock() -> %p\n", (void *)lock));
return (PyThread_type_lock) lock;
}
@@ -610,7 +598,6 @@ PyThread_free_lock(PyThread_type_lock lock)
int status, error = 0;
(void) error; /* silence unused-but-set-variable warning */
- dprintf(("PyThread_free_lock(%p) called\n", lock));
/* some pthread-like implementations tie the mutex to the cond
* and must have the cond destroyed first.
@@ -632,9 +619,6 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds,
pthread_lock *thelock = (pthread_lock *)lock;
int status, error = 0;
- dprintf(("PyThread_acquire_lock_timed(%p, %lld, %d) called\n",
- lock, microseconds, intr_flag));
-
if (microseconds == 0) {
status = pthread_mutex_trylock( &thelock->mut );
if (status != EBUSY)
@@ -694,8 +678,6 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds,
}
if (error) success = PY_LOCK_FAILURE;
- dprintf(("PyThread_acquire_lock_timed(%p, %lld, %d) -> %d\n",
- lock, microseconds, intr_flag, success));
return success;
}
@@ -706,7 +688,6 @@ PyThread_release_lock(PyThread_type_lock lock)
int status, error = 0;
(void) error; /* silence unused-but-set-variable warning */
- dprintf(("PyThread_release_lock(%p) called\n", lock));
status = pthread_mutex_lock( &thelock->mut );
CHECK_STATUS_PTHREAD("pthread_mutex_lock[3]");