diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/plugins.c | 3 | ||||
-rw-r--r-- | src/common/timer.c | 6 | ||||
-rw-r--r-- | src/common/timer.h | 4 |
3 files changed, 4 insertions, 9 deletions
diff --git a/src/common/plugins.c b/src/common/plugins.c index 76dfc5956..a2d4de73e 100644 --- a/src/common/plugins.c +++ b/src/common/plugins.c @@ -348,8 +348,7 @@ void plugins_init(void) export_symbol(addr_, SYMBOL_ADDR); // timers export_symbol(get_uptime, SYMBOL_GET_UPTIME); -// export_symbol(delete_timer, SYMBOL_DELETE_TIMER); - export_symbol(delete_timer_sub, SYMBOL_DELETE_TIMER); + export_symbol(delete_timer, SYMBOL_DELETE_TIMER); export_symbol(add_timer_func_list, SYMBOL_ADD_TIMER_FUNC_LIST); export_symbol(add_timer_interval, SYMBOL_ADD_TIMER_INTERVAL); export_symbol(add_timer, SYMBOL_ADD_TIMER); diff --git a/src/common/timer.c b/src/common/timer.c index 2a7dba676..15e50a05d 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -269,12 +269,10 @@ int add_timer_interval(unsigned int tick, TimerFunc func, int id, int data, int return tid; } -//int delete_timer(int id, TimerFunc func) -int delete_timer_sub(int id, TimerFunc func, const char* file, int line) +int delete_timer(int id, TimerFunc func) { if (id <= 0 || id >= timer_data_num) { - //ShowError("delete_timer error : no such timer %d (%08x(%s))\n", id, (int)func, search_timer_func_list(func)); - ShowError("delete_timer error : no such timer %d (%08x(%s)), invoked from %s:%d\n", id, (int)func, search_timer_func_list(func), file, line); + ShowError("delete_timer error : no such timer %d (%08x(%s))\n", id, (int)func, search_timer_func_list(func)); return -1; } if (timer_data[id].func != func) { diff --git a/src/common/timer.h b/src/common/timer.h index 24534de2a..b75cc6641 100644 --- a/src/common/timer.h +++ b/src/common/timer.h @@ -46,9 +46,7 @@ unsigned int gettick(void); int add_timer(unsigned int,TimerFunc f,int,int); int add_timer_interval(unsigned int tick, TimerFunc func, int id, int data, int interval); -//int delete_timer(int,TimerFunc f); -int delete_timer_sub(int,TimerFunc f, const char* file, int line); -#define delete_timer(id, f) delete_timer_sub(id, f, __FILE__, __LINE__) +int delete_timer(int,TimerFunc f); int addtick_timer(int tid,unsigned int tick); int settick_timer(int tid,unsigned int tick); |