Changeset 69aa3349 in rtems for cpukit/sapi
- Timestamp:
- 04/08/14 07:42:29 (10 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 0712d17
- Parents:
- e1598a6
- git-author:
- Sebastian Huber <sebastian.huber@…> (04/08/14 07:42:29)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (04/15/14 06:37:12)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/sapi/include/confdefs.h
re1598a6 r69aa3349 642 642 * - CONFIGURE_SCHEDULER_CONTEXT 643 643 * - CONFIGURE_SCHEDULER_CONTROLS 644 * - CONFIGURE_ MEMORY_PER_TASK_FOR_SCHEDULER - per task memory644 * - CONFIGURE_SCHEDULER_USER_PER_THREAD 645 645 */ 646 646 … … 677 677 RTEMS_SCHEDULER_CONTROL_PRIORITY(dflt) 678 678 #endif 679 680 /**681 * This defines the memory used by the priority scheduler.682 */683 #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER ( \684 _Configure_From_workspace(sizeof(Scheduler_priority_Per_thread)) )685 679 #endif 686 680 … … 700 694 RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP(dflt) 701 695 #endif 702 703 /**704 * This defines the memory used by the priority scheduler.705 */706 #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER ( \707 _Configure_From_workspace(sizeof(Scheduler_priority_Per_thread)) )708 696 #endif 709 697 … … 723 711 RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP(dflt) 724 712 #endif 725 726 /**727 * This defines the memory used by the priority scheduler.728 */729 #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER ( \730 _Configure_From_workspace(sizeof(Scheduler_priority_Per_thread)) )731 713 #endif 732 714 … … 740 722 #define CONFIGURE_SCHEDULER_CONTROLS RTEMS_SCHEDULER_CONTROL_SIMPLE(dflt) 741 723 #endif 742 743 /**744 * define the memory used by the simple scheduler745 */746 #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER (0)747 724 #endif 748 725 … … 758 735 RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP(dflt) 759 736 #endif 760 761 /**762 * Define the memory used by the Simple SMP Scheduler763 *764 * NOTE: This is the same as the Simple Scheduler765 */766 #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER (0)767 737 #endif 768 738 … … 776 746 #define CONFIGURE_SCHEDULER_CONTROLS RTEMS_SCHEDULER_CONTROL_EDF(dflt) 777 747 #endif 778 779 /**780 * define the memory used by the EDF scheduler781 */782 #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER ( \783 _Configure_From_workspace(sizeof(Scheduler_EDF_Per_thread)))784 748 #endif 785 749 … … 805 769 _Scheduler_CBS_Server_list[ CONFIGURE_CBS_MAXIMUM_SERVERS ]; 806 770 #endif 807 808 /**809 * define the memory used by the CBS scheduler810 */811 #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER ( \812 _Configure_From_workspace(sizeof(Scheduler_CBS_Per_thread)))813 771 #endif 814 772 … … 1595 1553 #else 1596 1554 #define CONFIGURE_NOTEPADS_ENABLED FALSE 1597 #endif1598 1599 #ifndef CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS1600 #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \1601 _Configure_From_workspace( sizeof(RTEMS_API_Control) )1602 #else1603 #define CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \1604 _Configure_From_workspace( sizeof(RTEMS_API_Control) - \1605 (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)))1606 1555 #endif 1607 1556 … … 1840 1789 #define CONFIGURE_MAXIMUM_POSIX_THREADS 0 1841 1790 #endif 1842 1843 #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \1844 _Configure_From_workspace(sizeof(POSIX_API_Control))1845 1791 1846 1792 #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES … … 1980 1926 1981 1927 #define CONFIGURE_MAXIMUM_POSIX_THREADS 0 1982 #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API 01983 1928 #define CONFIGURE_MEMORY_FOR_POSIX 0 1984 1929 … … 2057 2002 #endif 2058 2003 2059 #ifndef RTEMS_SCHEDSIM2060 /**2061 * This macro specifies the amount of memory to be reserved for the2062 * Newlib C Library reentrancy structure -- if we are using newlib.2063 */2064 2065 #if (defined(RTEMS_NEWLIB) && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY))2066 #define CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB \2067 _Configure_From_workspace(sizeof(struct _reent))2068 #else2069 #define CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB 02070 #endif2071 2072 #else2073 #define CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB 02074 #endif2075 2076 2004 /** 2077 2005 * This is so we can account for tasks with stacks greater than minimum … … 2105 2033 #define CONFIGURE_MEMORY_FOR_TASKS(_tasks, _number_FP_tasks) \ 2106 2034 ( \ 2107 _Configure_Object_RAM(_tasks, sizeof(Thread_Control)) \ 2108 + _Configure_Max_Objects(_tasks) \ 2109 * ( \ 2110 CONFIGURE_MEMORY_PER_TASK_FOR_CLASSIC_API \ 2111 + CONFIGURE_MEMORY_PER_TASK_FOR_NEWLIB \ 2112 + CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \ 2113 + CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER \ 2114 + _Configure_From_workspace( \ 2115 (CONFIGURE_MAXIMUM_USER_EXTENSIONS + 1) * sizeof(void *) \ 2116 ) \ 2117 ) \ 2035 _Configure_Object_RAM(_tasks, sizeof(Configuration_Thread_control)) \ 2118 2036 + _Configure_Max_Objects(_number_FP_tasks) \ 2119 2037 * _Configure_From_workspace(CONTEXT_FP_SIZE) \ … … 2381 2299 2382 2300 #ifdef CONFIGURE_INIT 2301 typedef struct { 2302 Thread_Control Control; 2303 #if CONFIGURE_MAXIMUM_USER_EXTENSIONS > 0 2304 void *extensions[ CONFIGURE_MAXIMUM_USER_EXTENSIONS + 1 ]; 2305 #endif 2306 union { 2307 #ifdef CONFIGURE_SCHEDULER_CBS 2308 Scheduler_CBS_Per_thread CBS; 2309 #endif 2310 #ifdef CONFIGURE_SCHEDULER_EDF 2311 Scheduler_EDF_Per_thread EDF; 2312 #endif 2313 #if defined(CONFIGURE_SCHEDULER_PRIORITY) \ 2314 || defined(CONFIGURE_SCHEDULER_PRIORITY_SMP) 2315 Scheduler_priority_Per_thread Priority; 2316 #endif 2317 #ifdef CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP 2318 Scheduler_priority_affinity_SMP_Per_thread Priority_affinity; 2319 #endif 2320 #ifdef CONFIGURE_SCHEDULER_USER_PER_THREAD 2321 CONFIGURE_SCHEDULER_USER_PER_THREAD User; 2322 #endif 2323 } Scheduler; 2324 RTEMS_API_Control API_RTEMS; 2325 #ifndef CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS 2326 uint32_t Notepads[ RTEMS_NUMBER_NOTEPADS ]; 2327 #endif 2328 #ifdef RTEMS_POSIX_API 2329 POSIX_API_Control API_POSIX; 2330 #endif 2331 #if !defined(RTEMS_SCHEDSIM) \ 2332 && defined(RTEMS_NEWLIB) \ 2333 && !defined(CONFIGURE_DISABLE_NEWLIB_REENTRANCY) 2334 struct _reent Newlib; 2335 #else 2336 struct { /* Empty */ } Newlib; 2337 #endif 2338 } Configuration_Thread_control; 2339 2340 const size_t _Thread_Control_size = sizeof( Configuration_Thread_control ); 2341 2342 const Thread_Control_add_on _Thread_Control_add_ons[] = { 2343 { 2344 offsetof( Configuration_Thread_control, Control.scheduler_info ), 2345 offsetof( Configuration_Thread_control, Scheduler ) 2346 }, { 2347 offsetof( 2348 Configuration_Thread_control, 2349 Control.API_Extensions[ THREAD_API_RTEMS ] 2350 ), 2351 offsetof( Configuration_Thread_control, API_RTEMS ) 2352 }, { 2353 offsetof( 2354 Configuration_Thread_control, 2355 Control.libc_reent 2356 ), 2357 offsetof( Configuration_Thread_control, Newlib ) 2358 } 2359 #ifdef RTEMS_POSIX_API 2360 , { 2361 offsetof( 2362 Configuration_Thread_control, 2363 Control.API_Extensions[ THREAD_API_POSIX ] 2364 ), 2365 offsetof( Configuration_Thread_control, API_POSIX ) 2366 } 2367 #endif 2368 }; 2369 2370 const size_t _Thread_Control_add_on_count = 2371 RTEMS_ARRAY_SIZE( _Thread_Control_add_ons ); 2372 2383 2373 /** 2384 2374 * This is the Classic API Configuration Table. … … 2573 2563 uint32_t INTERRUPT_STACK_MEMORY; 2574 2564 uint32_t MEMORY_FOR_IDLE_TASK; 2575 uint32_t MEMORY_PER_TASK_FOR_SCHEDULER;2576 2565 2577 2566 /* Classic API Pieces */ … … 2629 2618 CONFIGURE_INTERRUPT_STACK_MEMORY, 2630 2619 CONFIGURE_MEMORY_FOR_IDLE_TASK, 2631 CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER,2632 2620 2633 2621 /* Classic API Pieces */
Note: See TracChangeset
for help on using the changeset viewer.