diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-10-09 17:38:29 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-10-09 17:38:29 +0000 |
commit | 19717fa33a58be7da6663711de9496c99d629df9 (patch) | |
tree | 334471d635d966639230dd0a500c420e5ca6ad47 /Python/thread.c | |
parent | 4c1f5ecfe39d70bfdfb183436b00f601cfd54834 (diff) | |
download | cpython-git-19717fa33a58be7da6663711de9496c99d629df9.tar.gz |
Style guide & consistency changes. No semantic changes.
Diffstat (limited to 'Python/thread.c')
-rw-r--r-- | Python/thread.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Python/thread.c b/Python/thread.c index 0294365067..3985779c87 100644 --- a/Python/thread.c +++ b/Python/thread.c @@ -157,7 +157,8 @@ static struct key *keyhead = NULL; static int nkeys = 0; static PyThread_type_lock keymutex = NULL; -static struct key *find_key(int key, void *value) +static struct key * +find_key(int key, void *value) { struct key *p; long id = PyThread_get_thread_ident(); @@ -180,14 +181,16 @@ static struct key *find_key(int key, void *value) return p; } -int PyThread_create_key(void) +int +PyThread_create_key(void) { if (keymutex == NULL) keymutex = PyThread_allocate_lock(); return ++nkeys; } -void PyThread_delete_key(int key) +void +PyThread_delete_key(int key) { struct key *p, **q; PyThread_acquire_lock(keymutex, 1); @@ -204,7 +207,8 @@ void PyThread_delete_key(int key) PyThread_release_lock(keymutex); } -int PyThread_set_key_value(int key, void *value) +int +PyThread_set_key_value(int key, void *value) { struct key *p = find_key(key, value); if (p == NULL) @@ -213,7 +217,8 @@ int PyThread_set_key_value(int key, void *value) return 0; } -void *PyThread_get_key_value(int key) +void * +PyThread_get_key_value(int key) { struct key *p = find_key(key, NULL); if (p == NULL) @@ -222,7 +227,8 @@ void *PyThread_get_key_value(int key) return p->value; } -void PyThread_delete_key_value(int key) +void +PyThread_delete_key_value(int key) { long id = PyThread_get_thread_ident(); struct key *p, **q; |