Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commite1e871a

Browse files
committed
Expand INIT_STRUCT_PID and remove
Expand INIT_STRUCT_PID in the single place that uses it and then remove it.There doesn't seem any point in the macro.Signed-off-by: David Howells <dhowells@redhat.com>Tested-by: Tony Luck <tony.luck@intel.com>Tested-by: Will Deacon <will.deacon@arm.com> (arm64)Tested-by: Palmer Dabbelt <palmer@sifive.com>Acked-by: Thomas Gleixner <tglx@linutronix.de>
1 parent3678e2f commite1e871a

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

‎include/linux/init_task.h‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,6 @@ extern struct cred init_cred;
4646
#defineINIT_CPU_TIMERS(s)
4747
#endif
4848

49-
50-
#defineINIT_STRUCT_PID {\
51-
.count = ATOMIC_INIT(1),\
52-
.tasks= {\
53-
{ .first = NULL },\
54-
{ .first = NULL },\
55-
{ .first = NULL },\
56-
},\
57-
.level= 0,\
58-
.numbers= { {\
59-
.nr= 0,\
60-
.ns= &init_pid_ns,\
61-
}, }\
62-
}
63-
6449
#defineINIT_PID_LINK(type) \
6550
{\
6651
.node = {\

‎kernel/pid.c‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,19 @@
4141
#include<linux/sched/task.h>
4242
#include<linux/idr.h>
4343

44-
structpidinit_struct_pid=INIT_STRUCT_PID;
44+
structpidinit_struct_pid= {
45+
.count=ATOMIC_INIT(1),
46+
.tasks= {
47+
{ .first=NULL },
48+
{ .first=NULL },
49+
{ .first=NULL },
50+
},
51+
.level=0,
52+
.numbers= { {
53+
.nr=0,
54+
.ns=&init_pid_ns,
55+
}, }
56+
};
4557

4658
intpid_max=PID_MAX_DEFAULT;
4759

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp