Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
PRRT
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
26
Issues
26
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LARN
PRRT
Commits
0672d883
Commit
0672d883
authored
Jun 22, 2018
by
rna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use timedwait for space.
parent
3ea610e2
Pipeline
#2515
failed with stages
in 1 minute and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
prrt/proto/receiver.c
prrt/proto/receiver.c
+3
-2
No files found.
prrt/proto/receiver.c
View file @
0672d883
...
...
@@ -3,6 +3,7 @@
#include "xlap.h"
#include "../util/common.h"
#include "../util/dbg.h"
#include "../util/time.h"
#include "stores/inFlightPacketStore.h"
#include "receiver.h"
...
...
@@ -297,7 +298,8 @@ prrtByteCount_t PrrtReceiver_get_space(PrrtReceiver *receiver) {
void
PrrtReceiver_wait_for_space
(
PrrtReceiver
*
receiver
)
{
check
(
pthread_mutex_lock
(
&
receiver
->
lock
)
==
0
,
"Lock failed."
);
pthread_cond_wait
(
&
receiver
->
wait_for_space
,
&
receiver
->
lock
);
struct
timespec
deadline
=
abstime_from_now
(
BBR_getRTProp
(
receiver
->
bbr
));
pthread_cond_timedwait
(
&
receiver
->
wait_for_space
,
&
receiver
->
lock
,
&
deadline
);
check
(
pthread_mutex_unlock
(
&
receiver
->
lock
)
==
0
,
"Unlock failed."
);
return
;
...
...
@@ -342,7 +344,6 @@ void PrrtReceiver_add_outstanding_packet_state(PrrtReceiver *recv, PrrtPacket *p
pthread_cond_broadcast
(
&
recv
->
wait_for_space
);
check
(
pthread_mutex_unlock
(
&
recv
->
lock
)
==
0
,
"Unlock failed."
);
return
;
error:
...
...
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