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
0a0582d8
Commit
0a0582d8
authored
Oct 30, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://bk.arm.linux.org.uk/linux-2.6-rmk
into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents
3cb8f26c
3ca0b5ee
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
9 deletions
+52
-9
arch/m68k/Makefile
arch/m68k/Makefile
+1
-1
fs/file.c
fs/file.c
+4
-0
include/linux/spinlock.h
include/linux/spinlock.h
+24
-6
init/main.c
init/main.c
+1
-0
kernel/resource.c
kernel/resource.c
+2
-0
kernel/sched.c
kernel/sched.c
+19
-2
scripts/Makefile.build
scripts/Makefile.build
+1
-0
No files found.
arch/m68k/Makefile
View file @
0a0582d8
...
...
@@ -28,7 +28,7 @@ ifdef CONFIG_SUN3
LDFLAGS_vmlinux
=
-N
endif
CHECKFLAGS
+=
-D__mc68000__
-I
$(
shell
$(CC)
-print-file-name
=
include
)
CHECKFLAGS
+=
-D__mc68000__
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
CFLAGS
+=
-pipe
-fno-strength-reduce
-ffixed-a2
...
...
fs/file.c
View file @
0a0582d8
...
...
@@ -54,6 +54,8 @@ void free_fd_array(struct file **array, int num)
*/
int
expand_fd_array
(
struct
files_struct
*
files
,
int
nr
)
__releases
(
files
->
file_lock
)
__acquires
(
files
->
file_lock
)
{
struct
file
**
new_fds
;
int
error
,
nfds
;
...
...
@@ -157,6 +159,8 @@ void free_fdset(fd_set *array, int num)
* held for write.
*/
int
expand_fdset
(
struct
files_struct
*
files
,
int
nr
)
__releases
(
file
->
file_lock
)
__acquires
(
file
->
file_lock
)
{
fd_set
*
new_openset
=
NULL
,
*
new_execset
=
NULL
;
int
error
,
nfds
=
0
;
...
...
include/linux/spinlock.h
View file @
0a0582d8
...
...
@@ -235,36 +235,42 @@ typedef struct {
do { \
preempt_disable(); \
_raw_spin_lock(lock); \
__acquire(lock); \
} while(0)
#define _write_lock(lock) \
do { \
preempt_disable(); \
_raw_write_lock(lock); \
__acquire(lock); \
} while(0)
#define _read_lock(lock) \
do { \
preempt_disable(); \
_raw_read_lock(lock); \
__acquire(lock); \
} while(0)
#define _spin_unlock(lock) \
do { \
_raw_spin_unlock(lock); \
preempt_enable(); \
__release(lock); \
} while (0)
#define _write_unlock(lock) \
do { \
_raw_write_unlock(lock); \
preempt_enable(); \
__release(lock); \
} while(0)
#define _read_unlock(lock) \
do { \
_raw_read_unlock(lock); \
preempt_enable(); \
__release(lock); \
} while(0)
#define _spin_lock_irqsave(lock, flags) \
...
...
@@ -272,6 +278,7 @@ do { \
local_irq_save(flags); \
preempt_disable(); \
_raw_spin_lock(lock); \
__acquire(lock); \
} while (0)
#define _spin_lock_irq(lock) \
...
...
@@ -279,6 +286,7 @@ do { \
local_irq_disable(); \
preempt_disable(); \
_raw_spin_lock(lock); \
__acquire(lock); \
} while (0)
#define _spin_lock_bh(lock) \
...
...
@@ -286,6 +294,7 @@ do { \
local_bh_disable(); \
preempt_disable(); \
_raw_spin_lock(lock); \
__acquire(lock); \
} while (0)
#define _read_lock_irqsave(lock, flags) \
...
...
@@ -293,6 +302,7 @@ do { \
local_irq_save(flags); \
preempt_disable(); \
_raw_read_lock(lock); \
__acquire(lock); \
} while (0)
#define _read_lock_irq(lock) \
...
...
@@ -300,6 +310,7 @@ do { \
local_irq_disable(); \
preempt_disable(); \
_raw_read_lock(lock); \
__acquire(lock); \
} while (0)
#define _read_lock_bh(lock) \
...
...
@@ -307,6 +318,7 @@ do { \
local_bh_disable(); \
preempt_disable(); \
_raw_read_lock(lock); \
__acquire(lock); \
} while (0)
#define _write_lock_irqsave(lock, flags) \
...
...
@@ -314,6 +326,7 @@ do { \
local_irq_save(flags); \
preempt_disable(); \
_raw_write_lock(lock); \
__acquire(lock); \
} while (0)
#define _write_lock_irq(lock) \
...
...
@@ -321,6 +334,7 @@ do { \
local_irq_disable(); \
preempt_disable(); \
_raw_write_lock(lock); \
__acquire(lock); \
} while (0)
#define _write_lock_bh(lock) \
...
...
@@ -328,6 +342,7 @@ do { \
local_bh_disable(); \
preempt_disable(); \
_raw_write_lock(lock); \
__acquire(lock); \
} while (0)
#define _spin_unlock_irqrestore(lock, flags) \
...
...
@@ -335,12 +350,7 @@ do { \
_raw_spin_unlock(lock); \
local_irq_restore(flags); \
preempt_enable(); \
} while (0)
#define _raw_spin_unlock_irqrestore(lock, flags) \
do { \
_raw_spin_unlock(lock); \
local_irq_restore(flags); \
__release(lock); \
} while (0)
#define _spin_unlock_irq(lock) \
...
...
@@ -348,6 +358,7 @@ do { \
_raw_spin_unlock(lock); \
local_irq_enable(); \
preempt_enable(); \
__release(lock); \
} while (0)
#define _spin_unlock_bh(lock) \
...
...
@@ -355,6 +366,7 @@ do { \
_raw_spin_unlock(lock); \
preempt_enable(); \
local_bh_enable(); \
__release(lock); \
} while (0)
#define _write_unlock_bh(lock) \
...
...
@@ -362,6 +374,7 @@ do { \
_raw_write_unlock(lock); \
preempt_enable(); \
local_bh_enable(); \
__release(lock); \
} while (0)
#define _read_unlock_irqrestore(lock, flags) \
...
...
@@ -369,6 +382,7 @@ do { \
_raw_read_unlock(lock); \
local_irq_restore(flags); \
preempt_enable(); \
__release(lock); \
} while (0)
#define _write_unlock_irqrestore(lock, flags) \
...
...
@@ -376,6 +390,7 @@ do { \
_raw_write_unlock(lock); \
local_irq_restore(flags); \
preempt_enable(); \
__release(lock); \
} while (0)
#define _read_unlock_irq(lock) \
...
...
@@ -383,6 +398,7 @@ do { \
_raw_read_unlock(lock); \
local_irq_enable(); \
preempt_enable(); \
__release(lock); \
} while (0)
#define _read_unlock_bh(lock) \
...
...
@@ -390,6 +406,7 @@ do { \
_raw_read_unlock(lock); \
local_bh_enable(); \
preempt_enable(); \
__release(lock); \
} while (0)
#define _write_unlock_irq(lock) \
...
...
@@ -397,6 +414,7 @@ do { \
_raw_write_unlock(lock); \
local_irq_enable(); \
preempt_enable(); \
__release(lock); \
} while (0)
#endif
/* !SMP */
...
...
init/main.c
View file @
0a0582d8
...
...
@@ -441,6 +441,7 @@ static void __init smp_init(void)
*/
static
void
noinline
rest_init
(
void
)
__releases
(
kernel_lock
)
{
kernel_thread
(
init
,
NULL
,
CLONE_FS
|
CLONE_SIGHAND
);
numa_default_policy
();
...
...
kernel/resource.c
View file @
0a0582d8
...
...
@@ -57,6 +57,7 @@ static void *r_next(struct seq_file *m, void *v, loff_t *pos)
}
static
void
*
r_start
(
struct
seq_file
*
m
,
loff_t
*
pos
)
__acquires
(
resource_lock
)
{
struct
resource
*
p
=
m
->
private
;
loff_t
l
=
0
;
...
...
@@ -67,6 +68,7 @@ static void *r_start(struct seq_file *m, loff_t *pos)
}
static
void
r_stop
(
struct
seq_file
*
m
,
void
*
v
)
__releases
(
resource_lock
)
{
read_unlock
(
&
resource_lock
);
}
...
...
kernel/sched.c
View file @
0a0582d8
...
...
@@ -304,6 +304,7 @@ static DEFINE_PER_CPU(struct runqueue, runqueues);
* explicitly disabling preemption.
*/
static
runqueue_t
*
task_rq_lock
(
task_t
*
p
,
unsigned
long
*
flags
)
__acquires
(
rq
->
lock
)
{
struct
runqueue
*
rq
;
...
...
@@ -319,6 +320,7 @@ static runqueue_t *task_rq_lock(task_t *p, unsigned long *flags)
}
static
inline
void
task_rq_unlock
(
runqueue_t
*
rq
,
unsigned
long
*
flags
)
__releases
(
rq
->
lock
)
{
spin_unlock_irqrestore
(
&
rq
->
lock
,
*
flags
);
}
...
...
@@ -426,6 +428,7 @@ struct file_operations proc_schedstat_operations = {
* rq_lock - lock a given runqueue and disable interrupts.
*/
static
runqueue_t
*
this_rq_lock
(
void
)
__acquires
(
rq
->
lock
)
{
runqueue_t
*
rq
;
...
...
@@ -437,6 +440,7 @@ static runqueue_t *this_rq_lock(void)
}
static
inline
void
rq_unlock
(
runqueue_t
*
rq
)
__releases
(
rq
->
lock
)
{
spin_unlock_irq
(
&
rq
->
lock
);
}
...
...
@@ -1318,6 +1322,7 @@ void fastcall sched_exit(task_t * p)
* details.)
*/
static
void
finish_task_switch
(
task_t
*
prev
)
__releases
(
rq
->
lock
)
{
runqueue_t
*
rq
=
this_rq
();
struct
mm_struct
*
mm
=
rq
->
prev_mm
;
...
...
@@ -1349,6 +1354,7 @@ static void finish_task_switch(task_t *prev)
* @prev: the thread we just switched away from.
*/
asmlinkage
void
schedule_tail
(
task_t
*
prev
)
__releases
(
rq
->
lock
)
{
finish_task_switch
(
prev
);
...
...
@@ -1441,10 +1447,13 @@ unsigned long nr_iowait(void)
* you need to do so manually before calling.
*/
static
void
double_rq_lock
(
runqueue_t
*
rq1
,
runqueue_t
*
rq2
)
__acquires
(
rq1
->
lock
)
__acquires
(
rq2
->
lock
)
{
if
(
rq1
==
rq2
)
if
(
rq1
==
rq2
)
{
spin_lock
(
&
rq1
->
lock
);
else
{
__acquire
(
rq2
->
lock
);
/* Fake it out ;) */
}
else
{
if
(
rq1
<
rq2
)
{
spin_lock
(
&
rq1
->
lock
);
spin_lock
(
&
rq2
->
lock
);
...
...
@@ -1462,16 +1471,23 @@ static void double_rq_lock(runqueue_t *rq1, runqueue_t *rq2)
* you need to do so manually after calling.
*/
static
void
double_rq_unlock
(
runqueue_t
*
rq1
,
runqueue_t
*
rq2
)
__releases
(
rq1
->
lock
)
__releases
(
rq2
->
lock
)
{
spin_unlock
(
&
rq1
->
lock
);
if
(
rq1
!=
rq2
)
spin_unlock
(
&
rq2
->
lock
);
else
__release
(
rq2
->
lock
);
}
/*
* double_lock_balance - lock the busiest runqueue, this_rq is locked already.
*/
static
void
double_lock_balance
(
runqueue_t
*
this_rq
,
runqueue_t
*
busiest
)
__releases
(
this_rq
->
lock
)
__acquires
(
busiest
->
lock
)
__acquires
(
this_rq
->
lock
)
{
if
(
unlikely
(
!
spin_trylock
(
&
busiest
->
lock
)))
{
if
(
busiest
<
this_rq
)
{
...
...
@@ -3411,6 +3427,7 @@ asmlinkage long sys_sched_yield(void)
* Since we are going to call schedule() anyway, there's
* no need to preempt or enable interrupts:
*/
__release
(
rq
->
lock
);
_raw_spin_unlock
(
&
rq
->
lock
);
preempt_enable_no_resched
();
...
...
scripts/Makefile.build
View file @
0a0582d8
...
...
@@ -83,6 +83,7 @@ __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \
# Linus' kernel sanity checking tool
ifneq
($(KBUILD_CHECKSRC),0)
CHECKFLAGS
+=
-I
$(
shell
$(CC)
-print-file-name
=
include
)
ifeq
($(KBUILD_CHECKSRC),2)
quiet_cmd_force_checksrc
=
CHECK
$<
cmd_force_checksrc
=
$(CHECK)
$(CHECKFLAGS)
$(c_flags)
$<
;
...
...
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