| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0344424 commit 9e8181b
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -111,7 +111,7 @@ | |||
| 111 | 111 | #define Py_file_input 257 | |
| 112 | 112 | #define Py_eval_input 258 | |
| 113 | 113 | ||
| 114 | - #ifdef _GNU_PTH | ||
| 114 | + #ifdef HAVE_PTH | ||
| 115 | 115 | /* GNU pth user-space thread support */ | |
| 116 | 116 | #include <pth.h> | |
| 117 | 117 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -62,6 +62,9 @@ | |||
| 62 | 62 | handler ignores signals if getpid() isn't the same as in the main | |
| 63 | 63 | thread. XXX This is a hack. | |
| 64 | 64 | ||
| 65 | + GNU pth is a user-space threading library, and as such, all threads | ||
| 66 | + run within the same process. In this case, if the currently running | ||
| 67 | + thread is not the main_thread, send the signal to the main_thread. | ||
| 65 | 68 | */ | |
| 66 | 69 | ||
| 67 | 70 | #ifdef WITH_THREAD | |
@@ -109,6 +112,12 @@ static void | |||
| 109 | 112 | signal_handler(int sig_num) | |
| 110 | 113 | { | |
| 111 | 114 | #ifdef WITH_THREAD | |
| 115 | + #ifdef WITH_PTH | ||
| 116 | + if (PyThread_get_thread_ident() != main_thread) { | ||
| 117 | + pth_raise(*(pth_t *) main_thread, sig_num); | ||
| 118 | + return; | ||
| 119 | + } | ||
| 120 | + #endif | ||
| 112 | 121 | /* See NOTES section above */ | |
| 113 | 122 | if (getpid() == main_pid) { | |
| 114 | 123 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -109,13 +109,14 @@ void PyThread_init_thread(void) | |||
| 109 | 109 | #include "thread_lwp.h" | |
| 110 | 110 | #endif | |
| 111 | 111 | ||
| 112 | - #ifdef _GNU_PTH | ||
| 112 | + #ifdef HAVE_PTH | ||
| 113 | 113 | #include "thread_pth.h" | |
| 114 | - #else | ||
| 114 | + #undef _POSIX_THREADS | ||
| 115 | + #endif | ||
| 116 | + | ||
| 115 | 117 | #ifdef _POSIX_THREADS | |
| 116 | 118 | #include "thread_pthread.h" | |
| 117 | 119 | #endif | |
| 118 | - #endif | ||
| 119 | 120 | ||
| 120 | 121 | #ifdef C_THREADS | |
| 121 | 122 | #include "thread_cthread.h" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,9 +35,6 @@ | |||
| 35 | 35 | This is the case on Motorola V4 (R40V4.2) */ | |
| 36 | 36 | #undef GETTIMEOFDAY_NO_TZ | |
| 37 | 37 | ||
| 38 | - /* Define if you have GNU PTH threads */ | ||
| 39 | - #undef _GNU_PTH | ||
| 40 | - | ||
| 41 | 38 | /* Define this if your time.h defines altzone */ | |
| 42 | 39 | #undef HAVE_ALTZONE | |
| 43 | 40 | ||
@@ -65,6 +62,9 @@ | |||
| 65 | 62 | /* Define if your compiler supports function prototypes */ | |
| 66 | 63 | #undef HAVE_PROTOTYPES | |
| 67 | 64 | ||
| 65 | + /* Define if you have GNU PTH threads */ | ||
| 66 | + #undef HAVE_PTH | ||
| 67 | + | ||
| 68 | 68 | /* Define if your compiler supports variable length function prototypes | |
| 69 | 69 | (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */ | |
| 70 | 70 | #undef HAVE_STDARG_PROTOTYPES | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -103,9 +103,6 @@ | |||
| 103 | 103 | This is the case on Motorola V4 (R40V4.2) */ | |
| 104 | 104 | #undef GETTIMEOFDAY_NO_TZ | |
| 105 | 105 | ||
| 106 | - /* Define if you have GNU PTH threads */ | ||
| 107 | - #undef _GNU_PTH | ||
| 108 | - | ||
| 109 | 106 | /* Define this if your time.h defines altzone */ | |
| 110 | 107 | #undef HAVE_ALTZONE | |
| 111 | 108 | ||
@@ -130,6 +127,9 @@ | |||
| 130 | 127 | /* Define if your compiler supports function prototypes */ | |
| 131 | 128 | #undef HAVE_PROTOTYPES | |
| 132 | 129 | ||
| 130 | + /* Define if you have GNU PTH threads */ | ||
| 131 | + #undef HAVE_PTH | ||
| 132 | + | ||
| 133 | 133 | /* Define if your compiler supports variable length function prototypes | |
| 134 | 134 | (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */ | |
| 135 | 135 | #undef HAVE_STDARG_PROTOTYPES | |
@@ -272,6 +272,9 @@ | |||
| 272 | 272 | /* The number of bytes in a void *. */ | |
| 273 | 273 | #undef SIZEOF_VOID_P | |
| 274 | 274 | ||
| 275 | + /* Define if you have the _getpty function. */ | ||
| 276 | + #undef HAVE__GETPTY | ||
| 277 | + | ||
| 275 | 278 | /* Define if you have the alarm function. */ | |
| 276 | 279 | #undef HAVE_ALARM | |
| 277 | 280 | ||
@@ -359,9 +362,6 @@ | |||
| 359 | 362 | /* Define if you have the getpid function. */ | |
| 360 | 363 | #undef HAVE_GETPID | |
| 361 | 364 | ||
| 362 | - /* Define if you have the _getpty function. */ | ||
| 363 | - #undef HAVE__GETPTY | ||
| 364 | - | ||
| 365 | 365 | /* Define if you have the getpwent function. */ | |
| 366 | 366 | #undef HAVE_GETPWENT | |
| 367 | 367 | ||
@@ -521,14 +521,14 @@ | |||
| 521 | 521 | /* Define if you have the waitpid function. */ | |
| 522 | 522 | #undef HAVE_WAITPID | |
| 523 | 523 | ||
| 524 | - /* Define if you have the <db_185.h> header file. */ | ||
| 525 | - #undef HAVE_DB_185_H | ||
| 524 | + /* Define if you have the <db.h> header file. */ | ||
| 525 | + #undef HAVE_DB_H | ||
| 526 | 526 | ||
| 527 | 527 | /* Define if you have the <db1/ndbm.h> header file. */ | |
| 528 | 528 | #undef HAVE_DB1_NDBM_H | |
| 529 | 529 | ||
| 530 | - /* Define if you have the <db.h> header file. */ | ||
| 531 | - #undef HAVE_DB_H | ||
| 530 | + /* Define if you have the <db_185.h> header file. */ | ||
| 531 | + #undef HAVE_DB_185_H | ||
| 532 | 532 | ||
| 533 | 533 | /* Define if you have the <dirent.h> header file. */ | |
| 534 | 534 | #undef HAVE_DIRENT_H | |
| Back | FazBrowse Home | New Git URL |
0 commit comments