Sponsored Content
Full Discussion: setting thread priorities
Top Forums Programming setting thread priorities Post 96011 by bankpro on Tuesday 17th of January 2006 04:31:03 AM
Old 01-17-2006
setting thread priorities

hi all:
->could someone tell how 2 set thread priorities in a prg
-> also how to create multiple dynamic threads..
help me....
 

4 More Discussions You Might Find Interesting

1. AIX

crontab priorities

I have a user that wants to run a backup of an oracle database via a file copy. They shut down the database once a week, and do a full copy. She wrote a script to do this for her, and it works, but when she runs it from cron, it takes twice as long. I took a look, and found a way to get it to... (5 Replies)
Discussion started by: TechFly
5 Replies

2. Virtualization and Cloud Computing

ionice command to set i/o priorities for domUs

Hi, I have xen on a debian lenny with more then 20 VM. The supermicro server has a raid10 with a good performance, but I have IO issues when one VM is making backup, it affects the performance of the other VMs. I've setup cpus, vcpus, sched-credit between dom0 and domUs as doc recommended, but... (0 Replies)
Discussion started by: iga3725
0 Replies

3. Shell Programming and Scripting

mailx to set priorities

Hi, can we set priority to mails which I have sent using mailx? Is there any options in mailx for that? I am receiving mails on Microsoft Outlook (4 Replies)
Discussion started by: Deei
4 Replies

4. UNIX for Advanced & Expert Users

Pthread attr setting doesn't work before thread create?

Hello everyone, I created a test program for pthread priority set. Here's the code, very simple, 60 lines only. I've tried this prog on my Fedora 13(on vbox), and on my 6410 arm linux 2.6.36. Both the same result. Both environments are using root privileges. Can any body tells me why the... (15 Replies)
Discussion started by: ss1969
15 Replies
thr_getprio(3C) 					   Standard C Library Functions 					   thr_getprio(3C)

NAME
thr_getprio, thr_setprio - access dynamic thread scheduling SYNOPSIS
cc -mt [ flag... ] file...[ library... ] #include <thread.h> int thr_setprio(thread_t target_thread, int priority); int thr_getprio(thread_t target_thread, int *priority); DESCRIPTION
The thr_setprio() function dynamically changes the priority of the thread specified by target_thread within the current process to the pri- ority specified by priority. By default, threads contend for synchronization objects based on fixed priorities that range from 0, the least significant, to 127. The target_thread will receive precedence by libthread over lower priority threads with respect to synchro- nization object contention. The thr_getprio() function stores the current priority for the thread specified by target_thread in the location pointed to by priority. Thread priorities regulate the order in which threads unblock from synchronization objects and are different from realtime priorities, which regulate and enforce access to CPU resources. Programs that need access to "real" priorities should use bound threads in the realtime class (see priocntl(2)). RETURN VALUES
If successful, the thr_getprio() and thr_setprio() return 0. Otherwise, an error number is returned to indicate the error. ERRORS
For each of the following conditions, these functions return an error number if the condition is detected. ESRCH The value specified by target_thread does not refer to an existing thread. The thr_getprio() and thr_setprio() functions may fail if: EINVAL The value of priority makes no sense for the scheduling class associated with the target_thread. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
priocntl(2), sched_setparam(3RT), thr_create(3C), thr_suspend(3C), thr_yield(3C), attributes(5), standards(5) SunOS 5.10 22 Mar 2001 thr_getprio(3C)
All times are GMT -4. The time now is 06:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy