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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
0b834b3b
Commit
0b834b3b
authored
8 years ago
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Fix compiler warning
parent
09b05fd3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/core/lib/iomgr/workqueue.h
+5
-5
5 additions, 5 deletions
src/core/lib/iomgr/workqueue.h
src/core/lib/iomgr/workqueue_posix.c
+9
-6
9 additions, 6 deletions
src/core/lib/iomgr/workqueue_posix.c
src/core/lib/iomgr/workqueue_windows.c
+7
-3
7 additions, 3 deletions
src/core/lib/iomgr/workqueue_windows.c
with
21 additions
and
14 deletions
src/core/lib/iomgr/workqueue.h
+
5
−
5
View file @
0b834b3b
...
...
@@ -61,17 +61,17 @@
//#define GRPC_WORKQUEUE_REFCOUNT_DEBUG
#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG
#define GRPC_WORKQUEUE_REF(p, r) \
(
grpc_workqueue_ref((p), __FILE__, __LINE__, (r))
, (p))
grpc_workqueue_ref((p), __FILE__, __LINE__, (r))
#define GRPC_WORKQUEUE_UNREF(exec_ctx, p, r) \
grpc_workqueue_unref((exec_ctx), (p), __FILE__, __LINE__, (r))
void
grpc_workqueue_ref
(
grpc_workqueue
*
workqueue
,
const
char
*
file
,
int
line
,
const
char
*
reason
);
grpc_workqueue
*
grpc_workqueue_ref
(
grpc_workqueue
*
workqueue
,
const
char
*
file
,
int
line
,
const
char
*
reason
);
void
grpc_workqueue_unref
(
grpc_exec_ctx
*
exec_ctx
,
grpc_workqueue
*
workqueue
,
const
char
*
file
,
int
line
,
const
char
*
reason
);
#else
#define GRPC_WORKQUEUE_REF(p, r)
(
grpc_workqueue_ref((p))
, (p))
#define GRPC_WORKQUEUE_REF(p, r) grpc_workqueue_ref((p))
#define GRPC_WORKQUEUE_UNREF(cl, p, r) grpc_workqueue_unref((cl), (p))
void
grpc_workqueue_ref
(
grpc_workqueue
*
workqueue
);
grpc_workqueue
*
grpc_workqueue_ref
(
grpc_workqueue
*
workqueue
);
void
grpc_workqueue_unref
(
grpc_exec_ctx
*
exec_ctx
,
grpc_workqueue
*
workqueue
);
#endif
...
...
This diff is collapsed.
Click to expand it.
src/core/lib/iomgr/workqueue_posix.c
+
9
−
6
View file @
0b834b3b
...
...
@@ -83,18 +83,21 @@ static void workqueue_orphan(grpc_exec_ctx *exec_ctx,
}
#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG
void
grpc_workqueue_ref
(
grpc_workqueue
*
workqueue
,
const
char
*
file
,
int
line
,
const
char
*
reason
)
{
if
(
workqueue
==
NULL
)
return
;
grpc_workqueue
*
grpc_workqueue_ref
(
grpc_workqueue
*
workqueue
,
const
char
*
file
,
int
line
,
const
char
*
reason
)
{
if
(
workqueue
==
NULL
)
return
NULL
;
gpr_log
(
file
,
line
,
GPR_LOG_SEVERITY_DEBUG
,
"WORKQUEUE:%p ref %d -> %d %s"
,
workqueue
,
(
int
)
workqueue
->
refs
.
count
,
(
int
)
workqueue
->
refs
.
count
+
1
,
reason
);
gpr_ref
(
&
workqueue
->
refs
);
return
workqueue
;
}
#else
void
grpc_workqueue_ref
(
grpc_workqueue
*
workqueue
)
{
if
(
workqueue
==
NULL
)
return
;
gpr_ref
(
&
workqueue
->
refs
);
grpc_workqueue
*
grpc_workqueue_ref
(
grpc_workqueue
*
workqueue
)
{
if
(
workqueue
!=
NULL
)
{
gpr_ref
(
&
workqueue
->
refs
);
}
return
workqueue
;
}
#endif
...
...
This diff is collapsed.
Click to expand it.
src/core/lib/iomgr/workqueue_windows.c
+
7
−
3
View file @
0b834b3b
...
...
@@ -43,12 +43,16 @@
// workqueues.
#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG
void
grpc_workqueue_ref
(
grpc_workqueue
*
workqueue
,
const
char
*
file
,
int
line
,
const
char
*
reason
)
{}
grpc_workqueue
*
grpc_workqueue_ref
(
grpc_workqueue
*
workqueue
,
const
char
*
file
,
int
line
,
const
char
*
reason
)
{
return
workqueue
;
}
void
grpc_workqueue_unref
(
grpc_exec_ctx
*
exec_ctx
,
grpc_workqueue
*
workqueue
,
const
char
*
file
,
int
line
,
const
char
*
reason
)
{}
#else
void
grpc_workqueue_ref
(
grpc_workqueue
*
workqueue
)
{}
grpc_workqueue
*
grpc_workqueue_ref
(
grpc_workqueue
*
workqueue
)
{
return
workqueue
;
}
void
grpc_workqueue_unref
(
grpc_exec_ctx
*
exec_ctx
,
grpc_workqueue
*
workqueue
)
{}
#endif
...
...
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