Ganesh stated: < I want to increase priority of some of the threads in my application on Solaris 10. For this, I'm calling priocntl from the same thread of which I want to increase the priority. < priocntl(priocntl(P_LWPID,P_MYID,PC_SETXPARMS) is fails with EPERM "Not owner" error. < According to "http://docs.sun.com/app/docs/doc/816-0212/6m6nd4ncg?a=view#RETURN%20VALUES", I am using P_MYID to specify that this change applies to the same calling thread.
Look like you need more privs. extract from man page of priocntl(2) ERRORS ... EPERM The {PRIV_PROC_PRIOCNTL} privilege is not asserted in the effective set of the calling LWP. The calling LWP does not have sufficient privileges to affect the target LWP. .. Does the user you're running as have the requiried privs ? The same man page describes whats required. Sean. . Ganesh stated: < < My test program program is attached here & output of the same is given below < < Am I doing anything wrong in this program? Please guide. < < // Compiler command: < CC ./upprio.cpp -o sunprioup -lrt < < Program output: < new thread id = 0x2, id=0 < new thread id = 0x3, id=1 < new thread id = 0x4, id=2 < Error 0 < priocntl:PC_GETXPARMS:ret 24334, upriolmt 0, uprio 0 < Not owner < priocntl:PC_SETXPARMS:ret -1, upriolmt 60, uprio 5 < Not owner < priocntl:PC_GETXPARMS:ret 24334, upriolmt 0, uprio 0 < new thread id = 0x5, id=3 < Error 0 < priocntl:PC_GETXPARMS:ret 24334, upriolmt 0, uprio 0 < Not owner < priocntl:PC_SETXPARMS:ret -1, upriolmt 60, uprio 5 < Not owner < priocntl:PC_GETXPARMS:ret 24334, upriolmt 0, uprio 0 < Enter any key to exit from program: < < < This message posted from opensolaris.org < _______________________________________________ < opensolaris-discuss mailing list < opensolaris-discuss@opensolaris.org _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org