Bug #1390
Use id_t type for {get,set}priority()
| Status: | Feedback | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | - |
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
Related todos
History
Updated by Beket almost 4 years ago
> 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
Updated by dillon almost 4 years ago
: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
Updated by alexh about 3 years ago
anything new about this?
Updated by tuxillo about 3 years ago
Hi,
I was wondering ... where's the patch?
Cheers,
Antonio Huete
Updated by tuxillo about 3 years ago
Okay, I see it at the bottom. I was expecting to have it in the top part just
like others.
Sorry for the noise.
Updated by tuxillo about 3 years ago
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