线程优先级设置和获取
来源:互联网 发布:永久免费域名注册 编辑:程序博客网 时间:2024/06/04 17:54
pthread_attr_t thread_attr;
int thread_policy;
struct sched_param thread_param;
pthread_attr_init(&thread_attr);
pthread_attr_getschedpolicy(&thread_attr, &thread_policy);
pthread_attr_getschedparam(&thread_attr, &thread_param);
int max_priority = sched_get_priority_max(SCHED_OTHER);
av_log(NULL, AV_LOG_INFO,"%s, %d, write thread: Default policy is %s, priority is %d, max_priority=%d\n",
__FUNCTION__, __LINE__,
(thread_policy == SCHED_FIFO ? "FIFO"
: (thread_policy == SCHED_RR ? "RR"
: (thread_policy == SCHED_OTHER ? "OTHER"
: "unknown"))),
thread_param.sched_priority, max_priority);
int thread_policy;
struct sched_param thread_param;
pthread_attr_init(&thread_attr);
pthread_attr_getschedpolicy(&thread_attr, &thread_policy);
pthread_attr_getschedparam(&thread_attr, &thread_param);
int max_priority = sched_get_priority_max(SCHED_OTHER);
av_log(NULL, AV_LOG_INFO,"%s, %d, write thread: Default policy is %s, priority is %d, max_priority=%d\n",
__FUNCTION__, __LINE__,
(thread_policy == SCHED_FIFO ? "FIFO"
: (thread_policy == SCHED_RR ? "RR"
: (thread_policy == SCHED_OTHER ? "OTHER"
: "unknown"))),
thread_param.sched_priority, max_priority);
阅读全文
0 0
- 线程优先级设置和获取
- 多线程_线程调度及获取和设置线程优先级
- 多线程-线程调度及获取和设置线程优先级
- 进程优先级获取和设置
- 获取当前线程,线程id,设置优先级等函数接口
- java并发编程-1.2线程信息获取和设置(ID,名称、优先级、状态)
- Android线程的优先级和设置方法
- android 线程优先级设置
- 设置线程优先级
- java线程优先级设置
- android 设置线程优先级
- Linux:设置“线程”优先级
- 设置线程的优先级
- 线程优先级设置
- 设置线程的优先级
- linux线程优先级设置
- 线程优先级设置
- 设置线程优先级
- 1001. 害死人不偿命的(3n+1)猜想 (15)
- HDU-2017 多校训练赛3-补题
- Red and Black (dfs)【HDU】-1312
- 二阶贝塞尔曲线部分理解
- xftp连接不到其他主机
- 线程优先级设置和获取
- js动态给对象添加属性和值
- HDU-1874-Dijkstra算法
- dubbo在jdk1.8环境,部署tomcat问题
- JVM中三种内存区域
- 按位与、或、异或等运算方法
- 工具类之appSecret、timeStamp、nonce三个参数进行字典排序后SHA1加密,得到signature。
- mySQL超1G大数据导入解决方法
- 中国剩余定理