Skip to content
Snippets Groups Projects
Commit 9cc580d7 authored by alexey.stratulat's avatar alexey.stratulat
Browse files

Moved developments from the master from July 18th to the file dap_events.c

parent 7826125c
No related branches found
No related tags found
2 merge requests!897hotfix-6925,!803Transferring changes of many modules to develop.
Pipeline #17580 failed with stage
in 7 seconds
...@@ -177,7 +177,11 @@ void dap_cpu_assign_thread_on(uint32_t a_cpu_id) ...@@ -177,7 +177,11 @@ void dap_cpu_assign_thread_on(uint32_t a_cpu_id)
#else #else
l_retcode = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &mask); l_retcode = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &mask);
#endif #endif
#ifdef DAP_OS_DARWIN
if (l_retcode != 0 && l_retcode != EPFNOSUPPORT)
#else
if(l_retcode != 0) if(l_retcode != 0)
#endif
{ {
char l_errbuf[128]={0}; char l_errbuf[128]={0};
switch (l_retcode) { switch (l_retcode) {
...@@ -362,15 +366,15 @@ void dap_events_stop_all( ) ...@@ -362,15 +366,15 @@ void dap_events_stop_all( )
* @brief dap_worker_get_index_min * @brief dap_worker_get_index_min
* @return * @return
*/ */
uint32_t dap_events_thread_get_index_min( ) uint32_t dap_events_worker_get_index_min() {
{
uint32_t min = 0; uint32_t min = 0;
if ( !s_workers_init ) if (!s_workers_init) {
log_it(L_CRITICAL, "Event socket reactor has not been fired, use dap_events_init() first"); log_it(L_CRITICAL, "Event socket reactor has not been fired, use dap_events_init() first");
return -1;
for( uint32_t i = 1; i < s_threads_count; i++ ) { }
if ( s_workers[min]->context->event_sockets_count > s_workers[i]->context->event_sockets_count ) for(uint32_t i = 1; i < s_threads_count; i++) {
if (s_workers[min]->context->event_sockets_count > s_workers[i]->context->event_sockets_count)
min = i; min = i;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment