Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
16
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
cellframe
cellframe-sdk
Commits
831e8c8e
Commit
831e8c8e
authored
4 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Plain Diff
Merge branch 'features-3707' into 'master'
features-3707 See merge request
!43
parents
48f8246d
e5200a4a
No related branches found
No related tags found
1 merge request
!43
features-3707
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dap-sdk/core/CMakeLists.txt
+1
-1
1 addition, 1 deletion
dap-sdk/core/CMakeLists.txt
dap-sdk/core/src/dap_common.c
+16
-7
16 additions, 7 deletions
dap-sdk/core/src/dap_common.c
dap-sdk/crypto/CMakeLists.txt
+1
-1
1 addition, 1 deletion
dap-sdk/crypto/CMakeLists.txt
with
18 additions
and
9 deletions
dap-sdk/core/CMakeLists.txt
+
1
−
1
View file @
831e8c8e
...
...
@@ -100,7 +100,7 @@ endif()
if
(
ANDROID
)
add_subdirectory
(
src/android
)
target_link_libraries
(
${
PROJECT_NAME
}
dap_core_android
)
target_link_libraries
(
${
PROJECT_NAME
}
dap_core_android
rt
)
endif
()
if
(
WIN32
)
...
...
This diff is collapsed.
Click to expand it.
dap-sdk/core/src/dap_common.c
+
16
−
7
View file @
831e8c8e
...
...
@@ -827,7 +827,7 @@ static int s_timer_find(void *a_timer)
static
void
CALLBACK
s_win_callback
(
PVOID
a_arg
,
BOOLEAN
a_always_true
)
{
UNUSED
(
a_always_true
);
s_timers
[(
in
t
)
a_arg
].
callback
(
s_timers
[(
in
t
)
a_arg
].
param
);
s_timers
[(
size_
t
)
a_arg
].
callback
(
s_timers
[(
size_
t
)
a_arg
].
param
);
}
#else
static
void
s_posix_callback
(
union
sigval
a_arg
)
...
...
@@ -847,16 +847,16 @@ void *dap_interval_timer_create(unsigned int a_msec, dap_timer_callback_t a_call
if
(
s_timers_count
==
DAP_INTERVAL_TIMERS_MAX
)
{
return
NULL
;
}
#ifdef
_
WIN32
#ifdef WIN32
if
(
s_timers_count
==
0
)
{
InitializeCriticalSection
(
&
s_timers_lock
);
}
HANDLE
l_timer
;
if
(
!
CreateTimerQueueTimer
(
&
l_timer
,
NULL
,
(
WAITORTIMERCALLBACK
)
s_win_callback
,
(
PVOID
)
s_timers_count
,
a_msec
,
a_msec
,
0
))
{
if
(
!
CreateTimerQueueTimer
(
&
l_timer
,
NULL
,
(
WAITORTIMERCALLBACK
)
s_win_callback
,
(
PVOID
)
(
size_t
)
s_timers_count
,
a_msec
,
a_msec
,
0
))
{
return
NULL
;
}
EnterCriticalSection
(
&
s_timers_lock
);
#el
se
#el
if DAP_OS_UNIX
if
(
s_timers_count
==
0
)
{
pthread_mutex_init
(
&
s_timers_lock
,
NULL
);
}
...
...
@@ -873,6 +873,8 @@ void *dap_interval_timer_create(unsigned int a_msec, dap_timer_callback_t a_call
l_period
.
it_interval
.
tv_nsec
=
l_period
.
it_value
.
tv_nsec
=
(
a_msec
%
1000
)
*
1000000
;
timer_settime
(
l_timer
,
0
,
&
l_period
,
NULL
);
pthread_mutex_lock
(
&
s_timers_lock
);
#else
//DARWIN
#endif
s_timers
[
s_timers_count
].
timer
=
(
void
*
)
l_timer
;
s_timers
[
s_timers_count
].
callback
=
a_callback
;
...
...
@@ -880,8 +882,10 @@ void *dap_interval_timer_create(unsigned int a_msec, dap_timer_callback_t a_call
s_timers_count
++
;
#ifdef _WIN32
LeaveCriticalSection
(
&
s_timers_lock
);
#el
se
#el
if DAP_OS_UNIX
pthread_mutex_unlock
(
&
s_timers_lock
);
#else
//DARWIN
#endif
return
(
void
*
)
l_timer
;
}
...
...
@@ -898,8 +902,10 @@ int dap_interval_timer_delete(void *a_timer)
}
#ifdef _WIN32
EnterCriticalSection
(
&
s_timers_lock
);
#el
se
#el
if DAP_OS_UNIX
pthread_mutex_lock
(
&
s_timers_lock
);
#else
//DARWIN
#endif
int
l_timer_idx
=
s_timer_find
(
a_timer
);
if
(
l_timer_idx
==
-
1
)
{
...
...
@@ -915,10 +921,13 @@ int dap_interval_timer_delete(void *a_timer)
DeleteCriticalSection
(
&
s_timers_lock
);
}
return
!
DeleteTimerQueueTimer
(
NULL
,
(
HANDLE
)
a_timer
,
NULL
);
#else
#elif DAP_OS_UNIX
pthread_mutex_unlock
(
&
s_timers_lock
);
if
(
s_timers_count
==
0
)
{
pthread_mutex_destroy
(
&
s_timers_lock
);
}
return
timer_delete
((
timer_t
)
a_timer
);
#else
//DARWIN
#endif
}
This diff is collapsed.
Click to expand it.
dap-sdk/crypto/CMakeLists.txt
+
1
−
1
View file @
831e8c8e
...
...
@@ -92,7 +92,7 @@ endif()
add_library
(
${
PROJECT_NAME
}
STATIC
${
CRYPTO_SRCS
}
${
XKCP_SRCS
}
${
XKCP_SRCS2
}
${
CRYPTO_HEADERS
}
)
target_include_directories
(
dap_crypto PRIVATE src/rand src/iaes src/oaes src/sha3 src/msrln src/defeo_scheme src/sig_bliss src/sig_tesla src/sig_picnic src/sig_dilithium src include
)
target_include_directories
(
dap_crypto PRIVATE
src/seed
src/rand src/iaes src/oaes src/sha3 src/msrln src/defeo_scheme src/sig_bliss src/sig_tesla src/sig_picnic src/sig_dilithium src include
)
target_include_directories
(
dap_crypto INTERFACE src/ src/sha3 include/
)
target_include_directories
(
dap_crypto PUBLIC
...
...
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