# Re: \[PATCH v3\] uapi: expose enum pid\_type as enum \_\_kernel\_pidtype

- From: Dmitry V. Levin \<hidden\>
- Date: 2021-08-07 14:48:22 
- List: linux-doc
- Page: https://ratatoskr.run/linux-doc/2021/08/1470950
- Thread: https://ratatoskr.run/linux-doc/2021/08/1470892/t.md

```text
On Sat, Aug 07, 2021 at 02:09:05PM +0200, Eugene Syromiatnikov wrote:
> Commit 7ac592aa35a684ff ("sched: prctl() core-scheduling interface")
> made use of enum pid_type in prctl's arg4;  however, this type
> and the associated enumeration definitions are not exposed to userspace.
> Try to fix that by providing enum __kernel_pidtype and tying in-kernel
> enum pid_type definitions to it.  Note that enum pid_type cannot be exposed
> as is, since "enum pid_type" is already exists in various projects [1]

Grammar: "enum pid_type" already exists.

> (notably gcc and strace), and "enum __pid_type" is defined by glibc and uclibc
> for fcntl(F_SETOWN_EX) owner ID type;  there is also __kernel_pid_t,
> that looks too similar to __kernel_pid_type.
> 
> [1] https://codesearch.debian.net/search?q=enum+pid_type
> 
> Complements: 7ac592aa35a684ff ("sched: prctl() core-scheduling interface")
> Signed-off-by: Eugene Syromiatnikov <redacted>

Reviewed-by: Dmitry V. Levin <redacted>


-- 
ldv
```
