Commit 2488625b authored by Jerome Hugues's avatar Jerome Hugues
Browse files

* Work in progress to support RTEMS 4.12 SMP

	For openaadl/ocarina#102
parent 1a8714bb
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
* we deduce it from generated statements. * we deduce it from generated statements.
*/ */
#if defined(RTEMS_POSIX) #if defined(RTEMS_POSIX)
#include <rtems.h> #include <rtems.h>
#include <inttypes.h> #include <inttypes.h>
#define CONFIGURE_INIT
#include <bsp.h> #include <bsp.h>
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
...@@ -44,8 +44,6 @@ ...@@ -44,8 +44,6 @@
#define CONFIGURE_MAXIMUM_TASKS __PO_HI_NB_TASKS + 2 #define CONFIGURE_MAXIMUM_TASKS __PO_HI_NB_TASKS + 2
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20
#define CONFIGURE_SMP_APPLICATION
int POSIX_Init (); int POSIX_Init ();
#define CONFIGURE_MAXIMUM_POSIX_THREADS __PO_HI_NB_TASKS + 10 #define CONFIGURE_MAXIMUM_POSIX_THREADS __PO_HI_NB_TASKS + 10
/* #define CONFIGURE_EXTRA_TASK_STACKS (20 * RTEMS_MINIMUM_STACK_SIZE) /* #define CONFIGURE_EXTRA_TASK_STACKS (20 * RTEMS_MINIMUM_STACK_SIZE)
...@@ -59,7 +57,10 @@ ...@@ -59,7 +57,10 @@
#endif #endif
#define CONFIGURE_POSIX_INIT_THREAD_TABLE #define CONFIGURE_POSIX_INIT_THREAD_TABLE
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM #define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_INIT
#include <rtems/confdefs.h> #include <rtems/confdefs.h>
#endif /* RTEMS_POSIX */ #endif /* RTEMS_POSIX */
#if defined(RTEMS_PURE) #if defined(RTEMS_PURE)
......
...@@ -8,18 +8,18 @@ ...@@ -8,18 +8,18 @@
* Copyright (C) 2007-2009 Telecom ParisTech, 2010-2017 ESA & ISAE. * Copyright (C) 2007-2009 Telecom ParisTech, 2010-2017 ESA & ISAE.
*/ */
#ifdef POSIX #if defined (__linux__) || defined (RTEMS412)
#ifdef __linux__
/* We need GNU extensions to support thread affinify. /* We need GNU extensions to support thread affinify.
These are Linux specific These are Linux or RTEMS specific
*/ */
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE
#define _GNU_SOURCE 1 #define _GNU_SOURCE 1
#endif /* _GNU_SOURCE */ #endif /* _GNU_SOURCE */
#endif /* __linux__ || RTEMS412 */
#ifdef __linux__
#include <sched.h> #include <sched.h>
#endif /* __linux__ */ #endif /* __linux__ */
#endif /* POSIX */
#if defined (SIMULATOR) #if defined (SIMULATOR)
#include <um_threads.h> #include <um_threads.h>
...@@ -385,7 +385,11 @@ pthread_t __po_hi_posix_create_thread (__po_hi_priority_t priority, ...@@ -385,7 +385,11 @@ pthread_t __po_hi_posix_create_thread (__po_hi_priority_t priority,
return ((pthread_t)__PO_HI_ERROR_PTHREAD_ATTR); return ((pthread_t)__PO_HI_ERROR_PTHREAD_ATTR);
} }
#if ( (defined (POSIX) && defined (__linux__)) || (defined (RTEMS_POSIX) && defined (RTEMS412))) #if (defined (POSIX) && defined (__linux__))
/* The following is disabled pending further investigation on affinity support in 4.11.99 */
/*|| (defined (RTEMS_POSIX) && defined (RTEMS412))) */
#ifndef __COMPCERT__ #ifndef __COMPCERT__
/* Thread affinity */ /* Thread affinity */
cpu_set_t cpuset; cpu_set_t cpuset;
......
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