This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: linuxthreads question



   From: Ulrich Drepper <drepper@cygnus.com>
   Date: 14 Jul 1998 20:10:31 -0700

   The problem is that this is really a situation which is not (yet)
   supported.  No user beside root so far can change the priority of the
   threads but this is no general problem, it's because we still have no
   complete capability implementation.  The kernel returns an error code
   which says EPERM but this error message really means that "changing
   priorities is not supported for normal users".  It's not supported
   since the detailed methods to control this are missing.  It does not
   fail because there is a general permission problem and normal users
   are never allowed to do this.

This is still an EPERM case.  For example, on BSD it is not allowed
for an ordinary user to chown a file away; the reason for this is to
maintain the integrity of the quota mechanism.  One could say that
therefore the quota mechanism does not support chown for non-root, and
that therefore the chown should be EOFNOTSUPP, but that's a stretch.
OPNOTSUPP is for "this facility is just not going to work" not "I have
some restriction".  

   Anyhow, I don't think pthread_attr_setschedpolicy should provide this
   error code.  But fixing the pthread_create code is really hard.

Exactly.  pthread_attr_* should in general do no error codes at all.
Then if you do a pthread_create with a scheduling policy set and it
isn't supported (for the permission reason, say) then pthread_create
returns the error.  I was in the balloting group; this is exactly the
intention of the standard.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]