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 | * |
… | |
… | |
2930 | |
2930 | |
2931 | mn_now = ev_rt_now; |
2931 | mn_now = ev_rt_now; |
2932 | } |
2932 | } |
2933 | } |
2933 | } |
2934 | |
2934 | |
2935 | void |
2935 | int |
2936 | ev_run (EV_P_ int flags) |
2936 | ev_run (EV_P_ int flags) |
2937 | { |
2937 | { |
2938 | #if EV_FEATURE_API |
2938 | #if EV_FEATURE_API |
2939 | ++loop_depth; |
2939 | ++loop_depth; |
2940 | #endif |
2940 | #endif |
… | |
… | |
3097 | loop_done = EVBREAK_CANCEL; |
3097 | loop_done = EVBREAK_CANCEL; |
3098 | |
3098 | |
3099 | #if EV_FEATURE_API |
3099 | #if EV_FEATURE_API |
3100 | --loop_depth; |
3100 | --loop_depth; |
3101 | #endif |
3101 | #endif |
|
|
3102 | |
|
|
3103 | return activecnt; |
3102 | } |
3104 | } |
3103 | |
3105 | |
3104 | void |
3106 | void |
3105 | ev_break (EV_P_ int how) |
3107 | ev_break (EV_P_ int how) |
3106 | { |
3108 | { |