mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Yield before reading from zaptel timing source under Solaris so that other threads get a chance to do things. (issue #7875 reported by bob)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@51512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -45,6 +45,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
#ifdef SOLARIS
|
||||||
|
#include <thread.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "asterisk.h"
|
#include "asterisk.h"
|
||||||
|
|
||||||
@@ -508,6 +511,9 @@ static void *monmp3thread(void *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (class->pseudofd > -1) {
|
if (class->pseudofd > -1) {
|
||||||
|
#ifdef SOLARIS
|
||||||
|
thr_yield();
|
||||||
|
#endif
|
||||||
/* Pause some amount of time */
|
/* Pause some amount of time */
|
||||||
res = read(class->pseudofd, buf, sizeof(buf));
|
res = read(class->pseudofd, buf, sizeof(buf));
|
||||||
pthread_testcancel();
|
pthread_testcancel();
|
||||||
|
Reference in New Issue
Block a user