Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
90f3ab40
提交
90f3ab40
authored
9月 27, 2012
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix thread priority code, this has never worked until today
上级
c7283aaa
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
10 行增加
和
13 行删除
+10
-13
.update
libs/apr/.update
+1
-1
apr_arch_threadproc.h
libs/apr/include/arch/unix/apr_arch_threadproc.h
+1
-0
thread.c
libs/apr/threadproc/unix/thread.c
+5
-0
switch_apr.c
src/switch_apr.c
+3
-12
没有找到文件。
libs/apr/.update
浏览文件 @
90f3ab40
Mon Sep 27 13:15:54 CDT 2010
Thu Sep 27 13:36:14 CDT 2012
libs/apr/include/arch/unix/apr_arch_threadproc.h
浏览文件 @
90f3ab40
...
@@ -60,6 +60,7 @@ struct apr_thread_t {
...
@@ -60,6 +60,7 @@ struct apr_thread_t {
struct
apr_threadattr_t
{
struct
apr_threadattr_t
{
apr_pool_t
*
pool
;
apr_pool_t
*
pool
;
pthread_attr_t
attr
;
pthread_attr_t
attr
;
int
priority
;
};
};
struct
apr_threadkey_t
{
struct
apr_threadkey_t
{
...
...
libs/apr/threadproc/unix/thread.c
浏览文件 @
90f3ab40
...
@@ -174,6 +174,11 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
...
@@ -174,6 +174,11 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
}
}
if
((
stat
=
pthread_create
((
*
new
)
->
td
,
temp
,
dummy_worker
,
(
*
new
)))
==
0
)
{
if
((
stat
=
pthread_create
((
*
new
)
->
td
,
temp
,
dummy_worker
,
(
*
new
)))
==
0
)
{
if
(
attr
->
priority
)
{
pthread_t
*
thread
=
(
*
new
)
->
td
;
pthread_setschedprio
(
*
thread
,
attr
->
priority
);
}
return
APR_SUCCESS
;
return
APR_SUCCESS
;
}
}
else
{
else
{
...
...
src/switch_apr.c
浏览文件 @
90f3ab40
...
@@ -633,25 +633,16 @@ SWITCH_DECLARE(switch_status_t) switch_threadattr_stacksize_set(switch_threadatt
...
@@ -633,25 +633,16 @@ SWITCH_DECLARE(switch_status_t) switch_threadattr_stacksize_set(switch_threadatt
struct
apr_threadattr_t
{
struct
apr_threadattr_t
{
apr_pool_t
*
pool
;
apr_pool_t
*
pool
;
pthread_attr_t
attr
;
pthread_attr_t
attr
;
int
priority
;
};
};
#endif
#endif
SWITCH_DECLARE
(
switch_status_t
)
switch_threadattr_priority_increase
(
switch_threadattr_t
*
attr
)
SWITCH_DECLARE
(
switch_status_t
)
switch_threadattr_priority_increase
(
switch_threadattr_t
*
attr
)
{
{
int
stat
=
0
;
#ifndef WIN32
#ifndef WIN32
struct
sched_param
param
;
attr
->
priority
=
10
;
struct
apr_threadattr_t
*
myattr
=
attr
;
pthread_attr_getschedparam
(
&
myattr
->
attr
,
&
param
);
param
.
sched_priority
=
1
;
stat
=
pthread_attr_setschedparam
(
&
myattr
->
attr
,
&
param
);
if
(
stat
==
0
)
{
return
SWITCH_STATUS_SUCCESS
;
}
#endif
#endif
return
stat
;
return
SWITCH_STATUS_SUCCESS
;
}
}
static
char
TT_KEY
[]
=
"1"
;
static
char
TT_KEY
[]
=
"1"
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论