Commit 29886583 authored by yoogx's avatar yoogx
Browse files

* Activate thread affinity for RTEMS target

        For openaadl/ocarina#102
parent ee563f35
......@@ -5,7 +5,7 @@
*
* For more informations, please visit http://taste.tuxfamily.org/wiki
*
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-2019 ESA & ISAE.
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-2020 ESA & ISAE.
*/
#if defined (__linux__) || defined (RTEMS412)
......@@ -417,7 +417,7 @@ int __po_hi_number_of_cpus (void)
{
int cores = 1;
#if defined (__linux__) || defined (__APPLE__)
#if defined (__linux__) || defined (__APPLE__) || (defined (RTEMS_POSIX) && defined (RTEMS412))
cores = (int) sysconf (_SC_NPROCESSORS_ONLN);
#endif
......@@ -453,10 +453,9 @@ pthread_t __po_hi_posix_create_thread (__po_hi_priority_t priority,
return ((pthread_t)__PO_HI_ERROR_PTHREAD_ATTR);
}
#if (defined (POSIX) && defined (__linux__))
#if (defined (POSIX) && defined (__linux__)) || (defined (RTEMS_POSIX) && defined (RTEMS412))
/* The following is disabled pending further investigation on affinity support in 4.11.99 */
/*|| (defined (RTEMS_POSIX) && defined (RTEMS412))) */
/* RTEMS SMP support has been confirmed to work on TASTE */
#ifndef __COMPCERT__
/* Thread affinity */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment