Mercurial > cpython-lru_cache-weakref
comparison Python/thread_pthread.h @ 84205:f2e373ddfa00 3.3
Issue #18256: Compilation fix for recent AIX releases. Patch by David Edelsohn.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Tue, 18 Jun 2013 22:17:48 +0200 |
| parents | 470785a9fdd5 |
| children | 9af1905f20af |
comparison
equal
deleted
inserted
replaced
| 84202:7b6ae19dd116 | 84205:f2e373ddfa00 |
|---|---|
| 168 | 168 |
| 169 static void | 169 static void |
| 170 PyThread__init_thread(void) | 170 PyThread__init_thread(void) |
| 171 { | 171 { |
| 172 #if defined(_AIX) && defined(__GNUC__) | 172 #if defined(_AIX) && defined(__GNUC__) |
| 173 extern void pthread_init(void); | |
| 173 pthread_init(); | 174 pthread_init(); |
| 174 #endif | 175 #endif |
| 175 } | 176 } |
| 176 | 177 |
| 177 #endif /* !_HAVE_BSDI */ | 178 #endif /* !_HAVE_BSDI */ |
| 442 PyThread_free_lock(PyThread_type_lock lock) | 443 PyThread_free_lock(PyThread_type_lock lock) |
| 443 { | 444 { |
| 444 pthread_lock *thelock = (pthread_lock *)lock; | 445 pthread_lock *thelock = (pthread_lock *)lock; |
| 445 int status, error = 0; | 446 int status, error = 0; |
| 446 | 447 |
| 448 (void) error; /* silence unused-but-set-variable warning */ | |
| 447 dprintf(("PyThread_free_lock(%p) called\n", lock)); | 449 dprintf(("PyThread_free_lock(%p) called\n", lock)); |
| 448 | 450 |
| 449 /* some pthread-like implementations tie the mutex to the cond | 451 /* some pthread-like implementations tie the mutex to the cond |
| 450 * and must have the cond destroyed first. | 452 * and must have the cond destroyed first. |
| 451 */ | 453 */ |
| 528 PyThread_release_lock(PyThread_type_lock lock) | 530 PyThread_release_lock(PyThread_type_lock lock) |
| 529 { | 531 { |
| 530 pthread_lock *thelock = (pthread_lock *)lock; | 532 pthread_lock *thelock = (pthread_lock *)lock; |
| 531 int status, error = 0; | 533 int status, error = 0; |
| 532 | 534 |
| 535 (void) error; /* silence unused-but-set-variable warning */ | |
| 533 dprintf(("PyThread_release_lock(%p) called\n", lock)); | 536 dprintf(("PyThread_release_lock(%p) called\n", lock)); |
| 534 | 537 |
| 535 status = pthread_mutex_lock( &thelock->mut ); | 538 status = pthread_mutex_lock( &thelock->mut ); |
| 536 CHECK_STATUS("pthread_mutex_lock[3]"); | 539 CHECK_STATUS("pthread_mutex_lock[3]"); |
| 537 | 540 |
