Project

General

Profile

Actions

Bug #1390

open

Use id_t type for {get,set}priority()

Added by Anonymous over 15 years ago. Updated over 5 years ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
Other
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

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

Actions #1

Updated by Anonymous over 15 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

Actions #2

Updated by dillon over 15 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
Actions #3

Updated by alexh over 14 years ago

anything new about this?

Actions #4

Updated by tuxillo over 14 years ago

Hi,

I was wondering ... where's the patch?

Cheers,
Antonio Huete

Actions #5

Updated by tuxillo over 14 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.

Actions #6

Updated by tuxillo over 14 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

Actions #7

Updated by tuxillo over 11 years ago

  • Status changed from New to Feedback

Stathis,

Any opinion on this?

Cheers,
Antonio Huete

Actions #8

Updated by pavalos over 11 years ago

Standards say it should be an id_t, so I'd say this is a valid issue.

Actions #9

Updated by tuxillo over 10 years ago

  • Description updated (diff)
  • Category set to Other
  • Assignee changed from Anonymous to tuxillo
  • Target version set to 3.8
Actions #10

Updated by tuxillo over 10 years ago

  • Status changed from Feedback to In Progress

Hi,

As far as I could check NetBSD and OpenBSD use id_t for 'who' in their args struct. See here:

http://grok.qc.to/source/xref/netbsd/sys/sys/syscallargs.h#617
http://grok.qc.to/source/xref/openbsd/sys/sys/syscallargs.h#480

I'll change it to id_t for us too in master after the release.

Cheers,
Antonio Huete

Actions #11

Updated by tuxillo over 10 years ago

  • Target version changed from 3.8 to 3.9.x
Actions #12

Updated by tuxillo over 5 years ago

  • Target version changed from 3.9.x to 13
Actions

Also available in: Atom PDF