diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-07-16 20:35:28 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2010-07-16 20:35:28 +0000 |
commit | fe9e0e672e84a80a12a329ab82b1f0fd4a62d053 (patch) | |
tree | 66e2a97f0ee24f1cab1de8bcdcdc92baa90522ae /include/asterisk/sched.h | |
parent | 34bc4b1dcbd141abfc5649954f4d6c5e293ff840 (diff) |
Finally, a method that really fixes the assertions in chan_iax2.c related to cancelling lagid.
No, replacing usleep(1) with sched_yield() did not have an effect.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/sched.h')
-rw-r--r-- | include/asterisk/sched.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asterisk/sched.h b/include/asterisk/sched.h index 4f5fb4217..3904daf36 100644 --- a/include/asterisk/sched.h +++ b/include/asterisk/sched.h @@ -53,7 +53,7 @@ extern "C" { int _count = 0; \ int _sched_res = -1; \ while (id > -1 && (_sched_res = ast_sched_del(sched, id)) && ++_count < 10) \ - usleep(1); \ + usleep(1000); \ if (_count == 10 && option_debug > 2) { \ ast_log(LOG_DEBUG, "Unable to cancel schedule ID %d.\n", id); \ } \ @@ -70,7 +70,7 @@ extern "C" { do { \ int _count = 0; \ while (id > -1 && ast_sched_del(sched, id) && ++_count < 10) { \ - usleep(1); \ + usleep(1000); \ } \ if (_count == 10) \ ast_log(LOG_WARNING, "Unable to cancel schedule ID %d. This is probably a bug (%s: %s, line %d).\n", id, __FILE__, __PRETTY_FUNCTION__, __LINE__); \ @@ -89,7 +89,7 @@ extern "C" { int _sched_res = -1; \ while (id > -1 && (_sched_res = ast_sched_del(sched, id)) && ++_count < 10) { \ ast_mutex_unlock(lock); \ - usleep(1); \ + usleep(1000); \ ast_mutex_lock(lock); \ } \ if (_count == 10 && option_debug > 2) { \ @@ -103,7 +103,7 @@ extern "C" { do { \ int _count = 0; \ while (id > -1 && ast_sched_del(sched, id) && ++_count < 10) { \ - usleep(1); \ + usleep(1000); \ } \ if (_count == 10) \ ast_log(LOG_WARNING, "Unable to cancel schedule ID %d. This is probably a bug (%s: %s, line %d).\n", id, __FILE__, __PRETTY_FUNCTION__, __LINE__); \ @@ -122,7 +122,7 @@ extern "C" { int _count = 0, _res=1; \ void *_data = (void *)ast_sched_find_data(sched, id); \ while (id > -1 && (_res = ast_sched_del(sched, id) && _count++ < 10)) { \ - usleep(1); \ + usleep(1000); \ } \ if (!_res && _data) \ unrefcall; /* should ref _data! */ \ |