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 | 94aa9a4a34d52191eba9a4cf51d7c9e66d337dba (patch) | |
tree | 3334d48b3de792072bd7484d71aaf968f11cfef8 /Python/thread.c | |
parent | 6b6c7900480e515b89368416f4669798e606edfd (diff) | |
download | cpython-94aa9a4a34d52191eba9a4cf51d7c9e66d337dba.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; |