Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

thread_policy_set starts to give errors...



hi,

OS_Error anError = kOS_NoError;


mPriority = inPriority;
mTimeConstraintSet = false;
mFixedPriority = inFixedPriority;
if(mPThread != 0)
{
// We keep a reference to the spawning thread's priority around (initialized in the constructor),
// and set the importance of the child thread relative to the spawning thread's priority.
thread_precedence_policy_data_t thePrecedencePolicy;


thePrecedencePolicy.importance = mPriority - mSpawningThreadPriority;
BAIL_MSG_OSERROR(thread_policy_set( pthread_mach_thread_np(mPThread),
THREAD_PRECEDENCE_POLICY,
(thread_policy_t)&thePrecedencePolicy,
THREAD_PRECEDENCE_POLICY_COUNT),
"cOS_Thread::SetPriority: failed to set the precedence policy");


This calls gives errors, it was working fine 3 months ago, and I used this code for more then 7 months during that time.

Has 10.3.9 changed something around this?
Is there something wrong with this call?

mPriority=48
mSpawningThreadPriority=0

and the error that I got back is

decimal 268435459 or in hex 0x10000003

anyone idea what I'm missing here.

regards,

mvo

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.