diff options
author | Guido van Rossum <guido@python.org> | 1998-12-21 19:32:43 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-12-21 19:32:43 (GMT) |
commit | 65d5b5763c6bbd99d2e2c6b219570f4562382ff0 (patch) | |
tree | 0a909da387c751fbfe8a90bb4a5a83f59f6c86a5 /Python/import.c | |
parent | 14f53a77579d411b7b3f491f45753315e40f1aa9 (diff) | |
download | cpython-65d5b5763c6bbd99d2e2c6b219570f4562382ff0.zip cpython-65d5b5763c6bbd99d2e2c6b219570f4562382ff0.tar.gz cpython-65d5b5763c6bbd99d2e2c6b219570f4562382ff0.tar.bz2 |
Thanks to Chris Herborth, the thread primitives now have proper Py*
names in the source code (they already had those for the linker,
through some smart macros; but the source still had the old, un-Py names).
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Python/import.c b/Python/import.c index 2707019..d35a8b7 100644 --- a/Python/import.c +++ b/Python/import.c @@ -121,25 +121,25 @@ _PyImport_Fini() #include "pythread.h" -static type_lock import_lock = 0; +static PyThread_type_lock import_lock = 0; static long import_lock_thread = -1; static int import_lock_level = 0; static void lock_import() { - long me = get_thread_ident(); + long me = PyThread_get_thread_ident(); if (me == -1) return; /* Too bad */ if (import_lock == NULL) - import_lock = allocate_lock(); + import_lock = PyThread_allocate_lock(); if (import_lock_thread == me) { import_lock_level++; return; } - if (import_lock_thread != -1 || !acquire_lock(import_lock, 0)) { + if (import_lock_thread != -1 || !PyThread_acquire_lock(import_lock, 0)) { PyThreadState *tstate = PyEval_SaveThread(); - acquire_lock(import_lock, 1); + PyThread_acquire_lock(import_lock, 1); PyEval_RestoreThread(tstate); } import_lock_thread = me; @@ -149,7 +149,7 @@ lock_import() static void unlock_import() { - long me = get_thread_ident(); + long me = PyThread_get_thread_ident(); if (me == -1) return; /* Too bad */ if (import_lock_thread != me) @@ -157,7 +157,7 @@ unlock_import() import_lock_level--; if (import_lock_level == 0) { import_lock_thread = -1; - release_lock(import_lock); + PyThread_release_lock(import_lock); } } |