Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
e6db1594
Commit
e6db1594
authored
Apr 29, 2018
by
zyearn
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cmake_support' of github.com:brpc/brpc into cmake_support
parents
206d4c89
0c8ca060
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
263 additions
and
66 deletions
+263
-66
CMakeLists.txt
CMakeLists.txt
+9
-1
cpu_profiler.md
docs/cn/cpu_profiler.md
+4
-1
heap_profiler.md
docs/cn/heap_profiler.md
+2
-1
CMakeLists.txt
example/asynchronous_echo_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/backup_request_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/cancel_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/cascade_echo_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/dynamic_partition_echo_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/echo_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/echo_c++_hulu_pbrpc/CMakeLists.txt
+9
-1
CMakeLists.txt
example/echo_c++_sofa_pbrpc/CMakeLists.txt
+9
-1
CMakeLists.txt
example/echo_c++_ubrpc_compack/CMakeLists.txt
+9
-1
CMakeLists.txt
example/http_c++/CMakeLists.txt
+10
-1
CMakeLists.txt
example/memcache_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/multi_threaded_echo_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/multi_threaded_echo_fns_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/multi_threaded_mcpack_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/nshead_extension_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/nshead_pb_extension_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/parallel_echo_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/partition_echo_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/redis_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/selective_echo_c++/CMakeLists.txt
+9
-1
CMakeLists.txt
example/session_data_and_thread_local/CMakeLists.txt
+9
-1
CMakeLists.txt
example/streaming_echo_c++/CMakeLists.txt
+9
-1
sys_futex.cpp
src/bthread/sys_futex.cpp
+1
-0
time.cpp
src/butil/time.cpp
+40
-0
time.h
src/butil/time.h
+5
-16
CMakeLists.txt
test/CMakeLists.txt
+1
-1
baidu_time_unittest.cpp
test/baidu_time_unittest.cpp
+0
-6
bthread_butex_unittest.cpp
test/bthread_butex_unittest.cpp
+1
-5
bthread_timer_thread_unittest.cpp
test/bthread_timer_thread_unittest.cpp
+0
-12
CMakeLists.txt
tools/CMakeLists.txt
+1
-1
No files found.
CMakeLists.txt
View file @
e6db1594
...
...
@@ -63,7 +63,15 @@ execute_process(
OUTPUT_VARIABLE BRPC_REVISION
)
set
(
CMAKE_CPP_FLAGS
"-DBRPC_WITH_GLOG=
${
WITH_GLOG_VAL
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DBRPC_WITH_GLOG=
${
WITH_GLOG_VAL
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CPP_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DBTHREAD_USE_FAST_PTHREAD_MUTEX -D__const__= -D_GNU_SOURCE -DUSE_SYMBOLIZE -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DBRPC_REVISION=
\\\"
${
BRPC_REVISION
}
\\\"
-D__STRICT_ANSI__"
)
set
(
CMAKE_CPP_FLAGS
"
${
CMAKE_CPP_FLAGS
}
${
DEBUG_SYMBOL
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-O2 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-invalid-offsetof -Wno-unused-parameter -fno-omit-frame-pointer"
)
...
...
docs/cn/cpu_profiler.md
View file @
e6db1594
...
...
@@ -94,4 +94,7 @@ Total: 2954 samples
# MacOS的额外配置
在MacOS下,gperftools中的perl pprof脚本会丢失函数名字,解决办法是需要自行下载
[
standalone pprof
](
https://github.com/google/pprof
)
,并把下载的pprof二进制文件路径写入环境变量GOOGLE_PPROF_BINARY_PATH中,profiler才能正常工作。
在MacOS下,gperftools中的perl pprof脚本无法将函数地址转变成函数名,解决办法是:
1.
安装
[
standalone pprof
](
https://github.com/google/pprof
)
,并把下载的pprof二进制文件路径写入环境变量GOOGLE_PPROF_BINARY_PATH中
2.
安装llvm-symbolizer(将函数符号转化为函数名),直接用brew安装即可:
`brew install llvm`
docs/cn/heap_profiler.md
View file @
e6db1594
...
...
@@ -105,4 +105,5 @@ brpc还提供一个类似的growth profiler分析内存的分配去向(不考
# MacOS的额外配置
在MacOS下,gperftools中的perl pprof脚本会丢失函数名字,解决办法是需要自行下载
[
standalone pprof
](
https://github.com/google/pprof
)
,并把下载的pprof二进制文件路径写入环境变量GOOGLE_PPROF_BINARY_PATH中,profiler才能正常工作。
1.
安装
[
standalone pprof
](
https://github.com/google/pprof
)
,并把下载的pprof二进制文件路径写入环境变量GOOGLE_PPROF_BINARY_PATH中
2.
安装llvm-symbolizer(将函数符号转化为函数名),直接用brew安装即可:
`brew install llvm`
example/asynchronous_echo_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -44,7 +44,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
example/backup_request_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -44,7 +44,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
example/cancel_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -44,7 +44,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
example/cascade_echo_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -43,7 +43,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
example/dynamic_partition_echo_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -48,7 +48,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DBRPC_ENABLE_CPU_PROFILER"
)
...
...
example/echo_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -44,7 +44,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
example/echo_c++_hulu_pbrpc/CMakeLists.txt
View file @
e6db1594
...
...
@@ -44,7 +44,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
example/echo_c++_sofa_pbrpc/CMakeLists.txt
View file @
e6db1594
...
...
@@ -44,7 +44,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
example/echo_c++_ubrpc_compack/CMakeLists.txt
View file @
e6db1594
...
...
@@ -44,7 +44,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
example/http_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -48,7 +48,16 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DBRPC_ENABLE_CPU_PROFILER"
)
...
...
example/memcache_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -44,7 +44,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
example/multi_threaded_echo_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -48,7 +48,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DBRPC_ENABLE_CPU_PROFILER"
)
...
...
example/multi_threaded_echo_fns_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -48,7 +48,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DBRPC_ENABLE_CPU_PROFILER"
)
...
...
example/multi_threaded_mcpack_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -48,7 +48,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DBRPC_ENABLE_CPU_PROFILER"
)
...
...
example/nshead_extension_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -44,7 +44,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
example/nshead_pb_extension_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -44,7 +44,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
example/parallel_echo_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -48,7 +48,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DBRPC_ENABLE_CPU_PROFILER"
)
...
...
example/partition_echo_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -48,7 +48,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DBRPC_ENABLE_CPU_PROFILER"
)
...
...
example/redis_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -49,7 +49,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
example/selective_echo_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -48,7 +48,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DBRPC_ENABLE_CPU_PROFILER"
)
...
...
example/session_data_and_thread_local/CMakeLists.txt
View file @
e6db1594
...
...
@@ -48,7 +48,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-DBRPC_ENABLE_CPU_PROFILER"
)
...
...
example/streaming_echo_c++/CMakeLists.txt
View file @
e6db1594
...
...
@@ -44,7 +44,15 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Darwin"
)
include
(
CheckFunctionExists
)
CHECK_FUNCTION_EXISTS
(
clock_gettime HAVE_CLOCK_GETTIME
)
if
(
NOT HAVE_CLOCK_GETTIME
)
set
(
DEFINE_CLOCK_GETTIME
"-DNO_CLOCK_GETTIME_IN_MAC"
)
endif
()
endif
()
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
if
(
CMAKE_VERSION VERSION_LESS
"3.1.3"
)
...
...
src/bthread/sys_futex.cpp
View file @
e6db1594
...
...
@@ -107,6 +107,7 @@ int futex_wake_private(void* addr1, int nwake) {
std
::
unique_lock
<
pthread_mutex_t
>
mu
(
s_futex_map_mutex
);
auto
it
=
s_futex_map
->
find
(
addr1
);
if
(
it
==
s_futex_map
->
end
())
{
mu
.
unlock
();
return
0
;
}
SimuFutex
&
simu_futex
=
it
->
second
;
...
...
src/butil/time.cpp
View file @
e6db1594
...
...
@@ -28,6 +28,46 @@
#include "butil/time.h"
#if defined(NO_CLOCK_GETTIME_IN_MAC)
#include <mach/clock.h> // mach_absolute_time
#include <mach/mach_time.h> // mach_timebase_info
#include <pthread.h> // pthread_once
#include <stdlib.h> // exit
static
mach_timebase_info_data_t
s_timebase
;
static
timespec
s_init_time
;
static
uint64_t
s_init_ticks
;
static
pthread_once_t
s_init_clock_once
=
PTHREAD_ONCE_INIT
;
static
void
InitClock
()
{
if
(
mach_timebase_info
(
&
s_timebase
)
!=
0
)
{
exit
(
1
);
}
timeval
now
;
if
(
gettimeofday
(
&
now
,
NULL
)
!=
0
)
{
exit
(
1
);
}
s_init_time
.
tv_sec
=
now
.
tv_sec
;
s_init_time
.
tv_nsec
=
now
.
tv_usec
*
1000L
;
s_init_ticks
=
mach_absolute_time
();
}
int
clock_gettime
(
clockid_t
id
,
timespec
*
time
)
{
if
(
pthread_once
(
&
s_init_clock_once
,
InitClock
)
!=
0
)
{
exit
(
1
);
}
uint64_t
clock
=
mach_absolute_time
()
-
s_init_ticks
;
uint64_t
elapsed
=
clock
*
(
uint64_t
)
s_timebase
.
numer
/
(
uint64_t
)
s_timebase
.
denom
;
*
time
=
s_init_time
;
time
->
tv_sec
+=
elapsed
/
1000000000L
;
time
->
tv_nsec
+=
elapsed
%
1000000000L
;
time
->
tv_sec
+=
time
->
tv_nsec
/
1000000000L
;
time
->
tv_nsec
=
time
->
tv_nsec
%
1000000000L
;
return
0
;
}
#endif
namespace
butil
{
int64_t
monotonic_time_ns
()
{
...
...
src/butil/time.h
View file @
e6db1594
...
...
@@ -24,27 +24,16 @@
#include <sys/time.h> // timeval, gettimeofday
#include <stdint.h> // int64_t, uint64_t
#ifdef __MACH__
#include <mach/clock.h>
#if defined(NO_CLOCK_GETTIME_IN_MAC)
#include <mach/mach.h>
# ifndef clock_gettime
# define CLOCK_REALTIME CALENDAR_CLOCK
# define CLOCK_MONOTONIC SYSTEM_CLOCK
typedef
int
clockid_t
;
inline
int
clock_gettime
(
clockid_t
id
,
timespec
*
time
)
{
// clock_gettime is not available in MacOS, use clock_get_time instead
clock_serv_t
cclock
;
mach_timespec_t
mts
;
host_get_clock_service
(
mach_host_self
(),
id
,
&
cclock
);
clock_get_time
(
cclock
,
&
mts
);
mach_port_deallocate
(
mach_task_self
(),
cclock
);
time
->
tv_sec
=
mts
.
tv_sec
;
time
->
tv_nsec
=
mts
.
tv_nsec
;
return
0
;
}
# endif
// clock_gettime is not available in MacOS < 10.12
int
clock_gettime
(
clockid_t
id
,
timespec
*
time
);
#endif
namespace
butil
{
...
...
test/CMakeLists.txt
View file @
e6db1594
...
...
@@ -33,7 +33,7 @@ else()
message
(
FATAL_ERROR
"Googletest is not available"
)
endif
()
set
(
CMAKE_CPP_FLAGS
"-DBRPC_WITH_GLOG=
${
WITH_GLOG_VAL
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DBRPC_WITH_GLOG=
${
WITH_GLOG_VAL
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CPP_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DBTHREAD_USE_FAST_PTHREAD_MUTEX -D__const__= -D_GNU_SOURCE -DUSE_SYMBOLIZE -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DUNIT_TEST -Dprivate=public -Dprotected=public -DBVAR_NOT_LINK_DEFAULT_VARIABLES -D__STRICT_ANSI__ -include
${
CMAKE_SOURCE_DIR
}
/test/sstream_workaround.h"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-O2 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-invalid-offsetof -Wno-unused-parameter -fno-omit-frame-pointer"
)
use_cxx11
()
...
...
test/baidu_time_unittest.cpp
View file @
e6db1594
...
...
@@ -19,11 +19,7 @@ namespace {
TEST
(
BaiduTimeTest
,
diff_between_gettimeofday_and_REALTIME
)
{
long
t1
=
butil
::
gettimeofday_us
();
timespec
time
;
#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
clock_gettime
(
CALENDAR_CLOCK
,
&
time
);
#else
clock_gettime
(
CLOCK_REALTIME
,
&
time
);
#endif
long
t2
=
butil
::
timespec_to_microseconds
(
time
);
LOG
(
INFO
)
<<
"t1="
<<
t1
<<
" t2="
<<
t2
;
}
...
...
@@ -104,7 +100,6 @@ TEST(BaiduTimeTest, cost_of_timer) {
clock_desc
[
i
],
t1
.
n_elapsed
()
/
N
);
}
#endif
#if !defined(OS_MACOSX)
if
(
0
==
clock_gettime
((
clockid_t
)
i
,
&
ts
))
{
t1
.
start
();
for
(
size_t
j
=
0
;
j
<
N
;
++
j
)
{
...
...
@@ -114,7 +109,6 @@ TEST(BaiduTimeTest, cost_of_timer) {
printf
(
"glibc clock_gettime(%s) takes %"
PRId64
"ns
\n
"
,
clock_desc
[
i
],
t1
.
n_elapsed
()
/
N
);
}
#endif
}
}
...
...
test/bthread_butex_unittest.cpp
View file @
e6db1594
...
...
@@ -25,11 +25,7 @@ TEST(ButexTest, wait_on_already_timedout_butex) {
uint32_t
*
butex
=
bthread
::
butex_create_checked
<
uint32_t
>
();
ASSERT_TRUE
(
butex
);
timespec
now
;
#if defined(OS_MACOSX)
ASSERT_EQ
(
0
,
clock_gettime
(
CALENDAR_CLOCK
,
&
now
));
#else
ASSERT_EQ
(
0
,
clock_gettime
(
CLOCK_REALTIME
,
&
now
));
#endif
*
butex
=
1
;
ASSERT_EQ
(
-
1
,
bthread
::
butex_wait
(
butex
,
1
,
&
now
));
ASSERT_EQ
(
ETIMEDOUT
,
errno
);
...
...
@@ -299,7 +295,7 @@ TEST(ButexTest, join_cant_be_wakeup) {
ASSERT_EQ
(
0
,
bthread_join
(
th2
,
NULL
));
ASSERT_EQ
(
0
,
bthread_join
(
th
,
NULL
));
tm
.
stop
();
ASSERT_LT
(
tm
.
m_elapsed
(),
WAIT_MSEC
+
1
0
);
ASSERT_LT
(
tm
.
m_elapsed
(),
WAIT_MSEC
+
1
5
);
ASSERT_EQ
(
EINVAL
,
bthread_stop
(
th
));
ASSERT_EQ
(
EINVAL
,
bthread_stop
(
th2
));
}
...
...
test/bthread_timer_thread_unittest.cpp
View file @
e6db1594
...
...
@@ -34,11 +34,7 @@ public:
void
run
()
{
timespec
current_time
;
#if defined(OS_MACOSX)
clock_gettime
(
CALENDAR_CLOCK
,
&
current_time
);
#else
clock_gettime
(
CLOCK_REALTIME
,
&
current_time
);
#endif
if
(
_name
)
{
LOG
(
INFO
)
<<
"Run `"
<<
_name
<<
"' task_id="
<<
_task_id
;
}
else
{
...
...
@@ -175,11 +171,7 @@ public:
void
run
()
{
#if defined(OS_MACOSX)
clock_gettime
(
CALENDAR_CLOCK
,
&
_running_time
);
#else
clock_gettime
(
CLOCK_REALTIME
,
&
_running_time
);
#endif
EXPECT_EQ
(
_expected_unschedule_result
,
_timer_thread
->
unschedule
(
_keeper1
->
_task_id
));
_keeper2
->
schedule
(
_timer_thread
);
...
...
@@ -239,11 +231,7 @@ TEST(TimerThreadTest, schedule_and_unschedule_in_task) {
timer_thread
.
stop_and_join
();
timespec
finish_time
;
#if defined(OS_MACOSX)
clock_gettime
(
CALENDAR_CLOCK
,
&
finish_time
);
#else
clock_gettime
(
CLOCK_REALTIME
,
&
finish_time
);
#endif
keeper1
.
expect_not_run
();
keeper2
.
expect_first_run
(
test_task1
.
_running_time
);
...
...
tools/CMakeLists.txt
View file @
e6db1594
set
(
CMAKE_CPP_FLAGS
"-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CPP_FLAGS
"
${
DEFINE_CLOCK_GETTIME
}
-DGFLAGS_NS=
${
GFLAGS_NS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CPP_FLAGS
}
-DNDEBUG -O2 -D__const__= -D__STRICT_ANSI__ -pipe -W -Wall -Wno-unused-parameter -fPIC -fno-omit-frame-pointer"
)
use_cxx11
()
set
(
EXECUTABLE_OUTPUT_PATH
${
CMAKE_BINARY_DIR
}
/output/bin
)
...
...
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