Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
004209f9
Commit
004209f9
authored
Jul 28, 2009
by
Thomas Gleixner
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rt/ipc' into rt/base
parents
5f30f1fb
3c96a21d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
ipc/mqueue.c
ipc/mqueue.c
+5
-0
ipc/msg.c
ipc/msg.c
+16
-0
ipc/sem.c
ipc/sem.c
+6
-0
No files found.
ipc/mqueue.c
View file @
004209f9
...
...
@@ -820,12 +820,17 @@ static inline void pipelined_send(struct mqueue_inode_info *info,
struct
msg_msg
*
message
,
struct
ext_wait_queue
*
receiver
)
{
/*
* Keep them in one critical section for PREEMPT_RT:
*/
preempt_disable_rt
();
receiver
->
msg
=
message
;
list_del
(
&
receiver
->
list
);
receiver
->
state
=
STATE_PENDING
;
wake_up_process
(
receiver
->
task
);
smp_wmb
();
receiver
->
state
=
STATE_READY
;
preempt_enable_nort
();
}
/* pipelined_receive() - if there is task waiting in sys_mq_timedsend()
...
...
ipc/msg.c
View file @
004209f9
...
...
@@ -259,12 +259,20 @@ static void expunge_all(struct msg_queue *msq, int res)
while
(
tmp
!=
&
msq
->
q_receivers
)
{
struct
msg_receiver
*
msr
;
/*
* Make sure that the wakeup doesnt preempt
* this CPU prematurely. (on PREEMPT_RT)
*/
preempt_disable_rt
();
msr
=
list_entry
(
tmp
,
struct
msg_receiver
,
r_list
);
tmp
=
tmp
->
next
;
msr
->
r_msg
=
NULL
;
wake_up_process
(
msr
->
r_tsk
);
smp_mb
();
msr
->
r_msg
=
ERR_PTR
(
res
);
preempt_enable_rt
();
}
}
...
...
@@ -611,6 +619,12 @@ static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg)
!
security_msg_queue_msgrcv
(
msq
,
msg
,
msr
->
r_tsk
,
msr
->
r_msgtype
,
msr
->
r_mode
))
{
/*
* Make sure that the wakeup doesnt preempt
* this CPU prematurely. (on PREEMPT_RT)
*/
preempt_disable_rt
();
list_del
(
&
msr
->
r_list
);
if
(
msr
->
r_maxsize
<
msg
->
m_ts
)
{
msr
->
r_msg
=
NULL
;
...
...
@@ -624,9 +638,11 @@ static inline int pipelined_send(struct msg_queue *msq, struct msg_msg *msg)
wake_up_process
(
msr
->
r_tsk
);
smp_mb
();
msr
->
r_msg
=
msg
;
preempt_enable_rt
();
return
1
;
}
preempt_enable_rt
();
}
}
return
0
;
...
...
ipc/sem.c
View file @
004209f9
...
...
@@ -414,6 +414,11 @@ static void update_queue (struct sem_array * sma)
if
(
error
<=
0
)
{
struct
sem_queue
*
n
;
/*
* make sure that the wakeup doesnt preempt
* _this_ cpu prematurely. (on preempt_rt)
*/
preempt_disable_rt
();
/*
* Continue scanning. The next operation
* that must be checked depends on the type of the
...
...
@@ -450,6 +455,7 @@ static void update_queue (struct sem_array * sma)
*/
smp_wmb
();
q
->
status
=
error
;
preempt_enable_rt
();
q
=
n
;
}
else
{
q
=
list_entry
(
q
->
list
.
next
,
struct
sem_queue
,
list
);
...
...
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