pthread_setschedprio()函数详解!!!
pthread_setschedprio()
Set a thread's priority 用于设置现成的优先级
包含在头文件
#include <pthread.h>
用法:
int pthread_setschedprio( pthread_t thread,
int prio );
thread是你想要修改的线程的线程id;
prio 是你将要修改成的优先级
如果线程正在运行或运行,就绪队列中的位置对其的影响取决于修改的方向:
如果你提高优先级,线程成为优先级的就绪队列的尾部。
如果你不改变优先级,线程不会改变位置在就绪队列中。
如果你降低优先级,线程成为这个优先级就绪队列的头。
Returns:
- EOK Success.
- EINVAL The priority isn't valid for the scheduling policy of the specified thread.
- ENOTSUP The specified priority isn't supported.
- EPERM The calling thread doesn't have sufficient privileges to modify the specified thread's priority.
- ESRCH Invalid thread ID thread.
pthread_setschedprio()函数详解!!!的更多相关文章
- malloc 与 free函数详解<转载>
malloc和free函数详解 本文介绍malloc和free函数的内容. 在C中,对内存的管理是相当重要.下面开始介绍这两个函数: 一.malloc()和free()的基本概念以及基本用法: 1 ...
- NSSearchPathForDirectoriesInDomains函数详解
NSSearchPathForDirectoriesInDomains函数详解 #import "NSString+FilePath.h" @implementation ...
- JavaScript正则表达式详解(二)JavaScript中正则表达式函数详解
二.JavaScript中正则表达式函数详解(exec, test, match, replace, search, split) 1.使用正则表达式的方法去匹配查找字符串 1.1. exec方法详解 ...
- Linux C popen()函数详解
表头文件 #include<stdio.h> 定义函数 FILE * popen( const char * command,const char * type); 函数说明 popen( ...
- kzalloc 函数详解(转载)
用kzalloc申请内存的时候, 效果等同于先是用 kmalloc() 申请空间 , 然后用 memset() 来初始化 ,所有申请的元素都被初始化为 0. view plain /** * kzal ...
- Netsuite Formula > Oracle函数列表速查(PL/SQL单行函数和组函数详解).txt
PL/SQL单行函数和组函数详解 函数是一种有零个或多个参数并且有一个返回值的程序.在SQL中Oracle内建了一系列函数,这些函数都可被称为SQL或PL/SQL语句,函数主要分为两大类: 单行函数 ...
- jQuery.attr() 函数详解
一,jQuery.attr() 函数详解: http://www.365mini.com/page/jquery-attr.htm 二,jQuery函数attr()和prop()的区别: http: ...
- memset函数详解
语言中memset函数详解(2011-11-16 21:11:02)转载▼标签: 杂谈 分类: 工具相关 功 能: 将s所指向的某一块内存中的每个字节的内容全部设置为ch指定的ASCII值, 块的大 ...
- CreateFile函数详解
CreateFile函数详解 CreateFile The CreateFile function creates or opens the following objects and returns ...
随机推荐
- java学习之线程池的实现
package com.gh.threadpoor; import java.util.concurrent.ExecutorService; import java.util.concurrent. ...
- 循环之while
- kinit manual
Name kinit - obtain and cache Kerberos ticket-granting ticket Synopsis kinit [-V] [-l lifetime] [-s ...
- MFC下的日历表
// CalenderDlg.h : header file // #if !defined(AFX_CALENDERDLG_H__8DC8F113_2A47_45B8_8266_75CB406D68 ...
- activity变成Dialog的步骤
1.在布局文件上最外层最好使用RelativeLayout来布局,如果使用LinearLayout来布局的话,显示对话框的话,感觉会有点问题: 要在预览中看到框框,并且是match_parent的,而 ...
- iOS 日历控件
近期需要写一个交互有点DT的日历控件,具体交互细节这里略过不表. 不过再怎么复杂的控件,也是由基础的零配件组装起来的,这里最基本的就是日历控件. 先上图: 从图中可以看出日历控件就是由一个个小方块组成 ...
- grub2的/etc/default/grub文件详解
# If you change this file, run 'update-grub' afterwards to update# /boot/grub/grub.cfg.GRUB_DEFAULT= ...
- jsp字段判空
是对象吧String jsp的写法 <% if(str == null) { %> str is null <% } else { %> str not null <% ...
- 【HTTP 2】HTTP/2 协议概述(HTTP/2 Protocol Overview)
前情提要 在上一篇文章<[HTTP 2.0] 简介(Introduction)>中,我们简单介绍了 HTTP 2. 在本篇文章中,我们将会了解到 HTTP 2 协议概述部分的内容. HTT ...
- Android之Camera控制拍照
package com.android.xiong.cameratest; import java.io.File; import java.io.FileOutputStream; import j ...