Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_setschedprio(3c) [sunos man page]

pthread_setschedprio(3C)												  pthread_setschedprio(3C)

NAME
pthread_setschedprio - dynamic thread scheduling parameters access SYNOPSIS
cc -mt [ flag... ] file... -lpthread [ library... ] #include <pthread.h> int pthread_setschedprio(pthread_t thread, int prio); The pthread_setschedprio() function sets the scheduling priority for the thread whose thread ID is given by thread to the value given by prio. If the pthread_setschedprio() function fails, the scheduling priority of the target thread is not changed. If successful, the pthread_setschedprio() function returns 0; otherwise, an error number is returned to indicate the error. The pthread_setschedprio() function will fail if: EINVAL The value of prio is invalid for the scheduling policy of the specified thread. ENOTSUP An attempt was made to set the priority to an unsupported value. EPERM The caller does not have the appropriate permission to set the scheduling policy of the specified thread. The system does not allow the application to modify the priority to the value specified. ESRCH The value specified by thread does not refer to an existing thread. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ pthread_getschedparam(3C), attributes(5) 23 Mar 2005 pthread_setschedprio(3C)

Check Out this Related Man Page

PTHREAD_SETSCHEDPRIO(3) 				     Linux Programmer's Manual					   PTHREAD_SETSCHEDPRIO(3)

NAME
pthread_setschedprio - set scheduling priority of a thread SYNOPSIS
#include <pthread.h> pthread_setschedprio(pthread_t thread, int prio); Compile and link with -pthread. DESCRIPTION
The pthread_setschedprio() function sets the scheduling priority of the thread thread to the value specified in prio. (By contrast pthread_setschedparam(3) changes both the scheduling policy and priority of a thread.) RETURN VALUE
On success, this function returns 0; on error, it returns a nonzero error number. If pthread_setschedprio() fails, the scheduling priority of thread is not changed. ERRORS
EINVAL prio is not valid for the scheduling policy of the specified thread. EPERM The caller does not have appropriate privileges to set the specified priority. ESRCH No thread with the ID thread could be found. POSIX.1-2001 also documents an ENOTSUP ("attempt was made to set the priority to an unsupported value") error for pthread_setschedparam(3). VERSIONS
This function is available in glibc since version 2.3.4. CONFORMING TO
POSIX.1-2001. NOTES
For a description of the permissions required to, and the effect of, changing a thread's scheduling priority, and details of the permitted ranges for priorities in each scheduling policy, see sched_setscheduler(2). SEE ALSO
getrlimit(2), sched_get_priority_min(2), sched_setscheduler(2), pthread_attr_init(3), pthread_attr_setinheritsched(3), pthread_attr_setschedparam(3), pthread_attr_setschedpolicy(3), pthread_create(3), pthread_self(3), pthread_setschedparam(3), pthreads(7) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-11-06 PTHREAD_SETSCHEDPRIO(3)
Man Page

5 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Unable to open thread

I am unable to open the mimesender thread. I get the following message when clicking on https://www.unix.com/showthread.php?p=33233#post33233 : (2 Replies)
Discussion started by: dangral
2 Replies

2. Post Here to Contact Site Administrators and Moderators

Open any thread, get a zero-byte blank page

I've made the thread title as descriptive as possible since I don't know if the admins can open it. Well sure, now I can open THIS one. I'm getting it on any other thread I try in What's On Your Mind and High Level Programming. Okay, it's decided to make a liar of me now. It seems to be... (2 Replies)
Discussion started by: Corona688
2 Replies

3. Programming

pthread locking and unlocking.

When more than one thread is waiting for a locked mutex, which thread will be granted the lock first after it is released. In our application we want to implement FIFO thread scheduling policy i.e. Thread should get lock which one requested first for it. AIX have SCHED_FIFO thread scheduling... (1 Reply)
Discussion started by: mukind
1 Replies

4. Programming

C++ application development

I am very much flexible with c++. I want to make some application on Linux using c++. Which tool I can use? now what is the market value of C++ programming on linux field? (9 Replies)
Discussion started by: amisubha
9 Replies

5. Forum Support Area for Unregistered Users & Account Problems

My userid is weichanghe2000 But I have no any permission

Because I cannot continue replying to you in previous thread, I have to create a new thread, Please forgive me. My userid is weichanghe2000, I want to create a new thread in "Shell Programming and Scripting", But I cannot do any operation, Please help me solve this problem. I am looking... (3 Replies)
Discussion started by: Unregistered
3 Replies