ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.464 by root, Fri Mar 21 16:41:04 2014 UTC vs.
Revision 1.473 by root, Tue Sep 9 21:51:35 2014 UTC

43# include EV_CONFIG_H 43# include EV_CONFIG_H
44# else 44# else
45# include "config.h" 45# include "config.h"
46# endif 46# endif
47 47
48#if HAVE_FLOOR 48# if HAVE_FLOOR
49# ifndef EV_USE_FLOOR 49# ifndef EV_USE_FLOOR
50# define EV_USE_FLOOR 1 50# define EV_USE_FLOOR 1
51# endif
51# endif 52# endif
52#endif
53 53
54# if HAVE_CLOCK_SYSCALL 54# if HAVE_CLOCK_SYSCALL
55# ifndef EV_USE_CLOCK_SYSCALL 55# ifndef EV_USE_CLOCK_SYSCALL
56# define EV_USE_CLOCK_SYSCALL 1 56# define EV_USE_CLOCK_SYSCALL 1
57# ifndef EV_USE_REALTIME 57# ifndef EV_USE_REALTIME
256# else 256# else
257# define EV_USE_CLOCK_SYSCALL 0 257# define EV_USE_CLOCK_SYSCALL 0
258# endif 258# endif
259#endif 259#endif
260 260
261#if !(_POSIX_TIMERS > 0)
262# ifndef EV_USE_MONOTONIC
263# define EV_USE_MONOTONIC 0
264# endif
265# ifndef EV_USE_REALTIME
266# define EV_USE_REALTIME 0
267# endif
268#endif
269
261#ifndef EV_USE_MONOTONIC 270#ifndef EV_USE_MONOTONIC
262# if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0 271# if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0
263# define EV_USE_MONOTONIC EV_FEATURE_OS 272# define EV_USE_MONOTONIC EV_FEATURE_OS
264# else 273# else
265# define EV_USE_MONOTONIC 0 274# define EV_USE_MONOTONIC 0
506 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 515 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
507 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 516 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
508 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- 517 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH-
509 * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 518 * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
510 * OF THE POSSIBILITY OF SUCH DAMAGE. 519 * OF THE POSSIBILITY OF SUCH DAMAGE.
520 *
521 * Alternatively, the contents of this file may be used under the terms of
522 * the GNU General Public License ("GPL") version 2 or any later version,
523 * in which case the provisions of the GPL are applicable instead of
524 * the above. If you wish to allow the use of your version of this file
525 * only under the terms of the GPL and not to allow others to use your
526 * version of this file under the BSD license, indicate your decision
527 * by deleting the provisions above and replace them with the notice
528 * and other provisions required by the GPL. If you do not delete the
529 * provisions above, a recipient may use your version of this file under
530 * either the BSD or the GPL.
511 */ 531 */
512 532
513#ifndef ECB_H 533#ifndef ECB_H
514#define ECB_H 534#define ECB_H
515 535
794 #define ecb_decltype(x) __decltype(x) 814 #define ecb_decltype(x) __decltype(x)
795#elif ECB_GCC_VERSION(3,0) 815#elif ECB_GCC_VERSION(3,0)
796 #define ecb_decltype(x) __typeof(x) 816 #define ecb_decltype(x) __typeof(x)
797#endif 817#endif
798 818
819#if _MSC_VER >= 1300
820 #define ecb_deprecated __declspec(deprecated)
821#else
822 #define ecb_deprecated ecb_attribute ((__deprecated__))
823#endif
824
799#define ecb_noinline ecb_attribute ((__noinline__)) 825#define ecb_noinline ecb_attribute ((__noinline__))
800#define ecb_unused ecb_attribute ((__unused__)) 826#define ecb_unused ecb_attribute ((__unused__))
801#define ecb_const ecb_attribute ((__const__)) 827#define ecb_const ecb_attribute ((__const__))
802#define ecb_pure ecb_attribute ((__pure__)) 828#define ecb_pure ecb_attribute ((__pure__))
803 829
830/* http://msdn.microsoft.com/en-us/library/k6ktzx3s.aspx __declspec(noreturn) */
804#if ECB_C11 831#if ECB_C11
805 #define ecb_noreturn _Noreturn 832 #define ecb_noreturn _Noreturn
806#else 833#else
807 #define ecb_noreturn ecb_attribute ((__noreturn__)) 834 #define ecb_noreturn ecb_attribute ((__noreturn__))
808#endif 835#endif
1077/* the only noteworthy exception is ancient armle, which uses order 43218765 */ 1104/* the only noteworthy exception is ancient armle, which uses order 43218765 */
1078#if 0 \ 1105#if 0 \
1079 || __i386 || __i386__ \ 1106 || __i386 || __i386__ \
1080 || __amd64 || __amd64__ || __x86_64 || __x86_64__ \ 1107 || __amd64 || __amd64__ || __x86_64 || __x86_64__ \
1081 || __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \ 1108 || __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \
1082 || defined __arm__ && defined __ARM_EABI__ \
1083 || defined __s390__ || defined __s390x__ \ 1109 || defined __s390__ || defined __s390x__ \
1084 || defined __mips__ \ 1110 || defined __mips__ \
1085 || defined __alpha__ \ 1111 || defined __alpha__ \
1086 || defined __hppa__ \ 1112 || defined __hppa__ \
1087 || defined __ia64__ \ 1113 || defined __ia64__ \
1088 || defined __m68k__ \ 1114 || defined __m68k__ \
1089 || defined __m88k__ \ 1115 || defined __m88k__ \
1090 || defined __sh__ \ 1116 || defined __sh__ \
1091 || defined _M_IX86 || defined _M_AMD64 || defined _M_IA64 \ 1117 || defined _M_IX86 || defined _M_AMD64 || defined _M_IA64 \
1092 || (defined __arm__ && (defined __ARM_EABI__ || defined __EABI__ || defined __VFP_FP__ || defined _WIN32_WCE || defined __ANDROID__)) 1118 || (defined __arm__ && (defined __ARM_EABI__ || defined __EABI__ || defined __VFP_FP__ || defined _WIN32_WCE || defined __ANDROID__)) \
1119 || defined __aarch64__
1093 #define ECB_STDFP 1 1120 #define ECB_STDFP 1
1094 #include <string.h> /* for memcpy */ 1121 #include <string.h> /* for memcpy */
1095#else 1122#else
1096 #define ECB_STDFP 0 1123 #define ECB_STDFP 0
1097#endif 1124#endif
2586{ 2613{
2587 invoke_cb = invoke_pending_cb; 2614 invoke_cb = invoke_pending_cb;
2588} 2615}
2589 2616
2590void 2617void
2591ev_set_loop_release_cb (EV_P_ ev_loop_callback_nothrow release, ev_loop_callback_nothrow acquire) EV_THROW 2618ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV_P) EV_THROW) EV_THROW
2592{ 2619{
2593 release_cb = release; 2620 release_cb = release;
2594 acquire_cb = acquire; 2621 acquire_cb = acquire;
2595} 2622}
2596#endif 2623#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines