Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Esteban Blanc
proview
Commits
07cd6e39
Commit
07cd6e39
authored
Oct 20, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qcom monitor, mutex for link sendqueue added
parent
c17d981b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
10 deletions
+28
-10
src/exe/rt_qmon/src/rt_qmon.c
src/exe/rt_qmon/src/rt_qmon.c
+28
-10
No files found.
src/exe/rt_qmon/src/rt_qmon.c
View file @
07cd6e39
...
...
@@ -197,6 +197,7 @@ struct sLink {
pwr_tDeltaTime
ack_delay
;
unsigned
int
exp_buf_quota
;
sIseg
tmo
;
thread_sMutex
eseg_mutex
;
};
...
...
@@ -555,6 +556,7 @@ clean_insert (
if
((
!
pending
)
&&
(
esp
->
head
.
flags
.
b
.
first
))
{
thread_MutexLock
(
&
esp
->
lp
->
eseg_mutex
);
for
(
sp
=
lst_Succ
(
NULL
,
le
,
&
se
);
se
!=
le
;
sp
=
nsp
)
{
li
=
se
;
nsp
=
lst_Succ
(
NULL
,
se
,
&
se
);
...
...
@@ -576,12 +578,14 @@ clean_insert (
break
;
}
}
thread_MutexUnlock
(
&
esp
->
lp
->
eseg_mutex
);
if
(
!
esp
->
head
.
flags
.
b
.
last
&&
first
)
ret_pend
=
TRUE
;
if
(
!
first
)
li
=
le
;
}
else
if
(
pending
)
{
thread_MutexLock
(
&
esp
->
lp
->
eseg_mutex
);
for
(
sp
=
lst_Succ
(
NULL
,
le
,
&
se
);
se
!=
le
;
sp
=
nsp
)
{
li
=
se
;
nsp
=
lst_Succ
(
NULL
,
se
,
&
se
);
...
...
@@ -598,6 +602,7 @@ clean_insert (
break
;
}
}
thread_MutexUnlock
(
&
esp
->
lp
->
eseg_mutex
);
if
(
!
first
)
li
=
le
;
ret_pend
=
!
esp
->
head
.
flags
.
b
.
last
;
...
...
@@ -618,7 +623,9 @@ clean_insert (
}
}
#endif
thread_MutexLock
(
&
esp
->
lp
->
eseg_mutex
);
lst_InsertPred
(
NULL
,
li
,
&
esp
->
c
.
le
,
esp
);
thread_MutexUnlock
(
&
esp
->
lp
->
eseg_mutex
);
return
ret_pend
;
...
...
@@ -877,7 +884,7 @@ eseg_free (
{
pwr_tBoolean
bcast
=
sp
->
head
.
flags
.
b
.
bcast
;
if
(
bcast
)
thread_MutexLock
(
&
l
.
bcast
);
if
(
bcast
)
thread_MutexLock
(
&
l
.
bcast
);
export_alloc_sub
(
sp
);
...
...
@@ -973,16 +980,18 @@ export_thread ()
thread_MutexLock
(
&
l
.
bcast
);
esp
=
sp
;
thread_MutexLock
(
&
sp
->
lp
->
eseg_mutex
);
esp
=
sp
;
do
{
ssp
=
esp
;
do
{
ssp
=
esp
;
do
{
ssp
->
c
.
action
=
eAction_export
;
que_Put
(
NULL
,
&
ssp
->
lp
->
q_in
,
&
ssp
->
c
.
le
,
ssp
);
ssp
=
lst_Succ
(
NULL
,
&
ssp
->
le_seg
,
NULL
)
;
}
while
(
ssp
!=
esp
);
esp
=
lst_Succ
(
NULL
,
&
ssp
->
le_bcast
,
NULL
)
;
}
while
(
esp
!=
sp
);
ssp
->
c
.
action
=
eAction_export
;
que_Put
(
NULL
,
&
ssp
->
lp
->
q_in
,
&
ssp
->
c
.
le
,
ssp
);
ssp
=
lst_Succ
(
NULL
,
&
ssp
->
le_seg
,
NULL
)
;
}
while
(
ssp
!=
esp
);
esp
=
lst_Succ
(
NULL
,
&
ssp
->
le_bcast
,
NULL
)
;
}
while
(
esp
!=
sp
);
thread_MutexUnlock
(
&
sp
->
lp
->
eseg_mutex
);
thread_MutexUnlock
(
&
l
.
bcast
);
}
...
...
@@ -1279,6 +1288,7 @@ lack (
lst_sEntry
*
se
;
int
diff
;
sEseg
*
sp
,
*
nsp
;
thread_sMutex
*
mx
;
for
(
sp
=
lst_Succ
(
NULL
,
&
lp
->
lh_win
,
&
se
);
se
!=
&
lp
->
lh_win
;
sp
=
nsp
)
{
nsp
=
lst_Succ
(
NULL
,
se
,
&
se
);
...
...
@@ -1294,7 +1304,10 @@ lack (
window_remove
(
lp
,
sp
);
mx
=
&
sp
->
lp
->
eseg_mutex
;
thread_MutexLock
(
mx
);
eseg_free
(
sp
);
thread_MutexUnlock
(
mx
);
}
else
{
/* This is the oldest not acked segment. */
lp
->
np
->
link
.
lack
=
sp
->
head
.
lack
;
...
...
@@ -1381,6 +1394,7 @@ link_disconnect (
/* Empty send list */
thread_MutexLock
(
&
lp
->
eseg_mutex
);
for
(
sp
=
lst_Succ
(
NULL
,
&
lp
->
lh_send
,
NULL
);
sp
!=
NULL
;
...
...
@@ -1400,6 +1414,7 @@ link_disconnect (
lst_Remove
(
NULL
,
&
sp
->
c
.
le
);
eseg_free
(
sp
);
}
thread_MutexUnlock
(
&
lp
->
eseg_mutex
);
lp
->
np
->
link
.
win_count
=
0
;
...
...
@@ -1440,6 +1455,7 @@ link_purge (
/* Purge send list */
int
i
=
0
;
thread_MutexLock
(
&
lp
->
eseg_mutex
);
for
(
sp
=
lst_Succ
(
NULL
,
&
lp
->
lh_send
,
NULL
);
sp
!=
NULL
;
...
...
@@ -1456,6 +1472,7 @@ link_purge (
alloc_cnt
+=
sp
->
size
;
i
++
;
}
thread_MutexUnlock
(
&
lp
->
eseg_mutex
);
printf
(
"link_purge: %d cnt %d (%d)
\n
"
,
i
,
lp
->
np
->
link
.
export_alloc_cnt
,
alloc_cnt
);
lp
->
np
->
link
.
export_alloc_cnt
=
alloc_cnt
;
lp
->
np
->
link
.
export_purge_cnt
++
;
...
...
@@ -1693,6 +1710,7 @@ new_link (
lp
->
np
->
link
.
rtt_rxmax
=
rtt_rxmax
;
lp
->
np
->
link
.
rtt_rxmin
=
rtt_rxmin
;
lp
->
tmo
.
c
.
action
=
eAction_tmo
;
sts
=
thread_MutexInit
(
&
lp
->
eseg_mutex
);
if
(
mp
!=
NULL
)
{
#if defined OS_VMS
...
...
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