Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
91aaee42
Commit
91aaee42
authored
Feb 8, 2016
by
Craig Tiller
Browse files
Options
Downloads
Plain Diff
Merge pull request #5096 from a-veitch/win_cv_wait
Add timespan support for win32 gpr_cv_wait.
parents
55e813f9
0a7468a5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/grpc/impl/codegen/sync.h
+2
-1
2 additions, 1 deletion
include/grpc/impl/codegen/sync.h
src/core/support/sync_win32.c
+1
-0
1 addition, 0 deletions
src/core/support/sync_win32.c
with
3 additions
and
1 deletion
include/grpc/impl/codegen/sync.h
+
2
−
1
View file @
91aaee42
...
@@ -115,7 +115,8 @@ GPR_API void gpr_cv_destroy(gpr_cv *cv);
...
@@ -115,7 +115,8 @@ GPR_API void gpr_cv_destroy(gpr_cv *cv);
/* Atomically release *mu and wait on *cv. When the calling thread is woken
/* Atomically release *mu and wait on *cv. When the calling thread is woken
from *cv or the deadline abs_deadline is exceeded, execute gpr_mu_lock(mu)
from *cv or the deadline abs_deadline is exceeded, execute gpr_mu_lock(mu)
and return whether the deadline was exceeded. Use
and return whether the deadline was exceeded. Use
abs_deadline==gpr_inf_future for no deadline. May return even when not
abs_deadline==gpr_inf_future for no deadline. abs_deadline can be either
an absolute deadline, or a GPR_TIMESPAN. May return even when not
woken explicitly. Requires: *mu and *cv initialized; the calling thread
woken explicitly. Requires: *mu and *cv initialized; the calling thread
holds an exclusive lock on *mu. */
holds an exclusive lock on *mu. */
GPR_API
int
gpr_cv_wait
(
gpr_cv
*
cv
,
gpr_mu
*
mu
,
gpr_timespec
abs_deadline
);
GPR_API
int
gpr_cv_wait
(
gpr_cv
*
cv
,
gpr_mu
*
mu
,
gpr_timespec
abs_deadline
);
...
...
This diff is collapsed.
Click to expand it.
src/core/support/sync_win32.c
+
1
−
0
View file @
91aaee42
...
@@ -87,6 +87,7 @@ int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline) {
...
@@ -87,6 +87,7 @@ int gpr_cv_wait(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline) {
0
)
{
0
)
{
SleepConditionVariableCS
(
cv
,
&
mu
->
cs
,
INFINITE
);
SleepConditionVariableCS
(
cv
,
&
mu
->
cs
,
INFINITE
);
}
else
{
}
else
{
abs_deadline
=
gpr_convert_clock_type
(
abs_deadline
,
GPR_CLOCK_REALTIME
);
gpr_timespec
now
=
gpr_now
(
abs_deadline
.
clock_type
);
gpr_timespec
now
=
gpr_now
(
abs_deadline
.
clock_type
);
int64_t
now_ms
=
(
int64_t
)
now
.
tv_sec
*
1000
+
now
.
tv_nsec
/
1000000
;
int64_t
now_ms
=
(
int64_t
)
now
.
tv_sec
*
1000
+
now
.
tv_nsec
/
1000000
;
int64_t
deadline_ms
=
int64_t
deadline_ms
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment