Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
9325c684
Commit
9325c684
authored
Sep 14, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use CLONE_KERNEL for the common kernel thread flags.
parent
63540cea
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
14 additions
and
13 deletions
+14
-13
drivers/char/hvc_console.c
drivers/char/hvc_console.c
+1
-1
drivers/pnp/pnpbios_core.c
drivers/pnp/pnpbios_core.c
+1
-1
fs/exec.c
fs/exec.c
+1
-1
fs/lockd/clntlock.c
fs/lockd/clntlock.c
+1
-1
include/linux/sched.h
include/linux/sched.h
+5
-1
init/main.c
init/main.c
+1
-1
kernel/sched.c
kernel/sched.c
+1
-2
kernel/softirq.c
kernel/softirq.c
+1
-2
mm/pdflush.c
mm/pdflush.c
+1
-2
mm/vmscan.c
mm/vmscan.c
+1
-1
No files found.
drivers/char/hvc_console.c
View file @
9325c684
...
@@ -286,7 +286,7 @@ int __init hvc_init(void)
...
@@ -286,7 +286,7 @@ int __init hvc_init(void)
panic
(
"Couldn't register hvc console driver
\n
"
);
panic
(
"Couldn't register hvc console driver
\n
"
);
if
(
hvc_driver
.
num
>
0
)
if
(
hvc_driver
.
num
>
0
)
kernel_thread
(
khvcd
,
NULL
,
CLONE_
FS
|
CLONE_FILES
|
CLONE_SIGNA
L
);
kernel_thread
(
khvcd
,
NULL
,
CLONE_
KERNE
L
);
return
0
;
return
0
;
}
}
...
...
drivers/pnp/pnpbios_core.c
View file @
9325c684
...
@@ -1299,7 +1299,7 @@ static int __init pnpbios_thread_init(void)
...
@@ -1299,7 +1299,7 @@ static int __init pnpbios_thread_init(void)
{
{
#ifdef CONFIG_HOTPLUG
#ifdef CONFIG_HOTPLUG
init_completion
(
&
unload_sem
);
init_completion
(
&
unload_sem
);
if
(
kernel_thread
(
pnp_dock_thread
,
NULL
,
CLONE_FS
|
CLONE_FILES
|
CLONE_SIGNAL
)
>
0
)
if
(
kernel_thread
(
pnp_dock_thread
,
NULL
,
CLONE_KERNEL
)
>
0
)
unloading
=
0
;
unloading
=
0
;
#endif
#endif
return
0
;
return
0
;
...
...
fs/exec.c
View file @
9325c684
...
@@ -522,7 +522,7 @@ static inline void put_proc_dentry(struct dentry *dentry)
...
@@ -522,7 +522,7 @@ static inline void put_proc_dentry(struct dentry *dentry)
* This function makes sure the current process has its own signal table,
* This function makes sure the current process has its own signal table,
* so that flush_signal_handlers can later reset the handlers without
* so that flush_signal_handlers can later reset the handlers without
* disturbing other processes. (Other processes might share the signal
* disturbing other processes. (Other processes might share the signal
* table via the CLONE_SIG
NAL
option to clone().)
* table via the CLONE_SIG
HAND
option to clone().)
*/
*/
static
inline
int
de_thread
(
struct
signal_struct
*
oldsig
)
static
inline
int
de_thread
(
struct
signal_struct
*
oldsig
)
{
{
...
...
fs/lockd/clntlock.c
View file @
9325c684
...
@@ -188,7 +188,7 @@ nlmclnt_recovery(struct nlm_host *host, u32 newstate)
...
@@ -188,7 +188,7 @@ nlmclnt_recovery(struct nlm_host *host, u32 newstate)
nlmclnt_prepare_reclaim
(
host
,
newstate
);
nlmclnt_prepare_reclaim
(
host
,
newstate
);
nlm_get_host
(
host
);
nlm_get_host
(
host
);
MOD_INC_USE_COUNT
;
MOD_INC_USE_COUNT
;
kernel_thread
(
reclaimer
,
host
,
CLONE_
SIGNA
L
);
kernel_thread
(
reclaimer
,
host
,
CLONE_
KERNE
L
);
}
}
}
}
...
...
include/linux/sched.h
View file @
9325c684
...
@@ -51,7 +51,11 @@ struct exec_domain;
...
@@ -51,7 +51,11 @@ struct exec_domain;
#define CLONE_CLEARTID 0x00200000
/* clear the userspace TID */
#define CLONE_CLEARTID 0x00200000
/* clear the userspace TID */
#define CLONE_DETACHED 0x00400000
/* parent wants no child-exit signal */
#define CLONE_DETACHED 0x00400000
/* parent wants no child-exit signal */
#define CLONE_SIGNAL (CLONE_SIGHAND | CLONE_THREAD)
/*
* List of flags we want to share for kernel threads,
* if only because they are not used by them anyway.
*/
#define CLONE_KERNEL (CLONE_FS | CLONE_FILES | CLONE_SIGHAND)
/*
/*
* These are the constant used to fake the fixed-point load-average
* These are the constant used to fake the fixed-point load-average
...
...
init/main.c
View file @
9325c684
...
@@ -371,7 +371,7 @@ static void __init smp_init(void)
...
@@ -371,7 +371,7 @@ static void __init smp_init(void)
static
void
rest_init
(
void
)
static
void
rest_init
(
void
)
{
{
kernel_thread
(
init
,
NULL
,
CLONE_
FS
|
CLONE_FILES
|
CLONE_SIGNA
L
);
kernel_thread
(
init
,
NULL
,
CLONE_
KERNE
L
);
unlock_kernel
();
unlock_kernel
();
cpu_idle
();
cpu_idle
();
}
}
...
...
kernel/sched.c
View file @
9325c684
...
@@ -2055,8 +2055,7 @@ static int migration_call(struct notifier_block *nfb,
...
@@ -2055,8 +2055,7 @@ static int migration_call(struct notifier_block *nfb,
case
CPU_ONLINE
:
case
CPU_ONLINE
:
printk
(
"Starting migration thread for cpu %li
\n
"
,
printk
(
"Starting migration thread for cpu %li
\n
"
,
(
long
)
hcpu
);
(
long
)
hcpu
);
kernel_thread
(
migration_thread
,
hcpu
,
kernel_thread
(
migration_thread
,
hcpu
,
CLONE_KERNEL
);
CLONE_FS
|
CLONE_FILES
|
CLONE_SIGNAL
);
while
(
!
cpu_rq
((
long
)
hcpu
)
->
migration_thread
)
while
(
!
cpu_rq
((
long
)
hcpu
)
->
migration_thread
)
yield
();
yield
();
break
;
break
;
...
...
kernel/softirq.c
View file @
9325c684
...
@@ -395,8 +395,7 @@ static int __devinit cpu_callback(struct notifier_block *nfb,
...
@@ -395,8 +395,7 @@ static int __devinit cpu_callback(struct notifier_block *nfb,
int
hotcpu
=
(
unsigned
long
)
hcpu
;
int
hotcpu
=
(
unsigned
long
)
hcpu
;
if
(
action
==
CPU_ONLINE
)
{
if
(
action
==
CPU_ONLINE
)
{
if
(
kernel_thread
(
ksoftirqd
,
hcpu
,
if
(
kernel_thread
(
ksoftirqd
,
hcpu
,
CLONE_KERNEL
)
<
0
)
{
CLONE_FS
|
CLONE_FILES
|
CLONE_SIGNAL
)
<
0
)
{
printk
(
"ksoftirqd for %i failed
\n
"
,
hotcpu
);
printk
(
"ksoftirqd for %i failed
\n
"
,
hotcpu
);
return
NOTIFY_BAD
;
return
NOTIFY_BAD
;
}
}
...
...
mm/pdflush.c
View file @
9325c684
...
@@ -202,8 +202,7 @@ int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0)
...
@@ -202,8 +202,7 @@ int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0)
static
void
start_one_pdflush_thread
(
void
)
static
void
start_one_pdflush_thread
(
void
)
{
{
kernel_thread
(
pdflush
,
NULL
,
kernel_thread
(
pdflush
,
NULL
,
CLONE_KERNEL
);
CLONE_FS
|
CLONE_FILES
|
CLONE_SIGNAL
);
}
}
static
int
__init
pdflush_init
(
void
)
static
int
__init
pdflush_init
(
void
)
...
...
mm/vmscan.c
View file @
9325c684
...
@@ -705,7 +705,7 @@ static int __init kswapd_init(void)
...
@@ -705,7 +705,7 @@ static int __init kswapd_init(void)
{
{
printk
(
"Starting kswapd
\n
"
);
printk
(
"Starting kswapd
\n
"
);
swap_setup
();
swap_setup
();
kernel_thread
(
kswapd
,
NULL
,
CLONE_
FS
|
CLONE_FILES
|
CLONE_SIGNA
L
);
kernel_thread
(
kswapd
,
NULL
,
CLONE_
KERNE
L
);
return
0
;
return
0
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment