RE:

Bryan _ <[email protected]> Sun, 13 Apr 2008 10:24:29 -0600
Newsgroups gmane.comp.hardware.motorola.microcontrollers.coldfire
Message-ID <[email protected]>
X-SpamDetect-Info: ------------- Start ASpam results ---------------
X-SpamDetect-Info: This message may be spam. This message BODY has been altered to show you the spam information 
X-SpamDetect: ****: 4.899000 From3consonants=0.3, From: ends in numbers=1.0, X-Verify-SMTP present=0.6, Aspam=3.0
X-SpamDetect-Info: ------------- End ASpam results -----------------


I see there are two ways the nice command can be used. One is nice(inc) where inc is the increment of the nice factor on the current process. Then there is nice [OPTION] [COMMAND [ARG]...]. My microcontroller only supports the nice(inc) method. So at the beginning of my function I have put "nice(-9);" and at the end I have put "nice(+9);". However, I see little to no effect. How does the program know which process to increment the priority for? Am I implementing this correctly?

Thanks,
Bryan

> Date: Sun, 13 Apr 2008 23:59:28 +1000
> From: [email protected]
> Subject: Re: [ColdFire]
> To: [email protected]
>
>
> Hi Bryan,
>
> Bryan _ wrote:
>> I have a function inside my main() program that needs increased priority when the function is running to decrease time delays. The function can hog all of the processing when it is running and can release it when done. What's the best way to do this? I have heard of using the 'nice factor', but am not sure how to implement it inside my main C program. Thanks for any help.
>
> Use the "nice" system call to change process prority.
> "man 2 nice" on any Linux box.
>
> Regards
> Greg
>
>
> ------------------------------------------------------------------------
> Greg Ungerer -- Chief Software Dude EMAIL: [email protected]
> SnapGear -- a Secure Computing Company PHONE: +61 7 3435 2888
> 825 Stanley St, FAX: +61 7 3891 3630
> Woolloongabba, QLD, 4102, Australia WEB: http://www.SnapGear.com
> ---
> [email protected] Send a post to the list.
> [email protected] Join the list.
> [email protected] Join the list in digest mode.
> [email protected] Leave the list.
>

_________________________________________________________________
Use video conversation to talk face-to-face with Windows Live Messenger.
http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_video_042008---
[email protected]              Send a post to the list.
[email protected]        Join the list.
[email protected]    Join the list in digest mode.
[email protected]     Leave the list.