Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
src
core
lib
iomgr
internal_errqueue.cc
Go to the documentation of this file.
1
// Copyright 2018 gRPC authors.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#include <
grpc/support/port_platform.h
>
16
17
#include "
src/core/lib/iomgr/internal_errqueue.h
"
18
19
#include <
grpc/impl/codegen/log.h
>
20
21
#include "
src/core/lib/iomgr/port.h
"
22
23
#ifdef GRPC_POSIX_SOCKET_TCP
24
25
#include <
errno.h
>
26
#include <stdlib.h>
27
#include <
string.h
>
28
#include <sys/utsname.h>
29
30
namespace
grpc_core
{
31
32
bool
KernelSupportsErrqueue() {
33
static
const
bool
errqueue_supported = []() {
34
#ifdef GRPC_LINUX_ERRQUEUE
35
// Both-compile time and run-time linux kernel versions should be at
36
// least 4.0.0
37
struct
utsname
buffer
;
38
if
(uname(&
buffer
) != 0) {
39
gpr_log
(
GPR_ERROR
,
"uname: %s"
, strerror(errno));
40
return
false
;
41
}
42
char
*
release
=
buffer
.release;
43
if
(
release
==
nullptr
) {
44
return
false
;
45
}
46
47
if
(strtol(
release
,
nullptr
, 10) >= 4) {
48
return
true
;
49
}
else
{
50
gpr_log
(
GPR_DEBUG
,
"ERRQUEUE support not enabled"
);
51
}
52
#endif // GRPC_LINUX_ERRQUEUE
53
return
false
;
54
}();
55
return
errqueue_supported;
56
}
57
}
// namespace grpc_core
58
59
#endif // GRPC_POSIX_SOCKET_TCP
grpc_core
Definition:
call_metric_recorder.h:31
string.h
log.h
internal_errqueue.h
gpr_log
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
buffer
char buffer[1024]
Definition:
libuv/docs/code/idle-compute/main.c:8
GPR_ERROR
#define GPR_ERROR
Definition:
include/grpc/impl/codegen/log.h:57
port.h
release
return ret release()
Definition:
doc/python/sphinx/conf.py:37
GPR_DEBUG
#define GPR_DEBUG
Definition:
include/grpc/impl/codegen/log.h:55
errno.h
port_platform.h
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:21