[no subject]

From: Brian D. McGrew
Date: Wed Dec 17 2003 - 12:56:11 EST


Good morning,

I'm hoping that someone can help me out here just a bit. I somehow need to
accomplish two tasks that I'm sure are somewhat trivial yet just out my
conceptual grasp!

I'm trying to get the scheduling figured out so that I can get/set the
priority and schedule of pthreads. The below excerpt is the code I use.
Now, on Solaris (which is where I've been for years) it of course works
fine. However, being new to Linux, I couldn't make it work and therefore
had to come up with a work around. It seems the on Linux the scheduler is
just ignoring my parameters and options. My code looks like:

#ifdef LINUX
struct sched_param grabber_sched_param = { SCHED_RR };
struct sched_param examine_sched_param = { 0 };
#else
struct sched_param grabber_sched_param = { SCHED_RR, 0, 0 };
struct sched_param examine_sched_param = { 0, 0, 0 };
#endif

As I said, on Solaris (sparc) this works just fine by on Linux, when we
call:

pthread_setschedparam(_grabber_id, policy, &grabber_sched_param);

It seems like nothing happens and everything is ignored. Any ideas?

Also, on a (maybe) separate note, how do I go about increasing the system
stack size. We have several programs that 'chain' together and right now on
Linux this isn't working becuase we're running out of stack space. Again,
works fine on Solaris.

Can someone sched some light on this for me?

Thanks so much in advance,

-brian

Brian D. McGrew {brian@xxxxxxxxxxxxx || brian@xxxxxxxxxxxxxxxxxxx }
--
> My job is so secret ... I don't know what I do!

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/