Last change
on this file was 391, checked in by dmik, 11 years ago |
python: Merge vendor 2.7.6 to trunk.
|
-
Property svn:eol-style
set to
native
|
File size:
1.4 KB
|
Rev | Line | |
---|
[2] | 1 |
|
---|
| 2 | /*
|
---|
| 3 | * Initialization.
|
---|
| 4 | */
|
---|
| 5 | static void
|
---|
| 6 | PyThread__init_thread(void)
|
---|
| 7 | {
|
---|
| 8 | }
|
---|
| 9 |
|
---|
| 10 | /*
|
---|
| 11 | * Thread support.
|
---|
| 12 | */
|
---|
| 13 | long
|
---|
| 14 | PyThread_start_new_thread(void (*func)(void *), void *arg)
|
---|
| 15 | {
|
---|
[391] | 16 | int success = 0; /* init not needed when SOLARIS_THREADS and */
|
---|
| 17 | /* C_THREADS implemented properly */
|
---|
[2] | 18 |
|
---|
[391] | 19 | dprintf(("PyThread_start_new_thread called\n"));
|
---|
| 20 | if (!initialized)
|
---|
| 21 | PyThread_init_thread();
|
---|
| 22 | return success < 0 ? -1 : 0;
|
---|
[2] | 23 | }
|
---|
| 24 |
|
---|
| 25 | long
|
---|
| 26 | PyThread_get_thread_ident(void)
|
---|
| 27 | {
|
---|
[391] | 28 | if (!initialized)
|
---|
| 29 | PyThread_init_thread();
|
---|
[2] | 30 | }
|
---|
| 31 |
|
---|
| 32 | void
|
---|
| 33 | PyThread_exit_thread(void)
|
---|
| 34 | {
|
---|
[391] | 35 | dprintf(("PyThread_exit_thread called\n"));
|
---|
| 36 | if (!initialized)
|
---|
| 37 | exit(0);
|
---|
[2] | 38 | }
|
---|
| 39 |
|
---|
| 40 | /*
|
---|
| 41 | * Lock support.
|
---|
| 42 | */
|
---|
| 43 | PyThread_type_lock
|
---|
| 44 | PyThread_allocate_lock(void)
|
---|
| 45 | {
|
---|
| 46 |
|
---|
[391] | 47 | dprintf(("PyThread_allocate_lock called\n"));
|
---|
| 48 | if (!initialized)
|
---|
| 49 | PyThread_init_thread();
|
---|
[2] | 50 |
|
---|
[391] | 51 | dprintf(("PyThread_allocate_lock() -> %p\n", lock));
|
---|
| 52 | return (PyThread_type_lock) lock;
|
---|
[2] | 53 | }
|
---|
| 54 |
|
---|
| 55 | void
|
---|
| 56 | PyThread_free_lock(PyThread_type_lock lock)
|
---|
| 57 | {
|
---|
[391] | 58 | dprintf(("PyThread_free_lock(%p) called\n", lock));
|
---|
[2] | 59 | }
|
---|
| 60 |
|
---|
| 61 | int
|
---|
| 62 | PyThread_acquire_lock(PyThread_type_lock lock, int waitflag)
|
---|
| 63 | {
|
---|
[391] | 64 | int success;
|
---|
[2] | 65 |
|
---|
[391] | 66 | dprintf(("PyThread_acquire_lock(%p, %d) called\n", lock, waitflag));
|
---|
| 67 | dprintf(("PyThread_acquire_lock(%p, %d) -> %d\n", lock, waitflag, success));
|
---|
| 68 | return success;
|
---|
[2] | 69 | }
|
---|
| 70 |
|
---|
| 71 | void
|
---|
| 72 | PyThread_release_lock(PyThread_type_lock lock)
|
---|
| 73 | {
|
---|
[391] | 74 | dprintf(("PyThread_release_lock(%p) called\n", lock));
|
---|
[2] | 75 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.