… | |
… | |
515 | |
515 | |
516 | #ifndef ECB_H |
516 | #ifndef ECB_H |
517 | #define ECB_H |
517 | #define ECB_H |
518 | |
518 | |
519 | /* 16 bits major, 16 bits minor */ |
519 | /* 16 bits major, 16 bits minor */ |
520 | #define ECB_VERSION 0x00010002 |
520 | #define ECB_VERSION 0x00010003 |
521 | |
521 | |
522 | #ifdef _WIN32 |
522 | #ifdef _WIN32 |
523 | typedef signed char int8_t; |
523 | typedef signed char int8_t; |
524 | typedef unsigned char uint8_t; |
524 | typedef unsigned char uint8_t; |
525 | typedef signed short int16_t; |
525 | typedef signed short int16_t; |
… | |
… | |
546 | #include <inttypes.h> |
546 | #include <inttypes.h> |
547 | #if UINTMAX_MAX > 0xffffffffU |
547 | #if UINTMAX_MAX > 0xffffffffU |
548 | #define ECB_PTRSIZE 8 |
548 | #define ECB_PTRSIZE 8 |
549 | #else |
549 | #else |
550 | #define ECB_PTRSIZE 4 |
550 | #define ECB_PTRSIZE 4 |
|
|
551 | #endif |
|
|
552 | #endif |
|
|
553 | |
|
|
554 | /* work around x32 idiocy by defining proper macros */ |
|
|
555 | #if __x86_64 || _M_AMD64 |
|
|
556 | #if __ILP32 |
|
|
557 | #define ECB_AMD64_X32 1 |
|
|
558 | #else |
|
|
559 | #define ECB_AMD64 1 |
551 | #endif |
560 | #endif |
552 | #endif |
561 | #endif |
553 | |
562 | |
554 | /* many compilers define _GNUC_ to some versions but then only implement |
563 | /* many compilers define _GNUC_ to some versions but then only implement |
555 | * what their idiot authors think are the "more important" extensions, |
564 | * what their idiot authors think are the "more important" extensions, |
… | |
… | |
2239 | |
2248 | |
2240 | void |
2249 | void |
2241 | ev_feed_signal (int signum) EV_THROW |
2250 | ev_feed_signal (int signum) EV_THROW |
2242 | { |
2251 | { |
2243 | #if EV_MULTIPLICITY |
2252 | #if EV_MULTIPLICITY |
|
|
2253 | EV_P; |
2244 | ECB_MEMORY_FENCE_ACQUIRE; |
2254 | ECB_MEMORY_FENCE_ACQUIRE; |
2245 | EV_P = signals [signum - 1].loop; |
2255 | EV_A = signals [signum - 1].loop; |
2246 | |
2256 | |
2247 | if (!EV_A) |
2257 | if (!EV_A) |
2248 | return; |
2258 | return; |
2249 | #endif |
2259 | #endif |
2250 | |
2260 | |