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
18
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
00166d79
Commit
00166d79
authored
2 years ago
by
ruslan.laishev
💬
Browse files
Options
Downloads
Patches
Plain Diff
[+] Added dap_proc_queue_create_ext() especialy for Async DB II
Former-commit-id:
a3797f2c
parent
0a9639a0
No related branches found
No related tags found
1 merge request
!897
hotfix-6925
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dap-sdk/net/core/dap_proc_queue.c
+32
-2
32 additions, 2 deletions
dap-sdk/net/core/dap_proc_queue.c
with
32 additions
and
2 deletions
dap-sdk/net/core/dap_proc_queue.c
+
32
−
2
View file @
00166d79
...
@@ -36,6 +36,36 @@ typedef struct dap_proc_queue_msg{
...
@@ -36,6 +36,36 @@ typedef struct dap_proc_queue_msg{
static
void
s_queue_esocket_callback
(
dap_events_socket_t
*
a_es
,
void
*
a_msg
);
static
void
s_queue_esocket_callback
(
dap_events_socket_t
*
a_es
,
void
*
a_msg
);
/**
* @brief dap_proc_queue_create
* @param a_thread
* @return
*/
dap_proc_queue_t
*
dap_proc_queue_create_ext
(
dap_proc_thread_t
*
a_thread
)
{
dap_proc_queue_t
*
l_queue
=
DAP_NEW_Z
(
dap_proc_queue_t
);
if
(
!
l_queue
)
return
NULL
;
for
(
int
i
=
0
;
i
<
DAP_QUE
$
K_PRIMAX
;
i
++
)
{
assert
(
!
(
pthread_mutex_init
(
&
l_queue
->
list
[
i
].
lock
,
0
))
);
}
l_queue
->
proc_thread
=
a_thread
;
//l_queue->esocket = dap_events_socket_create_type_queue_ptr_unsafe(NULL,s_queue_esocket_callback);
l_queue
->
esocket
->
proc_thread
=
a_thread
;
l_queue
->
esocket
->
_inheritor
=
l_queue
;
return
l_queue
;
}
/**
/**
* @brief dap_proc_queue_create
* @brief dap_proc_queue_create
* @param a_thread
* @param a_thread
...
@@ -203,7 +233,7 @@ dap_proc_queue_msg_t *l_msg;
...
@@ -203,7 +233,7 @@ dap_proc_queue_msg_t *l_msg;
l_msg
->
pri
=
a_pri
;
l_msg
->
pri
=
a_pri
;
/*
/*
* Send message to queue
u
with the given priority
* Send message to queue with the given priority
*/
*/
return
dap_events_socket_queue_ptr_send
(
a_worker
->
proc_queue
->
esocket
,
l_msg
);
return
dap_events_socket_queue_ptr_send
(
a_worker
->
proc_queue
->
esocket
,
l_msg
);
}
}
...
@@ -243,7 +273,7 @@ int dap_proc_queue_add_callback_inter( dap_events_socket_t * a_es_input, dap_pro
...
@@ -243,7 +273,7 @@ int dap_proc_queue_add_callback_inter( dap_events_socket_t * a_es_input, dap_pro
int
dap_proc_queue_add_callback_inter_ext
(
dap_events_socket_t
*
a_es_input
,
dap_proc_queue_callback_t
a_callback
,
void
*
a_callback_arg
,
int
dap_proc_queue_add_callback_inter_ext
(
dap_events_socket_t
*
a_es_input
,
dap_proc_queue_callback_t
a_callback
,
void
*
a_callback_arg
,
int
a_pri
)
int
a_pri
)
{
{
dap_proc_queue_msg_t
*
l_msg
;
dap_proc_queue_msg_t
*
l_msg
;
if
(
!
(
a_pri
<
DAP_QUE
$
K_PRIMAX
)
)
/* Check that priority level is in legal range */
if
(
!
(
a_pri
<
DAP_QUE
$
K_PRIMAX
)
)
/* Check that priority level is in legal range */
{
{
...
...
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