Subj : pthread_attr_setschedparam problem on Linux Redhat AS 4.0. To : comp.programming.threads From : tavoidoi@gmail.com Date : Wed Aug 31 2005 12:20 pm Hi, I call this function to set priority of my thread. pthread_attr_setschedparam(&th->tcb, ¶ms); However, on Linux RedHat AS 4.0, the function pthread_attr_setschedparam() somehow writes to two fields of th->tcb structure, "sched_priority" and "detachstate". I see this while debuging with ddd. The field "detachstate" gets the value that is supposed to go to "sched_priority". and the "sched_priority" gets a different value. The "screwed-up" value of "detachstate" causes pthread_create() (called later) to fail. If I changed the line above to th->tcb.__schedparam.sched_priority = params.sched_priority; then pthread_create() returns Ok. I did not have this problem with Redhat AS 3.0. Did anyone see the same thing? Is that a RedHat AS 4.0 problem, or my problem? thanks a lot, -Thai Nguyen .