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

Comparing libev/ev.c (file contents):
Revision 1.417 by root, Mon Apr 2 20:22:30 2012 UTC vs.
Revision 1.419 by root, Thu Apr 12 04:10:15 2012 UTC

1/* 1/*
2 * libev event processing core, watcher management 2 * libev event processing core, watcher management
3 * 3 *
4 * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libev@schmorp.de> 4 * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann <libev@schmorp.de>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without modifica- 7 * Redistribution and use in source and binary forms, with or without modifica-
8 * tion, are permitted provided that the following conditions are met: 8 * tion, are permitted provided that the following conditions are met:
9 * 9 *
579 #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore | #StoreStore") 579 #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore | #StoreStore")
580 #elif defined __s390__ || defined __s390x__ 580 #elif defined __s390__ || defined __s390x__
581 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("bcr 15,0" : : : "memory") 581 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("bcr 15,0" : : : "memory")
582 #elif defined __mips__ 582 #elif defined __mips__
583 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory") 583 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory")
584 #elif defined __alpha__
585 #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mb" : : : "memory")
584 #endif 586 #endif
585 #endif 587 #endif
586#endif 588#endif
587 589
588#ifndef ECB_MEMORY_FENCE 590#ifndef ECB_MEMORY_FENCE
2930 2932
2931 mn_now = ev_rt_now; 2933 mn_now = ev_rt_now;
2932 } 2934 }
2933} 2935}
2934 2936
2935void 2937int
2936ev_run (EV_P_ int flags) 2938ev_run (EV_P_ int flags)
2937{ 2939{
2938#if EV_FEATURE_API 2940#if EV_FEATURE_API
2939 ++loop_depth; 2941 ++loop_depth;
2940#endif 2942#endif
3097 loop_done = EVBREAK_CANCEL; 3099 loop_done = EVBREAK_CANCEL;
3098 3100
3099#if EV_FEATURE_API 3101#if EV_FEATURE_API
3100 --loop_depth; 3102 --loop_depth;
3101#endif 3103#endif
3104
3105 return activecnt;
3102} 3106}
3103 3107
3104void 3108void
3105ev_break (EV_P_ int how) 3109ev_break (EV_P_ int how)
3106{ 3110{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines