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
9d5312ce
Commit
9d5312ce
authored
6 months ago
by
Constantin P.
💬
Browse files
Options
Downloads
Patches
Plain Diff
Hotfix 12923 4
parent
a31c6b8a
No related branches found
Branches containing commit
No related tags found
1 merge request
!1816
Hotfix 12923 4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/net/dap_chain_net_node_list.c
+8
-8
8 additions, 8 deletions
modules/net/dap_chain_net_node_list.c
with
8 additions
and
8 deletions
modules/net/dap_chain_net_node_list.c
+
8
−
8
View file @
9d5312ce
...
...
@@ -200,7 +200,7 @@ static void s_net_node_link_prepare_error(int a_error_code, void *a_arg){
l_node_info
->
ext_port
,
a_error_code
);
}
static
struct
node_link_request
*
s_node_list_request_init
()
static
struct
node_link_request
*
s_node_list_request_init
()
{
struct
node_link_request
*
l_node_list_request
=
DAP_NEW_Z
(
struct
node_link_request
);
if
(
!
l_node_list_request
)
...
...
@@ -209,14 +209,14 @@ static struct node_link_request *s_node_list_request_init ()
InitializeCriticalSection
(
&
l_node_list_request
->
wait_crit_sec
);
InitializeConditionVariable
(
&
l_node_list_request
->
wait_cond
);
#else
l_node_list_request
->
wait_mutex
=
PTHREAD_MUTEX_INITIALIZER
;
#ifndef DAP_OS_DARWIN
pthread_mutex_init
(
&
l_node_list_request
->
wait_mutex
,
NULL
);
#ifdef DAP_OS_DARWIN
pthread_cond_init
(
&
l_node_list_request
->
wait_cond
,
NULL
);
#else
pthread_condattr_t
attr
;
pthread_condattr_init
(
&
attr
);
pthread_condattr_setclock
(
&
attr
,
CLOCK_MONOTONIC
);
pthread_cond_init
(
&
l_node_list_request
->
wait_cond
,
&
attr
);
#else
l_node_list_request
->
wait_cond
=
PTHREAD_COND_INITIALIZER
;
pthread_cond_init
(
&
l_node_list_request
->
wait_cond
,
&
attr
);
#endif
#endif
return
l_node_list_request
;
...
...
@@ -249,7 +249,7 @@ static int dap_chain_net_node_list_wait(struct node_link_request *a_node_list_re
return
pthread_mutex_unlock
(
&
a_node_list_request
->
wait_mutex
),
a_node_list_request
->
response
;
struct
timespec
l_cond_timeout
;
#ifdef DAP_OS_DARWIN
l_cond_timeout
=
{
.
tv_sec
=
a_timeout_ms
/
1000
};
l_cond_timeout
=
(
struct
timespec
)
{
.
tv_sec
=
a_timeout_ms
/
1000
};
#else
clock_gettime
(
CLOCK_MONOTONIC
,
&
l_cond_timeout
);
l_cond_timeout
.
tv_sec
+=
a_timeout_ms
/
1000
;
...
...
@@ -257,7 +257,7 @@ static int dap_chain_net_node_list_wait(struct node_link_request *a_node_list_re
while
(
!
a_node_list_request
->
response
)
{
switch
(
#ifdef DAP_OS_DARWIN
pthread_cond_timedwait_relative_np
(
&
l
_node_list_request
->
wait_cond
,
&
l
_node_list_request
->
wait_mutex
,
&
l_cond_timeout
)
pthread_cond_timedwait_relative_np
(
&
a
_node_list_request
->
wait_cond
,
&
a
_node_list_request
->
wait_mutex
,
&
l_cond_timeout
)
#else
pthread_cond_timedwait
(
&
a_node_list_request
->
wait_cond
,
&
a_node_list_request
->
wait_mutex
,
&
l_cond_timeout
)
#endif
...
...
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