Bug #1390
open
Use id_t type for {get,set}priority()
Added by Anonymous over 15 years ago.
Updated over 5 years ago.
Description
Salute!
Both get- and set-priority() functions take a `who' argument that may refer to
process ID, group ID or a user ID depending on the situation. The id_t type,
which is already available in our src tree, guarantees that it's large enough to
hold pid, gid, etc.
The attached patch replaces `int' with `id_t' wherever appropriate. I have done
a build{world,kernel} and install{world,kernel} and I don't broke anything. Plus
some test cases I have, continue to pass.
If anyone objects to this patch speak now or forever hold your peace!
Cheers,
Stathis
The attached patch replaces `int' with `id_t' wherever appropriate. I have done
a build{world,kernel} and install{world,kernel} and I don't broke anything. Plus
some test cases I have, continue to pass.
I withdraw the patch for the moment and I'll provide a better one soon.
Cheers,
Stathis
:The attached patch replaces `int' with `id_t' wherever appropriate. I have =
:done
:a build{world,kernel} and install{world,kernel} and I don't broke anything.=
: Plus
:some test cases I have, continue to pass.
:
:If anyone objects to this patch speak now or forever hold your peace!
:
:Cheers,
:Stathis
I dunno. id_t is declared in GCC's sys-types.h. I don't see it in
any of our own header files. pid_t might be the better choice there,
since pid_t is also used for things like setpgrp() and setpgid().
-Matt
Hi,
I was wondering ... where's the patch?
Cheers,
Antonio Huete
Okay, I see it at the bottom. I was expecting to have it in the top part just
like others.
Sorry for the noise.
id_t is defined in our sys/types.h as described in posix (look for types.h in
http://www.opengroup.org/onlinepubs/9699919799/)
It says:
id_t
Used as a general identifier; can be used to contain at least a pid_t,
uid_t, or gid_t.
So from my understanding I think it is okay to use id_t.
Regards,
Antonio Huete
- Status changed from New to Feedback
Stathis,
Any opinion on this?
Cheers,
Antonio Huete
Standards say it should be an id_t, so I'd say this is a valid issue.
- Description updated (diff)
- Category set to Other
- Assignee changed from Anonymous to tuxillo
- Target version set to 3.8
- Status changed from Feedback to In Progress
- Target version changed from 3.8 to 3.9.x
- Target version changed from 3.9.x to 13
Also available in: Atom
PDF