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
e16372ba
Commit
e16372ba
authored
7 years ago
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup to make compile
parent
70652147
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/lib/iomgr/ev_epoll_linux.c
+4
-4
4 additions, 4 deletions
src/core/lib/iomgr/ev_epoll_linux.c
src/core/lib/iomgr/lockfree_event.c
+15
-1
15 additions, 1 deletion
src/core/lib/iomgr/lockfree_event.c
with
19 additions
and
5 deletions
src/core/lib/iomgr/ev_epoll_linux.c
+
4
−
4
View file @
e16372ba
...
...
@@ -969,7 +969,6 @@ static grpc_fd *fd_create(int fd, const char *name) {
gpr_atm_rel_store
(
&
new_fd
->
refst
,
(
gpr_atm
)
1
);
new_fd
->
fd
=
fd
;
gpr_atm_no_barrier_store
(
&
new_fd
->
shutdown_error
,
(
gpr_atm
)
GRPC_ERROR_NONE
);
new_fd
->
orphaned
=
false
;
grpc_lfev_init
(
&
new_fd
->
read_closure
);
grpc_lfev_init
(
&
new_fd
->
write_closure
);
...
...
@@ -1070,9 +1069,10 @@ static bool fd_is_shutdown(grpc_fd *fd) {
/* Might be called multiple times */
static
void
fd_shutdown
(
grpc_exec_ctx
*
exec_ctx
,
grpc_fd
*
fd
,
grpc_error
*
why
)
{
if
(
grpc_lfev_set_shutdown
(
&
fd
->
read_closure
,
GRPC_ERROR_REF
(
why
)))
{
if
(
grpc_lfev_set_shutdown
(
exec_ctx
,
&
fd
->
read_closure
,
GRPC_ERROR_REF
(
why
)))
{
shutdown
(
fd
->
fd
,
SHUT_RDWR
);
grpc_lfev_set_shutdown
(
&
fd
->
write_closure
,
GRPC_ERROR_REF
(
why
));
grpc_lfev_set_shutdown
(
exec_ctx
,
&
fd
->
write_closure
,
GRPC_ERROR_REF
(
why
));
}
GRPC_ERROR_UNREF
(
why
);
}
...
...
@@ -1286,7 +1286,7 @@ static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd,
}
static
void
fd_become_writable
(
grpc_exec_ctx
*
exec_ctx
,
grpc_fd
*
fd
)
{
grpc_lfev_set_ready
(
exec_ctx
,
fd
,
&
fd
->
write_closure
);
grpc_lfev_set_ready
(
exec_ctx
,
&
fd
->
write_closure
);
}
static
void
pollset_release_polling_island
(
grpc_exec_ctx
*
exec_ctx
,
...
...
This diff is collapsed.
Click to expand it.
src/core/lib/iomgr/lockfree_event.c
+
15
−
1
View file @
e16372ba
...
...
@@ -69,12 +69,26 @@
#define CLOSURE_NOT_READY ((gpr_atm)0)
#define CLOSURE_READY ((gpr_atm)2)
#define FD_SHUTDOWN_BIT
1
#define FD_SHUTDOWN_BIT
((gpr_atm)1)
void
grpc_lfev_init
(
gpr_atm
*
state
)
{
gpr_atm_no_barrier_store
(
state
,
CLOSURE_NOT_READY
);
}
void
grpc_lfev_destroy
(
gpr_atm
*
state
)
{
gpr_atm
curr
=
gpr_atm_no_barrier_load
(
state
);
if
(
curr
&
FD_SHUTDOWN_BIT
)
{
GRPC_ERROR_UNREF
((
grpc_error
*
)(
curr
&
~
FD_SHUTDOWN_BIT
));
}
else
{
GPR_ASSERT
(
curr
==
CLOSURE_NOT_READY
||
curr
==
CLOSURE_READY
);
}
}
bool
grpc_lfev_is_shutdown
(
gpr_atm
*
state
)
{
gpr_atm
curr
=
gpr_atm_no_barrier_load
(
state
);
return
(
curr
&
FD_SHUTDOWN_BIT
)
!=
0
;
}
void
grpc_lfev_notify_on
(
grpc_exec_ctx
*
exec_ctx
,
gpr_atm
*
state
,
grpc_closure
*
closure
)
{
while
(
true
)
{
...
...
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