Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aion
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Philip Trettner
aion
Commits
8e0104c1
Commit
8e0104c1
authored
May 21, 2016
by
Philip Trettner
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
6b7b2f7b
'
parents
0dc414b6
6b7b2f7b
Pipeline
#1985
skipped
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
7 deletions
+30
-7
CMakeLists.txt
CMakeLists.txt
+7
-3
src/aion/Action.cc
src/aion/Action.cc
+0
-2
src/aion/ActionLabel.cc
src/aion/ActionLabel.cc
+15
-1
src/aion/common/snappy/snappy-stubs-public.hh
src/aion/common/snappy/snappy-stubs-public.hh
+8
-1
No files found.
CMakeLists.txt
View file @
8e0104c1
...
...
@@ -6,9 +6,13 @@ file(GLOB_RECURSE HEADER_FILES "src/*.hh")
add_library
(
aion STATIC
${
SOURCE_FILES
}
${
HEADER_FILES
}
)
target_include_directories
(
aion PUBLIC src/
)
target_compile_options
(
aion PRIVATE -Wall -Werror
)
target_compile_options
(
aion PUBLIC
$<$<COMPILE_LANGUAGE:CXX>:-std=c++11>
)
if
(
MSVC
)
target_compile_options
(
aion PUBLIC /MP
)
else
()
target_compile_options
(
aion PRIVATE -Wall -Werror
)
target_compile_options
(
aion PUBLIC
$<$<COMPILE_LANGUAGE:CXX>:-std=c++11>
)
endif
()
find_package
(
Qt5Core REQUIRED
)
target_link_libraries
(
aion PRIVATE
${
Qt5Core_LIBRARIES
}
)
src/aion/Action.cc
View file @
8e0104c1
#include "Action.hh"
#include <sys/time.h>
using
namespace
aion
;
// empty for now
src/aion/ActionLabel.cc
View file @
8e0104c1
...
...
@@ -13,6 +13,7 @@
using
namespace
aion
;
#ifdef _MSC_VER
#include <Windows.h>
#define AION_THREADLOCAL __declspec(thread)
#else
#define AION_THREADLOCAL __thread // GCC 4.7 has no thread_local yet
...
...
@@ -25,10 +26,17 @@ std::mutex sLabelLock;
std
::
vector
<
ActionLabel
*>
sLabels
;
std
::
vector
<
std
::
vector
<
ActionEntry
>
*>
sEntriesPerThread
;
#if _MSC_VER
LARGE_INTEGER
sFrequency
;
// null init
#endif
void
writeTime
(
ActionEntry
&
e
)
{
#if _MSC_VER
#error not implemented
LARGE_INTEGER
time
;
QueryPerformanceCounter
(
&
time
);
e
.
secs
=
int32_t
(
time
.
QuadPart
/
sFrequency
.
QuadPart
);
e
.
nsecs
=
int32_t
((
time
.
QuadPart
%
sFrequency
.
QuadPart
)
*
1000000000LL
/
sFrequency
.
QuadPart
);
#else
struct
timespec
t
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
t
);
...
...
@@ -76,6 +84,12 @@ ActionLabel::ActionLabel(const char *file, int line, const char *function, const
:
mName
(
name
),
mFile
(
file
),
mLine
(
line
),
mFunction
(
function
)
{
sLabelLock
.
lock
();
#if _MSC_VER
if
(
sFrequency
.
QuadPart
==
0
)
QueryPerformanceFrequency
(
&
sFrequency
);
#endif
mIndex
=
sLabels
.
size
();
sLabels
.
push_back
(
this
);
if
(
!
sEntries
)
...
...
src/aion/common/snappy/snappy-stubs-public.hh
View file @
8e0104c1
...
...
@@ -38,7 +38,9 @@
#include <stdint.h>
#include <stddef.h>
#ifndef _MSC_VER
#include <sys/uio.h>
#endif
#define SNAPPY_MAJOR 1
#define SNAPPY_MINOR 1
...
...
@@ -59,13 +61,18 @@ typedef uint32_t uint32;
typedef
int64_t
int64
;
typedef
uint64_t
uint64
;
#ifdef _MSC_VER
typedef
int64_t
ssize_t
;
#endif
typedef
std
::
string
string
;
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
#if
!1 // TODO
#if
def _MSC_VER
// Windows does not have an iovec type, yet the concept is universally useful.
// It is simple to define it ourselves, so we put it inside our own namespace.
struct
iovec
{
...
...
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