- Timestamp:
- 08/28/95 15:30:29 (28 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 5072b07
- Parents:
- 5250ff39
- Location:
- c/src
- Files:
-
- 97 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libcsupport/src/libio.c
r5250ff39 r7f6a24ab 112 112 } 113 113 114 rc = rtems_semaphore_create(RTEMS_LIBIO_SEM, 115 1, 116 RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 117 &rtems_libio_semaphore); 114 rc = rtems_semaphore_create( 115 RTEMS_LIBIO_SEM, 116 1, 117 RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 118 RTEMS_NO_PRIORITY, 119 &rtems_libio_semaphore 120 ); 118 121 if (rc != RTEMS_SUCCESSFUL) 119 122 rtems_fatal_error_occurred(rc); … … 200 203 */ 201 204 202 rc = rtems_semaphore_create(RTEMS_LIBIO_IOP_SEM(iop - rtems_libio_iops), 203 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 204 &iop->sem); 205 rc = rtems_semaphore_create( 206 RTEMS_LIBIO_IOP_SEM(iop - rtems_libio_iops), 207 1, 208 RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 209 RTEMS_NO_PRIORITY, 210 &iop->sem 211 ); 205 212 if (rc != RTEMS_SUCCESSFUL) 206 213 goto failed; -
c/src/exec/rtems/headers/asr.h
r5250ff39 r7f6a24ab 55 55 56 56 typedef struct { 57 rtems_asr_entry 58 rtems_modemode_set; /* RTEMS_ASR mode */59 rtems_signal_set signals_posted; /* signal set */60 rtems_signal_set signals_pending; /* pending signal set */61 unsigned32 57 rtems_asr_entry handler; /* address of RTEMS_ASR */ 58 Modes_Control mode_set; /* RTEMS_ASR mode */ 59 rtems_signal_set signals_posted; /* signal set */ 60 rtems_signal_set signals_pending; /* pending signal set */ 61 unsigned32 nest_level; /* nest level of RTEMS_ASR */ 62 62 } ASR_Information; 63 63 -
c/src/exec/rtems/headers/attr.h
r5250ff39 r7f6a24ab 28 28 /* constants */ 29 29 30 #define RTEMS_DEFAULT_ATTRIBUTES 30 #define RTEMS_DEFAULT_ATTRIBUTES 0x00000000 31 31 32 32 #define RTEMS_NO_FLOATING_POINT 0x00000000 /* don't use FP HW */ -
c/src/exec/rtems/headers/modes.h
r5250ff39 r7f6a24ab 29 29 */ 30 30 31 typedef unsigned32 rtems_mode;31 typedef unsigned32 Modes_Control; 32 32 33 33 /* … … 74 74 75 75 STATIC INLINE unsigned32 RTEMS_INTERRUPT_LEVEL ( 76 rtems_modemode_set76 Modes_Control mode_set 77 77 ); 78 78 … … 87 87 88 88 STATIC INLINE boolean _Modes_Mask_changed ( 89 rtems_modemode_set,90 rtems_modemasks89 Modes_Control mode_set, 90 Modes_Control masks 91 91 ); 92 92 … … 101 101 102 102 STATIC INLINE boolean _Modes_Is_asr_disabled ( 103 rtems_modemode_set103 Modes_Control mode_set 104 104 ); 105 105 … … 114 114 115 115 STATIC INLINE boolean _Modes_Is_preempt ( 116 rtems_modemode_set116 Modes_Control mode_set 117 117 ); 118 118 … … 127 127 128 128 STATIC INLINE boolean _Modes_Is_timeslice ( 129 rtems_modemode_set129 Modes_Control mode_set 130 130 ); 131 131 … … 139 139 140 140 STATIC INLINE ISR_Level _Modes_Get_interrupt_level ( 141 rtems_modemode_set141 Modes_Control mode_set 142 142 ); 143 143 … … 152 152 153 153 STATIC INLINE void _Modes_Set_interrupt_level ( 154 rtems_modemode_set154 Modes_Control mode_set 155 155 ); 156 156 … … 167 167 168 168 STATIC INLINE void _Modes_Change ( 169 rtems_modeold_mode_set,170 rtems_modenew_mode_set,171 rtems_modemask,172 rtems_mode*out_mode_set,173 rtems_mode*changed169 Modes_Control old_mode_set, 170 Modes_Control new_mode_set, 171 Modes_Control mask, 172 Modes_Control *out_mode_set, 173 Modes_Control *changed 174 174 ); 175 175 -
c/src/exec/rtems/headers/sem.h
r5250ff39 r7f6a24ab 83 83 84 84 rtems_status_code rtems_semaphore_create( 85 rtems_name name, 86 unsigned32 count, 87 rtems_attribute attribute_set, 88 Objects_Id *id 85 rtems_name name, 86 unsigned32 count, 87 rtems_attribute attribute_set, 88 rtems_task_priority priority_ceiling, 89 Objects_Id *id 89 90 ); 90 91 -
c/src/exec/rtems/headers/signal.h
r5250ff39 r7f6a24ab 32 32 #include <rtems/object.h> 33 33 #include <rtems/status.h> 34 #include <rtems/types.h> 34 35 35 36 /* … … 46 47 rtems_status_code rtems_signal_catch( 47 48 rtems_asr_entry asr_handler, 48 rtems_mode mode_set49 rtems_mode mode_set 49 50 ); 50 51 -
c/src/exec/rtems/headers/tasks.h
r5250ff39 r7f6a24ab 48 48 #include <rtems/thread.h> 49 49 #include <rtems/threadq.h> 50 #include <rtems/types.h> 50 51 51 52 /* … … 95 96 96 97 rtems_status_code rtems_task_create( 97 rtems_name name,98 rtems_task_priority 99 unsigned32 stack_size,100 rtems_mode initial_modes,101 rtems_attribute attribute_set,102 Objects_Id *id98 rtems_name name, 99 rtems_task_priority initial_priority, 100 unsigned32 stack_size, 101 rtems_mode initial_modes, 102 rtems_attribute attribute_set, 103 Objects_Id *id 103 104 ); 104 105 … … 238 239 239 240 rtems_status_code rtems_task_set_priority( 240 Objects_Id id,241 Objects_Id id, 241 242 rtems_task_priority new_priority, 242 243 rtems_task_priority *old_priority … … 325 326 ); 326 327 328 /* 329 * _RTEMS_Tasks_Priority_to_Core 330 * 331 * DESCRIPTION: 332 * 333 * This function converts an RTEMS API priority into a core priority. 334 */ 335 336 STATIC INLINE Priority_Control _RTEMS_Tasks_Priority_to_Core( 337 rtems_task_priority priority 338 ); 339 327 340 #include <rtems/tasks.inl> 328 341 #include <rtems/taskmp.h> -
c/src/exec/rtems/headers/types.h
r5250ff39 r7f6a24ab 22 22 23 23 #include <rtems/object.h> 24 #include <rtems/priority.h> 25 #include <rtems/modes.h> 24 26 25 27 /* … … 49 51 typedef CPU_Interrupt_frame rtems_interrupt_frame; 50 52 53 /* 54 * Define the type for an RTEMS API task priority. 55 */ 56 57 typedef Priority_Control rtems_task_priority; 58 59 #define RTEMS_NO_PRIORITY RTEMS_CURRENT_PRIORITY 60 /* 61 * Define the type for an RTEMS API task mode. 62 */ 63 64 typedef Modes_Control rtems_mode; 65 51 66 #ifdef __cplusplus 52 67 } -
c/src/exec/rtems/include/rtems/rtems/asr.h
r5250ff39 r7f6a24ab 55 55 56 56 typedef struct { 57 rtems_asr_entry 58 rtems_modemode_set; /* RTEMS_ASR mode */59 rtems_signal_set signals_posted; /* signal set */60 rtems_signal_set signals_pending; /* pending signal set */61 unsigned32 57 rtems_asr_entry handler; /* address of RTEMS_ASR */ 58 Modes_Control mode_set; /* RTEMS_ASR mode */ 59 rtems_signal_set signals_posted; /* signal set */ 60 rtems_signal_set signals_pending; /* pending signal set */ 61 unsigned32 nest_level; /* nest level of RTEMS_ASR */ 62 62 } ASR_Information; 63 63 -
c/src/exec/rtems/include/rtems/rtems/attr.h
r5250ff39 r7f6a24ab 28 28 /* constants */ 29 29 30 #define RTEMS_DEFAULT_ATTRIBUTES 30 #define RTEMS_DEFAULT_ATTRIBUTES 0x00000000 31 31 32 32 #define RTEMS_NO_FLOATING_POINT 0x00000000 /* don't use FP HW */ -
c/src/exec/rtems/include/rtems/rtems/modes.h
r5250ff39 r7f6a24ab 29 29 */ 30 30 31 typedef unsigned32 rtems_mode;31 typedef unsigned32 Modes_Control; 32 32 33 33 /* … … 74 74 75 75 STATIC INLINE unsigned32 RTEMS_INTERRUPT_LEVEL ( 76 rtems_modemode_set76 Modes_Control mode_set 77 77 ); 78 78 … … 87 87 88 88 STATIC INLINE boolean _Modes_Mask_changed ( 89 rtems_modemode_set,90 rtems_modemasks89 Modes_Control mode_set, 90 Modes_Control masks 91 91 ); 92 92 … … 101 101 102 102 STATIC INLINE boolean _Modes_Is_asr_disabled ( 103 rtems_modemode_set103 Modes_Control mode_set 104 104 ); 105 105 … … 114 114 115 115 STATIC INLINE boolean _Modes_Is_preempt ( 116 rtems_modemode_set116 Modes_Control mode_set 117 117 ); 118 118 … … 127 127 128 128 STATIC INLINE boolean _Modes_Is_timeslice ( 129 rtems_modemode_set129 Modes_Control mode_set 130 130 ); 131 131 … … 139 139 140 140 STATIC INLINE ISR_Level _Modes_Get_interrupt_level ( 141 rtems_modemode_set141 Modes_Control mode_set 142 142 ); 143 143 … … 152 152 153 153 STATIC INLINE void _Modes_Set_interrupt_level ( 154 rtems_modemode_set154 Modes_Control mode_set 155 155 ); 156 156 … … 167 167 168 168 STATIC INLINE void _Modes_Change ( 169 rtems_modeold_mode_set,170 rtems_modenew_mode_set,171 rtems_modemask,172 rtems_mode*out_mode_set,173 rtems_mode*changed169 Modes_Control old_mode_set, 170 Modes_Control new_mode_set, 171 Modes_Control mask, 172 Modes_Control *out_mode_set, 173 Modes_Control *changed 174 174 ); 175 175 -
c/src/exec/rtems/include/rtems/rtems/sem.h
r5250ff39 r7f6a24ab 83 83 84 84 rtems_status_code rtems_semaphore_create( 85 rtems_name name, 86 unsigned32 count, 87 rtems_attribute attribute_set, 88 Objects_Id *id 85 rtems_name name, 86 unsigned32 count, 87 rtems_attribute attribute_set, 88 rtems_task_priority priority_ceiling, 89 Objects_Id *id 89 90 ); 90 91 -
c/src/exec/rtems/include/rtems/rtems/signal.h
r5250ff39 r7f6a24ab 32 32 #include <rtems/object.h> 33 33 #include <rtems/status.h> 34 #include <rtems/types.h> 34 35 35 36 /* … … 46 47 rtems_status_code rtems_signal_catch( 47 48 rtems_asr_entry asr_handler, 48 rtems_mode mode_set49 rtems_mode mode_set 49 50 ); 50 51 -
c/src/exec/rtems/include/rtems/rtems/tasks.h
r5250ff39 r7f6a24ab 48 48 #include <rtems/thread.h> 49 49 #include <rtems/threadq.h> 50 #include <rtems/types.h> 50 51 51 52 /* … … 95 96 96 97 rtems_status_code rtems_task_create( 97 rtems_name name,98 rtems_task_priority 99 unsigned32 stack_size,100 rtems_mode initial_modes,101 rtems_attribute attribute_set,102 Objects_Id *id98 rtems_name name, 99 rtems_task_priority initial_priority, 100 unsigned32 stack_size, 101 rtems_mode initial_modes, 102 rtems_attribute attribute_set, 103 Objects_Id *id 103 104 ); 104 105 … … 238 239 239 240 rtems_status_code rtems_task_set_priority( 240 Objects_Id id,241 Objects_Id id, 241 242 rtems_task_priority new_priority, 242 243 rtems_task_priority *old_priority … … 325 326 ); 326 327 328 /* 329 * _RTEMS_Tasks_Priority_to_Core 330 * 331 * DESCRIPTION: 332 * 333 * This function converts an RTEMS API priority into a core priority. 334 */ 335 336 STATIC INLINE Priority_Control _RTEMS_Tasks_Priority_to_Core( 337 rtems_task_priority priority 338 ); 339 327 340 #include <rtems/tasks.inl> 328 341 #include <rtems/taskmp.h> -
c/src/exec/rtems/include/rtems/rtems/types.h
r5250ff39 r7f6a24ab 22 22 23 23 #include <rtems/object.h> 24 #include <rtems/priority.h> 25 #include <rtems/modes.h> 24 26 25 27 /* … … 49 51 typedef CPU_Interrupt_frame rtems_interrupt_frame; 50 52 53 /* 54 * Define the type for an RTEMS API task priority. 55 */ 56 57 typedef Priority_Control rtems_task_priority; 58 59 #define RTEMS_NO_PRIORITY RTEMS_CURRENT_PRIORITY 60 /* 61 * Define the type for an RTEMS API task mode. 62 */ 63 64 typedef Modes_Control rtems_mode; 65 51 66 #ifdef __cplusplus 52 67 } -
c/src/exec/rtems/inline/modes.inl
r5250ff39 r7f6a24ab 24 24 25 25 STATIC INLINE unsigned32 RTEMS_INTERRUPT_LEVEL ( 26 rtems_modemode_set26 Modes_Control mode_set 27 27 ) 28 28 { … … 37 37 38 38 STATIC INLINE boolean _Modes_Mask_changed ( 39 rtems_modemode_set,40 rtems_modemasks39 Modes_Control mode_set, 40 Modes_Control masks 41 41 ) 42 42 { … … 51 51 52 52 STATIC INLINE boolean _Modes_Is_asr_disabled ( 53 rtems_modemode_set53 Modes_Control mode_set 54 54 ) 55 55 { … … 64 64 65 65 STATIC INLINE boolean _Modes_Is_preempt ( 66 rtems_modemode_set66 Modes_Control mode_set 67 67 ) 68 68 { … … 77 77 78 78 STATIC INLINE boolean _Modes_Is_timeslice ( 79 rtems_modemode_set79 Modes_Control mode_set 80 80 ) 81 81 { … … 91 91 92 92 STATIC INLINE ISR_Level _Modes_Get_interrupt_level ( 93 rtems_modemode_set93 Modes_Control mode_set 94 94 ) 95 95 { … … 104 104 105 105 STATIC INLINE void _Modes_Set_interrupt_level ( 106 rtems_modemode_set106 Modes_Control mode_set 107 107 ) 108 108 { … … 117 117 118 118 STATIC INLINE void _Modes_Change ( 119 rtems_modeold_mode_set,120 rtems_modenew_mode_set,121 rtems_modemask,122 rtems_mode*out_mode_set,123 rtems_mode*changed119 Modes_Control old_mode_set, 120 Modes_Control new_mode_set, 121 Modes_Control mask, 122 Modes_Control *out_mode_set, 123 Modes_Control *changed 124 124 ) 125 125 { 126 rtems_mode_out_mode;126 Modes_Control _out_mode; 127 127 128 128 _out_mode = old_mode_set; -
c/src/exec/rtems/inline/rtems/rtems/modes.inl
r5250ff39 r7f6a24ab 24 24 25 25 STATIC INLINE unsigned32 RTEMS_INTERRUPT_LEVEL ( 26 rtems_modemode_set26 Modes_Control mode_set 27 27 ) 28 28 { … … 37 37 38 38 STATIC INLINE boolean _Modes_Mask_changed ( 39 rtems_modemode_set,40 rtems_modemasks39 Modes_Control mode_set, 40 Modes_Control masks 41 41 ) 42 42 { … … 51 51 52 52 STATIC INLINE boolean _Modes_Is_asr_disabled ( 53 rtems_modemode_set53 Modes_Control mode_set 54 54 ) 55 55 { … … 64 64 65 65 STATIC INLINE boolean _Modes_Is_preempt ( 66 rtems_modemode_set66 Modes_Control mode_set 67 67 ) 68 68 { … … 77 77 78 78 STATIC INLINE boolean _Modes_Is_timeslice ( 79 rtems_modemode_set79 Modes_Control mode_set 80 80 ) 81 81 { … … 91 91 92 92 STATIC INLINE ISR_Level _Modes_Get_interrupt_level ( 93 rtems_modemode_set93 Modes_Control mode_set 94 94 ) 95 95 { … … 104 104 105 105 STATIC INLINE void _Modes_Set_interrupt_level ( 106 rtems_modemode_set106 Modes_Control mode_set 107 107 ) 108 108 { … … 117 117 118 118 STATIC INLINE void _Modes_Change ( 119 rtems_modeold_mode_set,120 rtems_modenew_mode_set,121 rtems_modemask,122 rtems_mode*out_mode_set,123 rtems_mode*changed119 Modes_Control old_mode_set, 120 Modes_Control new_mode_set, 121 Modes_Control mask, 122 Modes_Control *out_mode_set, 123 Modes_Control *changed 124 124 ) 125 125 { 126 rtems_mode_out_mode;126 Modes_Control _out_mode; 127 127 128 128 _out_mode = old_mode_set; -
c/src/exec/rtems/inline/rtems/rtems/tasks.inl
r5250ff39 r7f6a24ab 44 44 ) 45 45 { 46 _Objects_Free( &_RTEMS_tasks_Information, &the_task->Object ); 46 _Objects_Free( 47 _Objects_Get_information( the_task->Object.id ), 48 &the_task->Object 49 ); 47 50 } 48 51 … … 62 65 state = the_thread->current_state; 63 66 67 /* XXX do this with the object class */ 64 68 if ( _States_Is_waiting_on_thread_queue( state ) ) { 65 69 if ( _States_Is_waiting_for_rpc_reply( state ) && … … 92 96 } 93 97 98 /*PAGE 99 * 100 * _RTEMS_Tasks_Priority_to_Core 101 */ 102 103 STATIC INLINE Priority_Control _RTEMS_Tasks_Priority_to_Core( 104 rtems_task_priority priority 105 ) 106 { 107 return (Priority_Control) priority; 108 } 109 94 110 #endif 95 111 /* end of include file */ -
c/src/exec/rtems/inline/tasks.inl
r5250ff39 r7f6a24ab 44 44 ) 45 45 { 46 _Objects_Free( &_RTEMS_tasks_Information, &the_task->Object ); 46 _Objects_Free( 47 _Objects_Get_information( the_task->Object.id ), 48 &the_task->Object 49 ); 47 50 } 48 51 … … 62 65 state = the_thread->current_state; 63 66 67 /* XXX do this with the object class */ 64 68 if ( _States_Is_waiting_on_thread_queue( state ) ) { 65 69 if ( _States_Is_waiting_for_rpc_reply( state ) && … … 92 96 } 93 97 98 /*PAGE 99 * 100 * _RTEMS_Tasks_Priority_to_Core 101 */ 102 103 STATIC INLINE Priority_Control _RTEMS_Tasks_Priority_to_Core( 104 rtems_task_priority priority 105 ) 106 { 107 return (Priority_Control) priority; 108 } 109 94 110 #endif 95 111 /* end of include file */ -
c/src/exec/rtems/macros/modes.inl
r5250ff39 r7f6a24ab 89 89 #define _Modes_Change( _old_mode_set, _new_mode_set, \ 90 90 _mask, _out_mode_set, _changed ) \ 91 { rtems_mode_out_mode; \91 { Modes_Control _out_mode; \ 92 92 \ 93 93 _out_mode = (_old_mode_set); \ -
c/src/exec/rtems/macros/rtems/rtems/modes.inl
r5250ff39 r7f6a24ab 89 89 #define _Modes_Change( _old_mode_set, _new_mode_set, \ 90 90 _mask, _out_mode_set, _changed ) \ 91 { rtems_mode_out_mode; \91 { Modes_Control _out_mode; \ 92 92 \ 93 93 _out_mode = (_old_mode_set); \ -
c/src/exec/rtems/macros/rtems/rtems/tasks.inl
r5250ff39 r7f6a24ab 84 84 } 85 85 86 /*PAGE 87 * 88 * _RTEMS_Tasks_Priority_to_Core 89 */ 90 91 #define _RTEMS_Tasks_Priority_to_Core( _priority ) \ 92 ((Priority_Control) (_priority)) 93 86 94 #endif 87 95 /* end of include file */ -
c/src/exec/rtems/macros/tasks.inl
r5250ff39 r7f6a24ab 84 84 } 85 85 86 /*PAGE 87 * 88 * _RTEMS_Tasks_Priority_to_Core 89 */ 90 91 #define _RTEMS_Tasks_Priority_to_Core( _priority ) \ 92 ((Priority_Control) (_priority)) 93 86 94 #endif 87 95 /* end of include file */ -
c/src/exec/rtems/optman/no-sem.c
r5250ff39 r7f6a24ab 32 32 33 33 rtems_status_code rtems_semaphore_create( 34 rtems_name name, 35 unsigned32 count, 36 rtems_attribute attribute_set, 37 Objects_Id *id 34 rtems_name name, 35 unsigned32 count, 36 rtems_attribute attribute_set, 37 rtems_task_priority priority_ceiling, 38 Objects_Id *id 38 39 ) 39 40 { -
c/src/exec/rtems/optman/no-signal.c
r5250ff39 r7f6a24ab 23 23 rtems_status_code rtems_signal_catch( 24 24 rtems_asr_entry handler, 25 rtems_mode mode_set25 rtems_mode mode_set 26 26 ) 27 27 { … … 30 30 31 31 rtems_status_code rtems_signal_send( 32 Objects_Idid,32 rtems_id id, 33 33 rtems_signal_set signal_set 34 34 ) -
c/src/exec/rtems/src/event.c
r5250ff39 r7f6a24ab 57 57 ); 58 58 case OBJECTS_LOCAL: 59 _Event_sets_Post( event_in, &the_thread-> pending_events );59 _Event_sets_Post( event_in, &the_thread->RTEMS_API->pending_events ); 60 60 _Event_Surrender( the_thread ); 61 61 _Thread_Enable_dispatch(); … … 92 92 { 93 93 if ( _Event_sets_Is_empty( event_in ) ) { 94 *event_out = _Thread_Executing-> pending_events;94 *event_out = _Thread_Executing->RTEMS_API->pending_events; 95 95 return( RTEMS_SUCCESSFUL ); 96 96 } … … 99 99 _Event_Seize( event_in, option_set, ticks ); 100 100 _Thread_Enable_dispatch(); 101 *event_out = _Thread_Executing-> events_out;101 *event_out = _Thread_Executing->RTEMS_API->events_out; 102 102 return( _Thread_Executing->Wait.return_code ); 103 103 } -
c/src/exec/rtems/src/mp.c
r5250ff39 r7f6a24ab 59 59 _Event_sets_Post( 60 60 RTEMS_EVENT_0, 61 &_Internal_threads_System_initialization_thread-> pending_events61 &_Internal_threads_System_initialization_thread->RTEMS_API->pending_events 62 62 ); 63 63 _Event_Surrender( _Internal_threads_System_initialization_thread ); -
c/src/exec/rtems/src/msg.c
r5250ff39 r7f6a24ab 182 182 183 183 if ( _Attributes_Is_global( attribute_set ) && 184 !( _Objects_MP_ Open( &_Message_queue_Information, name,184 !( _Objects_MP_Allocate_and_open( &_Message_queue_Information, name, 185 185 the_message_queue->Object.id, FALSE ) ) ) { 186 186 _Message_queue_Free( the_message_queue ); … … 196 196 _Chain_Initialize_empty( &the_message_queue->Pending_messages ); 197 197 198 _Thread_queue_Initialize( &the_message_queue->Wait_queue, attribute_set, 199 STATES_WAITING_FOR_MESSAGE ); 198 _Thread_queue_Initialize( 199 &the_message_queue->Wait_queue, 200 OBJECTS_RTEMS_MESSAGE_QUEUES, 201 _Attributes_Is_priority( attribute_set ) ? 202 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, 203 STATES_WAITING_FOR_MESSAGE, 204 _Message_queue_MP_Send_extract_proxy 205 ); 200 206 201 207 _Objects_Open( -
c/src/exec/rtems/src/msgmp.c
r5250ff39 r7f6a24ab 260 260 case MESSAGE_QUEUE_MP_ANNOUNCE_CREATE: 261 261 262 ignored = _Objects_MP_ Open(262 ignored = _Objects_MP_Allocate_and_open( 263 263 &_Message_queue_Information, 264 264 the_packet->name, -
c/src/exec/rtems/src/part.c
r5250ff39 r7f6a24ab 108 108 109 109 if ( _Attributes_Is_global( attribute_set ) && 110 !( _Objects_MP_ Open( &_Partition_Information, name,110 !( _Objects_MP_Allocate_and_open( &_Partition_Information, name, 111 111 the_partition->Object.id, FALSE ) ) ) { 112 112 _Partition_Free( the_partition ); -
c/src/exec/rtems/src/partmp.c
r5250ff39 r7f6a24ab 185 185 case PARTITION_MP_ANNOUNCE_CREATE: 186 186 187 ignored = _Objects_MP_ Open(187 ignored = _Objects_MP_Allocate_and_open( 188 188 &_Partition_Information, 189 189 the_packet->name, -
c/src/exec/rtems/src/region.c
r5250ff39 r7f6a24ab 114 114 115 115 _Thread_queue_Initialize( 116 &the_region->Wait_queue, attribute_set, STATES_WAITING_FOR_SEGMENT ); 116 &the_region->Wait_queue, 117 OBJECTS_RTEMS_REGIONS, 118 _Attributes_Is_priority( attribute_set ) ? 119 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, 120 STATES_WAITING_FOR_SEGMENT, 121 _Region_MP_Send_extract_proxy 122 ); 117 123 118 124 _Objects_Open( &_Region_Information, &the_region->Object, &name ); -
c/src/exec/rtems/src/regionmp.c
r5250ff39 r7f6a24ab 191 191 case REGION_MP_ANNOUNCE_CREATE: 192 192 193 ignored = _Objects_MP_ Open(193 ignored = _Objects_MP_Allocate_and_open( 194 194 &_Region_Information, 195 195 the_packet->name, -
c/src/exec/rtems/src/sem.c
r5250ff39 r7f6a24ab 88 88 89 89 rtems_status_code rtems_semaphore_create( 90 rtems_name name, 91 unsigned32 count, 92 rtems_attribute attribute_set, 93 Objects_Id *id 90 rtems_name name, 91 unsigned32 count, 92 rtems_attribute attribute_set, 93 rtems_task_priority priority_ceiling, 94 Objects_Id *id 94 95 ) 95 96 { … … 128 129 129 130 if ( _Attributes_Is_global( attribute_set ) && 130 !( _Objects_MP_ Open( &_Semaphore_Information, name,131 !( _Objects_MP_Allocate_and_open( &_Semaphore_Information, name, 131 132 the_semaphore->Object.id, FALSE ) ) ) { 132 133 _Semaphore_Free( the_semaphore ); … … 149 150 } 150 151 151 _Thread_queue_Initialize( &the_semaphore->Wait_queue, 152 attribute_set, STATES_WAITING_FOR_SEMAPHORE ); 152 _Thread_queue_Initialize( 153 &the_semaphore->Wait_queue, 154 OBJECTS_RTEMS_SEMAPHORES, 155 _Attributes_Is_priority( attribute_set ) ? 156 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, 157 STATES_WAITING_FOR_SEMAPHORE, 158 _Semaphore_MP_Send_extract_proxy 159 ); 153 160 154 161 _Objects_Open( &_Semaphore_Information, &the_semaphore->Object, &name ); -
c/src/exec/rtems/src/semmp.c
r5250ff39 r7f6a24ab 188 188 case SEMAPHORE_MP_ANNOUNCE_CREATE: 189 189 190 ignored = _Objects_MP_ Open(190 ignored = _Objects_MP_Allocate_and_open( 191 191 &_Semaphore_Information, 192 192 the_packet->name, -
c/src/exec/rtems/src/signal.c
r5250ff39 r7f6a24ab 38 38 39 39 rtems_status_code rtems_signal_catch( 40 rtems_asr_entry handler,41 rtems_mode mode_set40 rtems_asr_entry asr_handler, 41 rtems_mode mode_set 42 42 ) 43 43 { 44 44 Thread_Control *executing; 45 45 46 /* XXX normalize mode */ 46 47 executing = _Thread_Executing; 47 48 _Thread_Disable_dispatch(); /* cannot reschedule while */ 48 49 /* the thread is inconsistent */ 49 50 50 if ( ! _ASR_Is_null_handler(handler ) ) {51 executing-> Signal.mode_set = mode_set;52 executing-> Signal.handler =handler;51 if ( !_ASR_Is_null_handler( asr_handler ) ) { 52 executing->RTEMS_API->Signal.mode_set = mode_set; 53 executing->RTEMS_API->Signal.handler = asr_handler; 53 54 } 54 55 else 55 _ASR_Initialize( &executing-> Signal );56 _ASR_Initialize( &executing->RTEMS_API->Signal ); 56 57 _Thread_Enable_dispatch(); 57 58 return( RTEMS_SUCCESSFUL ); … … 92 93 ); 93 94 case OBJECTS_LOCAL: 94 if ( ! _ASR_Is_null_handler( the_thread-> Signal.handler ) ) {95 if ( ! _ASR_Is_null_handler( the_thread->RTEMS_API->Signal.handler ) ) { 95 96 if ( _Modes_Is_asr_disabled( the_thread->current_modes ) ) 96 _ASR_Post_signals( signal_set, &the_thread->Signal.signals_pending ); 97 _ASR_Post_signals( 98 signal_set, &the_thread->RTEMS_API->Signal.signals_pending ); 97 99 else { 98 _ASR_Post_signals( signal_set, &the_thread->Signal.signals_posted ); 100 _ASR_Post_signals( 101 signal_set, &the_thread->RTEMS_API->Signal.signals_posted ); 99 102 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 100 103 _ISR_Signals_to_thread_executing = TRUE; -
c/src/exec/rtems/src/taskmp.c
r5250ff39 r7f6a24ab 194 194 case RTEMS_TASKS_MP_ANNOUNCE_CREATE: 195 195 196 ignored = _Objects_MP_ Open(196 ignored = _Objects_MP_Allocate_and_open( 197 197 &_RTEMS_tasks_Information, 198 198 the_packet->name, -
c/src/exec/rtems/src/tasks.c
r5250ff39 r7f6a24ab 87 87 { 88 88 register Thread_Control *the_thread; 89 unsigned32 actual_stack_size;90 unsigned32 memory_needed;91 void *memory;89 Objects_MP_Control *the_global_object = NULL; 90 boolean is_fp; 91 boolean is_global; 92 92 rtems_attribute the_attribute_set; 93 Priority_Control core_priority; 94 93 95 94 96 if ( !rtems_is_name_valid( name ) ) 95 97 return ( RTEMS_INVALID_NAME ); 98 99 /* 100 * Core Thread Initialize insures we get the minimum amount of 101 * stack space. 102 */ 96 103 97 104 #if 0 … … 100 107 #endif 101 108 102 if ( !_Stack_Is_enough( stack_size ) ) 103 actual_stack_size = RTEMS_MINIMUM_STACK_SIZE; 104 else 105 actual_stack_size = stack_size; 109 /* 110 * Validate the RTEMS API priority and convert it to the core priority range. 111 */ 106 112 107 113 if ( !_Priority_Is_valid( initial_priority ) ) 108 114 return( RTEMS_INVALID_PRIORITY ); 115 116 core_priority = _RTEMS_Tasks_Priority_to_Core( initial_priority ); 109 117 110 118 /* … … 121 129 _Attributes_Clear( the_attribute_set, ATTRIBUTES_NOT_SUPPORTED ); 122 130 123 if ( _Attributes_Is_global( the_attribute_set ) && 124 !_Configuration_Is_multiprocessing() ) 125 return( RTEMS_MP_NOT_CONFIGURED ); 126 127 _Thread_Disable_dispatch(); /* to prevent deletion */ 131 if ( _Attributes_Is_floating_point( the_attribute_set ) ) 132 is_fp = TRUE; 133 else 134 is_fp = FALSE; 135 136 if ( _Attributes_Is_global( the_attribute_set ) ) { 137 138 is_global = TRUE; 139 140 if ( !_Configuration_Is_multiprocessing() ) 141 return( RTEMS_MP_NOT_CONFIGURED ); 142 143 } else 144 is_global = FALSE; 145 146 /* 147 * Make sure system is MP if this task is global 148 */ 149 150 /* 151 * Disable dispatch for protection 152 */ 153 154 _Thread_Disable_dispatch(); 155 156 /* 157 * Allocate the thread control block and -- if the task is global -- 158 * allocate a global object control block. 159 * 160 * NOTE: This routine does not use the combined allocate and open 161 * global object routine because this results in a lack of 162 * control over when memory is allocated and can be freed in 163 * the event of an error. 164 */ 128 165 129 166 the_thread = _RTEMS_tasks_Allocate(); … … 134 171 } 135 172 136 actual_stack_size = _Stack_Adjust_size( actual_stack_size ); 137 memory_needed = actual_stack_size; 138 139 if ( _Attributes_Is_floating_point( the_attribute_set ) ) 140 memory_needed += CONTEXT_FP_SIZE; 141 142 memory = _Workspace_Allocate( memory_needed ); 143 144 if ( !memory ) { 173 if ( is_global ) { 174 the_global_object = _Objects_MP_Allocate_global_object(); 175 176 if ( _Objects_MP_Is_null_global_object( the_global_object ) ) { 177 _RTEMS_tasks_Free( the_thread ); 178 _Thread_Enable_dispatch(); 179 return( RTEMS_TOO_MANY ); 180 } 181 } 182 183 #if 0 184 /* 185 * Allocate and initialize the RTEMS API specific information 186 */ 187 188 the_thread->RTEMS_API = _Workspace_Allocate( sizeof( RTEMS_API_Control ) ); 189 190 if ( !the_thread->RTEMS_API ) { 191 _RTEMS_tasks_Free( the_thread ); 192 if ( is_global ) 193 _Objects_MP_Free_global_object( the_global_object ); 194 _Thread_Enable_dispatch(); 195 return( RTEMS_UNSATISFIED ); 196 } 197 198 the_thread->RTEMS_API->pending_events = EVENT_SETS_NONE_PENDING; 199 _ASR_Initialize( &the_thread->RTEMS_API->Signal ); 200 #endif 201 202 /* 203 * Initialize the core thread for this task. 204 */ 205 206 /* XXX normalize mode */ 207 208 if ( !_Thread_Initialize( &_RTEMS_tasks_Information, the_thread, 209 NULL, stack_size, is_fp, core_priority, initial_modes, &name ) ) { 210 if ( is_global ) 211 _Objects_MP_Free_global_object( the_global_object ); 145 212 _RTEMS_tasks_Free( the_thread ); 146 213 _Thread_Enable_dispatch(); … … 148 215 } 149 216 150 /*151 * Stack is put in the lower address regions of the allocated memory.152 * The optional floating point context area goes into the higher part153 * of the allocated memory.154 */155 156 _Stack_Initialize(157 &the_thread->Start.Initial_stack, memory, actual_stack_size );158 159 if ( _Attributes_Is_floating_point( the_attribute_set ) )160 the_thread->fp_context = _Context_Fp_start( memory, actual_stack_size );161 else162 the_thread->fp_context = NULL;163 164 the_thread->Start.fp_context = the_thread->fp_context;165 166 if ( _Attributes_Is_global( the_attribute_set ) &&167 !( _Objects_MP_Open( &_RTEMS_tasks_Information, name,168 the_thread->Object.id, FALSE ) ) ) {169 _RTEMS_tasks_Free( the_thread );170 (void) _Workspace_Free( memory );171 _Thread_Enable_dispatch();172 return( RTEMS_TOO_MANY );173 }174 175 the_thread->attribute_set = the_attribute_set;176 the_thread->current_state = STATES_DORMANT;177 the_thread->current_modes = initial_modes;178 the_thread->pending_events = EVENT_SETS_NONE_PENDING;179 the_thread->resource_count = 0;180 the_thread->real_priority = initial_priority;181 the_thread->Start.initial_priority = initial_priority;182 the_thread->Start.initial_modes = initial_modes;183 184 _Thread_Set_priority( the_thread, initial_priority );185 186 _ASR_Initialize( &the_thread->Signal );187 188 _Objects_Open( &_RTEMS_tasks_Information, &the_thread->Object, &name );189 190 217 *id = the_thread->Object.id; 191 218 192 _User_extensions_Task_create( the_thread ); 193 194 if ( _Attributes_Is_global( the_attribute_set ) ) 219 if ( is_global ) { 220 221 the_thread->RTEMS_API->is_global = TRUE; 222 223 _Objects_MP_Open( 224 &_RTEMS_tasks_Information, 225 the_global_object, 226 name, 227 the_thread->Object.id 228 ); 229 195 230 _RTEMS_tasks_MP_Send_process_packet( 196 231 RTEMS_TASKS_MP_ANNOUNCE_CREATE, … … 199 234 ); 200 235 236 } 237 201 238 _Thread_Enable_dispatch(); 202 239 return( RTEMS_SUCCESSFUL ); … … 253 290 254 291 rtems_status_code rtems_task_start( 255 Objects_Idid,292 rtems_id id, 256 293 rtems_task_entry entry_point, 257 unsigned32 argument294 unsigned32 argument 258 295 ) 259 296 { … … 272 309 return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT ); 273 310 case OBJECTS_LOCAL: 274 if ( _States_Is_dormant( the_thread->current_state ) ) { 275 276 the_thread->Start.entry_point = entry_point; 277 the_thread->Start.initial_argument = argument; 278 279 _Thread_Load_environment( the_thread ); 280 281 _Thread_Ready( the_thread ); 282 283 _User_extensions_Task_start( the_thread ); 284 311 if ( _Thread_Start( 312 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { 285 313 _Thread_Enable_dispatch(); 286 314 return( RTEMS_SUCCESSFUL ); … … 317 345 { 318 346 register Thread_Control *the_thread; 319 Objects_Locations 347 Objects_Locations location; 320 348 321 349 the_thread = _Thread_Get( id, &location ); … … 327 355 return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT ); 328 356 case OBJECTS_LOCAL: 329 if ( !_States_Is_dormant( the_thread->current_state ) ) { 330 331 _Thread_Set_transient( the_thread ); 332 _ASR_Initialize( &the_thread->Signal ); 333 the_thread->pending_events = EVENT_SETS_NONE_PENDING; 334 the_thread->resource_count = 0; 335 the_thread->current_modes = the_thread->Start.initial_modes; 336 the_thread->Start.initial_argument = argument; 337 338 _RTEMS_tasks_Cancel_wait( the_thread ); 339 340 if ( the_thread->current_priority != 341 the_thread->Start.initial_priority ) { 342 the_thread->real_priority = the_thread->Start.initial_priority; 343 _Thread_Set_priority( the_thread, 344 the_thread->Start.initial_priority ); 345 } 346 347 _Thread_Load_environment( the_thread ); 348 349 _Thread_Ready( the_thread ); 350 351 _User_extensions_Task_restart( the_thread ); 352 353 if ( _Thread_Is_executing ( the_thread ) ) 354 _Thread_Restart_self(); 357 if ( _Thread_Restart( the_thread, NULL, argument ) ) { 358 359 /* XXX until these are in an API extension they are too late. */ 360 _ASR_Initialize( &the_thread->RTEMS_API->Signal ); 361 the_thread->RTEMS_API->pending_events = EVENT_SETS_NONE_PENDING; 355 362 356 363 _Thread_Enable_dispatch(); … … 397 404 return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT ); 398 405 case OBJECTS_LOCAL: 399 _Objects_Close( &_RTEMS_tasks_Information, &the_thread->Object ); 400 401 _Thread_Set_state( the_thread, STATES_TRANSIENT ); 402 403 _User_extensions_Task_delete( the_thread ); 404 405 #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) 406 if ( _Thread_Is_allocated_fp( the_thread ) ) 407 _Thread_Deallocate_fp(); 408 #endif 409 the_thread->fp_context = NULL; 410 411 _RTEMS_tasks_Cancel_wait( the_thread ); 412 413 (void) _Workspace_Free( the_thread->Start.Initial_stack.area ); 406 _Thread_Close( &_RTEMS_tasks_Information, the_thread ); 407 408 /* XXX */ 409 (void) _Workspace_Free( the_thread->RTEMS_API ); 414 410 415 411 _RTEMS_tasks_Free( the_thread ); 416 412 417 if ( _Attributes_Is_global( the_thread-> attribute_set) ) {413 if ( _Attributes_Is_global( the_thread->RTEMS_API->is_global ) ) { 418 414 419 415 _Objects_MP_Close( &_RTEMS_tasks_Information, the_thread->Object.id ); … … 552 548 553 549 rtems_status_code rtems_task_set_priority( 554 Objects_Id id,550 Objects_Id id, 555 551 rtems_task_priority new_priority, 556 552 rtems_task_priority *old_priority … … 663 659 if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 664 660 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 665 *note = _Thread_Executing-> Notepads[ notepad ];661 *note = _Thread_Executing->RTEMS_API->Notepads[ notepad ]; 666 662 return( RTEMS_SUCCESSFUL ); 667 663 } … … 682 678 ); 683 679 case OBJECTS_LOCAL: 684 *note= the_thread-> Notepads[ notepad ];680 *note= the_thread->RTEMS_API->Notepads[ notepad ]; 685 681 _Thread_Enable_dispatch(); 686 682 return( RTEMS_SUCCESSFUL ); … … 730 726 if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 731 727 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 732 _Thread_Executing-> Notepads[ notepad ] = note;728 _Thread_Executing->RTEMS_API->Notepads[ notepad ] = note; 733 729 return( RTEMS_SUCCESSFUL ); 734 730 } … … 748 744 749 745 case OBJECTS_LOCAL: 750 the_thread-> Notepads[ notepad ] = note;746 the_thread->RTEMS_API->Notepads[ notepad ] = note; 751 747 _Thread_Enable_dispatch(); 752 748 return( RTEMS_SUCCESSFUL ); -
c/src/exec/score/headers/mppkt.h
r5250ff39 r7f6a24ab 65 65 Objects_Id id; 66 66 Objects_Id source_tid; 67 rtems_task_prioritysource_priority;67 Priority_Control source_priority; 68 68 rtems_status_code return_code; 69 69 unsigned32 length; -
c/src/exec/score/headers/object.h
r5250ff39 r7f6a24ab 350 350 351 351 /* 352 * _Objects_Get_information 353 * 354 * DESCRIPTION: 355 * 356 * Returns the information control block for the class of objects 357 * corresponding to this id. 358 */ 359 360 Objects_Information *_Objects_Get_information( 361 Objects_Id id 362 ); 363 364 /* 352 365 * _Objects_Build_id 353 366 * … … 405 418 406 419 /* 420 * _Objects_Is_class_valid 421 * 422 * DESCRIPTION: 423 * 424 * This function returns TRUE if the class is valid. 425 * 426 */ 427 428 STATIC INLINE boolean _Objects_Is_class_valid( 429 Objects_Classes the_class 430 ); 431 432 /* 407 433 * _Objects_Is_local_node 408 434 * -
c/src/exec/score/headers/objectmp.h
r5250ff39 r7f6a24ab 82 82 ); 83 83 84 /*PAGE 85 * 86 * _Objects_MP_Open 87 * 88 * DESCRIPTION: 89 * 90 * This routine place the specified global object in the 91 * specified information table. 92 */ 93 94 void _Objects_MP_Open ( 95 Objects_Information *information, 96 Objects_MP_Control *the_global_object, 97 unsigned32 the_name, /* XXX -- wrong for variable */ 98 Objects_Id the_id 99 ); 100 84 101 /* 85 * _Objects_MP_ Open102 * _Objects_MP_Allocate_and_open 86 103 * 87 104 * DESCRIPTION: … … 93 110 */ 94 111 95 boolean _Objects_MP_ Open (112 boolean _Objects_MP_Allocate_and_open ( 96 113 Objects_Information *information, 97 114 unsigned32 the_name, /* XXX -- wrong for variable length */ -
c/src/exec/score/headers/priority.h
r5250ff39 r7f6a24ab 30 30 */ 31 31 32 typedef unsigned32 rtems_task_priority;32 typedef unsigned32 Priority_Control; 33 33 34 34 #define RTEMS_MINIMUM_PRIORITY 1 /* highest thread priority */ … … 93 93 94 94 STATIC INLINE boolean _Priority_Is_valid ( 95 rtems_task_prioritythe_priority95 Priority_Control the_priority 96 96 ); 97 97 … … 105 105 106 106 STATIC INLINE unsigned32 _Priority_Major ( 107 rtems_task_prioritythe_priority107 Priority_Control the_priority 108 108 ); 109 109 … … 117 117 118 118 STATIC INLINE unsigned32 _Priority_Minor ( 119 rtems_task_prioritythe_priority119 Priority_Control the_priority 120 120 ); 121 121 … … 156 156 */ 157 157 158 STATIC INLINE rtems_task_priority_Priority_Get_highest( void );158 STATIC INLINE Priority_Control _Priority_Get_highest( void ); 159 159 160 160 /* … … 170 170 STATIC INLINE void _Priority_Initialize_information( 171 171 Priority_Information *the_priority_map, 172 rtems_task_prioritynew_priority172 Priority_Control new_priority 173 173 ); 174 174 … … 183 183 184 184 STATIC INLINE boolean _Priority_Is_group_empty ( 185 rtems_task_prioritythe_priority185 Priority_Control the_priority 186 186 ); 187 187 -
c/src/exec/score/headers/thread.h
r5250ff39 r7f6a24ab 87 87 ); 88 88 89 typedef Thread ( *Thread_Entry )( 90 Thread_Argument 91 ); 89 typedef Thread ( *Thread_Entry )( ); 92 90 93 91 /* … … 96 94 */ 97 95 96 typedef enum { 97 THREAD_START_NUMERIC, 98 THREAD_START_POINTER, 99 THREAD_START_BOTH_POINTER_FIRST, 100 THREAD_START_BOTH_NUMERIC_FIRST 101 } Thread_Start_types; 102 98 103 typedef struct { 99 104 Thread_Entry entry_point; /* starting thread address */ 100 unsigned32 initial_argument; /* initial argument */ 101 rtems_mode initial_modes; /* initial mode */ 102 rtems_task_priority initial_priority; /* initial priority */ 105 Thread_Start_types prototype; /* how task is invoked */ 106 void *pointer_argument; /* pointer argument */ 107 unsigned32 numeric_argument; /* numeric argument */ 108 Modes_Control initial_modes; /* initial mode */ 109 Priority_Control initial_priority; /* initial priority */ 110 Stack_Control Initial_stack; /* stack information */ 103 111 void *fp_context; /* initial FP context area address */ 104 Stack_Control Initial_stack; /* stack information*/112 void *stack; /* initial FP context area address */ 105 113 } Thread_Start_information; 106 114 … … 135 143 Objects_Control Object; 136 144 States_Control current_state; 137 rtems_task_prioritycurrent_priority;138 rtems_task_priorityreal_priority;145 Priority_Control current_priority; 146 Priority_Control real_priority; 139 147 unsigned32 resource_count; 140 148 Thread_Wait_information Wait; … … 154 162 */ 155 163 164 /* XXX structure in wrong file .. API .. not core */ 165 166 typedef struct { 167 boolean is_global; 168 unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ]; 169 rtems_event_set pending_events; 170 rtems_event_set events_out; 171 ASR_Information Signal; 172 } RTEMS_API_Control; 173 156 174 typedef struct { 157 175 Objects_Control Object; 158 176 States_Control current_state; 159 rtems_task_prioritycurrent_priority;160 rtems_task_priorityreal_priority;177 Priority_Control current_priority; 178 Priority_Control real_priority; 161 179 unsigned32 resource_count; 162 180 Thread_Wait_information Wait; … … 166 184 Chain_Control *ready; 167 185 Priority_Information Priority_map; 168 rtems_event_set pending_events;169 rtems_event_set events_out;170 186 Thread_Start_information Start; 171 ASR_Information Signal; 172 rtems_mode current_modes; 173 rtems_attribute attribute_set; 187 Modes_Control current_modes; 174 188 Context_Control Registers; 175 189 void *fp_context; 176 unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ];190 RTEMS_API_Control *RTEMS_API; 177 191 void *extension; 178 192 } Thread_Control; … … 304 318 305 319 void _Thread_Dispatch( void ); 320 321 /* 322 * _Thread_Initialize 323 * 324 * DESCRIPTION: 325 * 326 * XXX 327 */ 328 329 boolean _Thread_Initialize( 330 Objects_Information *information, 331 Thread_Control *the_thread, 332 void *stack_area, /* NULL if to be allocated */ 333 unsigned32 stack_size, /* insure it is >= min */ 334 boolean is_fp, /* TRUE if thread uses FP */ 335 Priority_Control priority, 336 Modes_Control mode, 337 Objects_Name name 338 339 ); 340 341 /* 342 * _Thread_Start 343 * 344 * DESCRIPTION: 345 * 346 * XXX 347 */ 348 349 boolean _Thread_Start( 350 Thread_Control *the_thread, 351 Thread_Start_types the_prototype, 352 void *entry_point, 353 void *pointer_argument, 354 unsigned32 numeric_argument 355 ); 356 357 /* 358 * _Thread_Restart 359 * 360 * DESCRIPTION: 361 * 362 * XXX 363 */ 364 365 /* XXX multiple task arg profiles */ 366 367 boolean _Thread_Restart( 368 Thread_Control *the_thread, 369 void *pointer_argument, 370 unsigned32 numeric_argument 371 ); 372 373 /* 374 * _Thread_Close 375 * 376 * DESCRIPTION: 377 * 378 * XXX 379 */ 380 381 void _Thread_Close( 382 Objects_Information *information, 383 Thread_Control *the_thread 384 ); 306 385 307 386 /* … … 494 573 void _Thread_Change_priority ( 495 574 Thread_Control *the_thread, 496 rtems_task_prioritynew_priority575 Priority_Control new_priority 497 576 ); 498 577 … … 508 587 void _Thread_Set_priority( 509 588 Thread_Control *the_thread, 510 rtems_task_prioritynew_priority589 Priority_Control new_priority 511 590 ); 512 591 … … 525 604 526 605 boolean _Thread_Change_mode( 527 rtems_modenew_mode_set,528 rtems_modemask,529 rtems_mode*old_mode_set606 Modes_Control new_mode_set, 607 Modes_Control mask, 608 Modes_Control *old_mode_set 530 609 ); 531 610 -
c/src/exec/score/headers/threadq.h
r5250ff39 r7f6a24ab 36 36 Thread_Control * 37 37 ); 38 39 /* 40 * The following type defines the callout used when a local task 41 * is extracted from a remote thread queue (i.e. it's proxy must 42 * extracted from the remote queue). 43 */ 44 45 typedef void ( *Thread_queue_Extract_callout )( 46 Thread_Control * 47 ); 48 49 EXTERN Thread_queue_Extract_callout 50 _Thread_queue_Extract_table[ OBJECTS_CLASSES_LAST + 1 ]; 38 51 39 52 /* … … 63 76 void _Thread_queue_Enqueue( 64 77 Thread_queue_Control *the_thread_queue, 65 rtems_interval timeout78 rtems_interval timeout 66 79 ); 67 80 … … 77 90 void _Thread_queue_Extract( 78 91 Thread_queue_Control *the_thread_queue, 92 Thread_Control *the_thread 93 ); 94 95 /* 96 * _Thread_queue_Extract_with_proxy 97 * 98 * DESCRIPTION: 99 * 100 * This routine extracts the_thread from the_thread_queue 101 * and insures that if there is a proxy for this task on 102 * another node, it is also dealt with. 103 */ 104 105 boolean _Thread_queue_Extract_with_proxy( 79 106 Thread_Control *the_thread 80 107 ); … … 119 146 120 147 void _Thread_queue_Initialize( 121 Thread_queue_Control *the_thread_queue, 122 rtems_attribute attribute_set, 123 States_Control state 148 Thread_queue_Control *the_thread_queue, 149 Objects_Classes the_class, 150 Thread_queue_Disciplines the_discipline, 151 States_Control state, 152 Thread_queue_Extract_callout proxy_extract_callout 124 153 ); 125 154 -
c/src/exec/score/headers/tqdata.h
r5250ff39 r7f6a24ab 32 32 33 33 typedef enum { 34 THREAD_QUEUE_D ATA_FIFO_DISCIPLINE, /* RTEMS_FIFO queue discipline */35 THREAD_QUEUE_D ATA_PRIORITY_DISCIPLINE/* RTEMS_PRIORITY queue discipline */34 THREAD_QUEUE_DISCIPLINE_FIFO, /* RTEMS_FIFO queue discipline */ 35 THREAD_QUEUE_DISCIPLINE_PRIORITY /* RTEMS_PRIORITY queue discipline */ 36 36 } Thread_queue_Disciplines; 37 37 … … 64 64 65 65 STATIC INLINE unsigned32 _Thread_queue_Header_number ( 66 rtems_task_prioritythe_priority66 Priority_Control the_priority 67 67 ); 68 68 … … 78 78 79 79 STATIC INLINE boolean _Thread_queue_Is_reverse_search ( 80 rtems_task_prioritythe_priority80 Priority_Control the_priority 81 81 ); 82 82 -
c/src/exec/score/headers/userext.h
r5250ff39 r7f6a24ab 70 70 71 71 STATIC INLINE void _User_extensions_Add_set ( 72 User_extensions_Control 73 rtems_extensions_table *extension_table72 User_extensions_Control *the_extension, 73 rtems_extensions_table *extension_table 74 74 ); 75 75 -
c/src/exec/score/include/rtems/score/mppkt.h
r5250ff39 r7f6a24ab 65 65 Objects_Id id; 66 66 Objects_Id source_tid; 67 rtems_task_prioritysource_priority;67 Priority_Control source_priority; 68 68 rtems_status_code return_code; 69 69 unsigned32 length; -
c/src/exec/score/include/rtems/score/object.h
r5250ff39 r7f6a24ab 350 350 351 351 /* 352 * _Objects_Get_information 353 * 354 * DESCRIPTION: 355 * 356 * Returns the information control block for the class of objects 357 * corresponding to this id. 358 */ 359 360 Objects_Information *_Objects_Get_information( 361 Objects_Id id 362 ); 363 364 /* 352 365 * _Objects_Build_id 353 366 * … … 405 418 406 419 /* 420 * _Objects_Is_class_valid 421 * 422 * DESCRIPTION: 423 * 424 * This function returns TRUE if the class is valid. 425 * 426 */ 427 428 STATIC INLINE boolean _Objects_Is_class_valid( 429 Objects_Classes the_class 430 ); 431 432 /* 407 433 * _Objects_Is_local_node 408 434 * -
c/src/exec/score/include/rtems/score/objectmp.h
r5250ff39 r7f6a24ab 82 82 ); 83 83 84 /*PAGE 85 * 86 * _Objects_MP_Open 87 * 88 * DESCRIPTION: 89 * 90 * This routine place the specified global object in the 91 * specified information table. 92 */ 93 94 void _Objects_MP_Open ( 95 Objects_Information *information, 96 Objects_MP_Control *the_global_object, 97 unsigned32 the_name, /* XXX -- wrong for variable */ 98 Objects_Id the_id 99 ); 100 84 101 /* 85 * _Objects_MP_ Open102 * _Objects_MP_Allocate_and_open 86 103 * 87 104 * DESCRIPTION: … … 93 110 */ 94 111 95 boolean _Objects_MP_ Open (112 boolean _Objects_MP_Allocate_and_open ( 96 113 Objects_Information *information, 97 114 unsigned32 the_name, /* XXX -- wrong for variable length */ -
c/src/exec/score/include/rtems/score/priority.h
r5250ff39 r7f6a24ab 30 30 */ 31 31 32 typedef unsigned32 rtems_task_priority;32 typedef unsigned32 Priority_Control; 33 33 34 34 #define RTEMS_MINIMUM_PRIORITY 1 /* highest thread priority */ … … 93 93 94 94 STATIC INLINE boolean _Priority_Is_valid ( 95 rtems_task_prioritythe_priority95 Priority_Control the_priority 96 96 ); 97 97 … … 105 105 106 106 STATIC INLINE unsigned32 _Priority_Major ( 107 rtems_task_prioritythe_priority107 Priority_Control the_priority 108 108 ); 109 109 … … 117 117 118 118 STATIC INLINE unsigned32 _Priority_Minor ( 119 rtems_task_prioritythe_priority119 Priority_Control the_priority 120 120 ); 121 121 … … 156 156 */ 157 157 158 STATIC INLINE rtems_task_priority_Priority_Get_highest( void );158 STATIC INLINE Priority_Control _Priority_Get_highest( void ); 159 159 160 160 /* … … 170 170 STATIC INLINE void _Priority_Initialize_information( 171 171 Priority_Information *the_priority_map, 172 rtems_task_prioritynew_priority172 Priority_Control new_priority 173 173 ); 174 174 … … 183 183 184 184 STATIC INLINE boolean _Priority_Is_group_empty ( 185 rtems_task_prioritythe_priority185 Priority_Control the_priority 186 186 ); 187 187 -
c/src/exec/score/include/rtems/score/thread.h
r5250ff39 r7f6a24ab 87 87 ); 88 88 89 typedef Thread ( *Thread_Entry )( 90 Thread_Argument 91 ); 89 typedef Thread ( *Thread_Entry )( ); 92 90 93 91 /* … … 96 94 */ 97 95 96 typedef enum { 97 THREAD_START_NUMERIC, 98 THREAD_START_POINTER, 99 THREAD_START_BOTH_POINTER_FIRST, 100 THREAD_START_BOTH_NUMERIC_FIRST 101 } Thread_Start_types; 102 98 103 typedef struct { 99 104 Thread_Entry entry_point; /* starting thread address */ 100 unsigned32 initial_argument; /* initial argument */ 101 rtems_mode initial_modes; /* initial mode */ 102 rtems_task_priority initial_priority; /* initial priority */ 105 Thread_Start_types prototype; /* how task is invoked */ 106 void *pointer_argument; /* pointer argument */ 107 unsigned32 numeric_argument; /* numeric argument */ 108 Modes_Control initial_modes; /* initial mode */ 109 Priority_Control initial_priority; /* initial priority */ 110 Stack_Control Initial_stack; /* stack information */ 103 111 void *fp_context; /* initial FP context area address */ 104 Stack_Control Initial_stack; /* stack information*/112 void *stack; /* initial FP context area address */ 105 113 } Thread_Start_information; 106 114 … … 135 143 Objects_Control Object; 136 144 States_Control current_state; 137 rtems_task_prioritycurrent_priority;138 rtems_task_priorityreal_priority;145 Priority_Control current_priority; 146 Priority_Control real_priority; 139 147 unsigned32 resource_count; 140 148 Thread_Wait_information Wait; … … 154 162 */ 155 163 164 /* XXX structure in wrong file .. API .. not core */ 165 166 typedef struct { 167 boolean is_global; 168 unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ]; 169 rtems_event_set pending_events; 170 rtems_event_set events_out; 171 ASR_Information Signal; 172 } RTEMS_API_Control; 173 156 174 typedef struct { 157 175 Objects_Control Object; 158 176 States_Control current_state; 159 rtems_task_prioritycurrent_priority;160 rtems_task_priorityreal_priority;177 Priority_Control current_priority; 178 Priority_Control real_priority; 161 179 unsigned32 resource_count; 162 180 Thread_Wait_information Wait; … … 166 184 Chain_Control *ready; 167 185 Priority_Information Priority_map; 168 rtems_event_set pending_events;169 rtems_event_set events_out;170 186 Thread_Start_information Start; 171 ASR_Information Signal; 172 rtems_mode current_modes; 173 rtems_attribute attribute_set; 187 Modes_Control current_modes; 174 188 Context_Control Registers; 175 189 void *fp_context; 176 unsigned32 Notepads[ RTEMS_NUMBER_NOTEPADS ];190 RTEMS_API_Control *RTEMS_API; 177 191 void *extension; 178 192 } Thread_Control; … … 304 318 305 319 void _Thread_Dispatch( void ); 320 321 /* 322 * _Thread_Initialize 323 * 324 * DESCRIPTION: 325 * 326 * XXX 327 */ 328 329 boolean _Thread_Initialize( 330 Objects_Information *information, 331 Thread_Control *the_thread, 332 void *stack_area, /* NULL if to be allocated */ 333 unsigned32 stack_size, /* insure it is >= min */ 334 boolean is_fp, /* TRUE if thread uses FP */ 335 Priority_Control priority, 336 Modes_Control mode, 337 Objects_Name name 338 339 ); 340 341 /* 342 * _Thread_Start 343 * 344 * DESCRIPTION: 345 * 346 * XXX 347 */ 348 349 boolean _Thread_Start( 350 Thread_Control *the_thread, 351 Thread_Start_types the_prototype, 352 void *entry_point, 353 void *pointer_argument, 354 unsigned32 numeric_argument 355 ); 356 357 /* 358 * _Thread_Restart 359 * 360 * DESCRIPTION: 361 * 362 * XXX 363 */ 364 365 /* XXX multiple task arg profiles */ 366 367 boolean _Thread_Restart( 368 Thread_Control *the_thread, 369 void *pointer_argument, 370 unsigned32 numeric_argument 371 ); 372 373 /* 374 * _Thread_Close 375 * 376 * DESCRIPTION: 377 * 378 * XXX 379 */ 380 381 void _Thread_Close( 382 Objects_Information *information, 383 Thread_Control *the_thread 384 ); 306 385 307 386 /* … … 494 573 void _Thread_Change_priority ( 495 574 Thread_Control *the_thread, 496 rtems_task_prioritynew_priority575 Priority_Control new_priority 497 576 ); 498 577 … … 508 587 void _Thread_Set_priority( 509 588 Thread_Control *the_thread, 510 rtems_task_prioritynew_priority589 Priority_Control new_priority 511 590 ); 512 591 … … 525 604 526 605 boolean _Thread_Change_mode( 527 rtems_modenew_mode_set,528 rtems_modemask,529 rtems_mode*old_mode_set606 Modes_Control new_mode_set, 607 Modes_Control mask, 608 Modes_Control *old_mode_set 530 609 ); 531 610 -
c/src/exec/score/include/rtems/score/threadq.h
r5250ff39 r7f6a24ab 36 36 Thread_Control * 37 37 ); 38 39 /* 40 * The following type defines the callout used when a local task 41 * is extracted from a remote thread queue (i.e. it's proxy must 42 * extracted from the remote queue). 43 */ 44 45 typedef void ( *Thread_queue_Extract_callout )( 46 Thread_Control * 47 ); 48 49 EXTERN Thread_queue_Extract_callout 50 _Thread_queue_Extract_table[ OBJECTS_CLASSES_LAST + 1 ]; 38 51 39 52 /* … … 63 76 void _Thread_queue_Enqueue( 64 77 Thread_queue_Control *the_thread_queue, 65 rtems_interval timeout78 rtems_interval timeout 66 79 ); 67 80 … … 77 90 void _Thread_queue_Extract( 78 91 Thread_queue_Control *the_thread_queue, 92 Thread_Control *the_thread 93 ); 94 95 /* 96 * _Thread_queue_Extract_with_proxy 97 * 98 * DESCRIPTION: 99 * 100 * This routine extracts the_thread from the_thread_queue 101 * and insures that if there is a proxy for this task on 102 * another node, it is also dealt with. 103 */ 104 105 boolean _Thread_queue_Extract_with_proxy( 79 106 Thread_Control *the_thread 80 107 ); … … 119 146 120 147 void _Thread_queue_Initialize( 121 Thread_queue_Control *the_thread_queue, 122 rtems_attribute attribute_set, 123 States_Control state 148 Thread_queue_Control *the_thread_queue, 149 Objects_Classes the_class, 150 Thread_queue_Disciplines the_discipline, 151 States_Control state, 152 Thread_queue_Extract_callout proxy_extract_callout 124 153 ); 125 154 -
c/src/exec/score/include/rtems/score/tqdata.h
r5250ff39 r7f6a24ab 32 32 33 33 typedef enum { 34 THREAD_QUEUE_D ATA_FIFO_DISCIPLINE, /* RTEMS_FIFO queue discipline */35 THREAD_QUEUE_D ATA_PRIORITY_DISCIPLINE/* RTEMS_PRIORITY queue discipline */34 THREAD_QUEUE_DISCIPLINE_FIFO, /* RTEMS_FIFO queue discipline */ 35 THREAD_QUEUE_DISCIPLINE_PRIORITY /* RTEMS_PRIORITY queue discipline */ 36 36 } Thread_queue_Disciplines; 37 37 … … 64 64 65 65 STATIC INLINE unsigned32 _Thread_queue_Header_number ( 66 rtems_task_prioritythe_priority66 Priority_Control the_priority 67 67 ); 68 68 … … 78 78 79 79 STATIC INLINE boolean _Thread_queue_Is_reverse_search ( 80 rtems_task_prioritythe_priority80 Priority_Control the_priority 81 81 ); 82 82 -
c/src/exec/score/include/rtems/score/userext.h
r5250ff39 r7f6a24ab 70 70 71 71 STATIC INLINE void _User_extensions_Add_set ( 72 User_extensions_Control 73 rtems_extensions_table *extension_table72 User_extensions_Control *the_extension, 73 rtems_extensions_table *extension_table 74 74 ); 75 75 -
c/src/exec/score/inline/object.inl
r5250ff39 r7f6a24ab 73 73 { 74 74 return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 75 } 76 77 /*PAGE 78 * 79 * _Objects_Is_class_valid 80 * 81 */ 82 83 STATIC INLINE boolean _Objects_Is_class_valid( 84 Objects_Classes the_class 85 ) 86 { 87 return the_class <= OBJECTS_CLASSES_LAST; 75 88 } 76 89 -
c/src/exec/score/inline/priority.inl
r5250ff39 r7f6a24ab 42 42 43 43 STATIC INLINE boolean _Priority_Is_valid ( 44 rtems_task_prioritythe_priority44 Priority_Control the_priority 45 45 ) 46 46 { … … 56 56 57 57 STATIC INLINE unsigned32 _Priority_Major ( 58 rtems_task_prioritythe_priority58 Priority_Control the_priority 59 59 ) 60 60 { … … 69 69 70 70 STATIC INLINE unsigned32 _Priority_Minor ( 71 rtems_task_prioritythe_priority71 Priority_Control the_priority 72 72 ) 73 73 { … … 110 110 */ 111 111 112 STATIC INLINE rtems_task_priority_Priority_Get_highest( void )112 STATIC INLINE Priority_Control _Priority_Get_highest( void ) 113 113 { 114 114 Priority_Bit_map_control minor; … … 130 130 STATIC INLINE void _Priority_Initialize_information( 131 131 Priority_Information *the_priority_map, 132 rtems_task_prioritynew_priority132 Priority_Control new_priority 133 133 ) 134 134 { … … 159 159 160 160 STATIC INLINE boolean _Priority_Is_group_empty ( 161 rtems_task_prioritythe_priority161 Priority_Control the_priority 162 162 ) 163 163 { -
c/src/exec/score/inline/rtems/score/object.inl
r5250ff39 r7f6a24ab 73 73 { 74 74 return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 75 } 76 77 /*PAGE 78 * 79 * _Objects_Is_class_valid 80 * 81 */ 82 83 STATIC INLINE boolean _Objects_Is_class_valid( 84 Objects_Classes the_class 85 ) 86 { 87 return the_class <= OBJECTS_CLASSES_LAST; 75 88 } 76 89 -
c/src/exec/score/inline/rtems/score/priority.inl
r5250ff39 r7f6a24ab 42 42 43 43 STATIC INLINE boolean _Priority_Is_valid ( 44 rtems_task_prioritythe_priority44 Priority_Control the_priority 45 45 ) 46 46 { … … 56 56 57 57 STATIC INLINE unsigned32 _Priority_Major ( 58 rtems_task_prioritythe_priority58 Priority_Control the_priority 59 59 ) 60 60 { … … 69 69 70 70 STATIC INLINE unsigned32 _Priority_Minor ( 71 rtems_task_prioritythe_priority71 Priority_Control the_priority 72 72 ) 73 73 { … … 110 110 */ 111 111 112 STATIC INLINE rtems_task_priority_Priority_Get_highest( void )112 STATIC INLINE Priority_Control _Priority_Get_highest( void ) 113 113 { 114 114 Priority_Bit_map_control minor; … … 130 130 STATIC INLINE void _Priority_Initialize_information( 131 131 Priority_Information *the_priority_map, 132 rtems_task_prioritynew_priority132 Priority_Control new_priority 133 133 ) 134 134 { … … 159 159 160 160 STATIC INLINE boolean _Priority_Is_group_empty ( 161 rtems_task_prioritythe_priority161 Priority_Control the_priority 162 162 ) 163 163 { -
c/src/exec/score/inline/rtems/score/tqdata.inl
r5250ff39 r7f6a24ab 25 25 26 26 STATIC INLINE unsigned32 _Thread_queue_Header_number ( 27 rtems_task_prioritythe_priority27 Priority_Control the_priority 28 28 ) 29 29 { … … 38 38 39 39 STATIC INLINE boolean _Thread_queue_Is_reverse_search ( 40 rtems_task_prioritythe_priority40 Priority_Control the_priority 41 41 ) 42 42 { -
c/src/exec/score/inline/rtems/score/userext.inl
r5250ff39 r7f6a24ab 42 42 43 43 STATIC INLINE void _User_extensions_Add_set ( 44 User_extensions_Control 45 rtems_extensions_table *extension_table44 User_extensions_Control *the_extension, 45 rtems_extensions_table *extension_table 46 46 ) 47 47 { -
c/src/exec/score/inline/tqdata.inl
r5250ff39 r7f6a24ab 25 25 26 26 STATIC INLINE unsigned32 _Thread_queue_Header_number ( 27 rtems_task_prioritythe_priority27 Priority_Control the_priority 28 28 ) 29 29 { … … 38 38 39 39 STATIC INLINE boolean _Thread_queue_Is_reverse_search ( 40 rtems_task_prioritythe_priority40 Priority_Control the_priority 41 41 ) 42 42 { -
c/src/exec/score/inline/userext.inl
r5250ff39 r7f6a24ab 42 42 43 43 STATIC INLINE void _User_extensions_Add_set ( 44 User_extensions_Control 45 rtems_extensions_table *extension_table44 User_extensions_Control *the_extension, 45 rtems_extensions_table *extension_table 46 46 ) 47 47 { -
c/src/exec/score/macros/object.inl
r5250ff39 r7f6a24ab 55 55 #define rtems_get_index( _id ) \ 56 56 (((_id) >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS) 57 58 /*PAGE 59 * 60 * _Objects_Is_class_valid 61 * 62 */ 63 64 #define _Objects_Is_class_valid( _the_class ) \ 65 ( (_the_class) <= OBJECTS_CLASSES_LAST ) 57 66 58 67 /*PAGE -
c/src/exec/score/macros/rtems/score/object.inl
r5250ff39 r7f6a24ab 55 55 #define rtems_get_index( _id ) \ 56 56 (((_id) >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS) 57 58 /*PAGE 59 * 60 * _Objects_Is_class_valid 61 * 62 */ 63 64 #define _Objects_Is_class_valid( _the_class ) \ 65 ( (_the_class) <= OBJECTS_CLASSES_LAST ) 57 66 58 67 /*PAGE -
c/src/exec/score/macros/rtems/score/thread.inl
r5250ff39 r7f6a24ab 94 94 #define _Thread_Calculate_heir() \ 95 95 { \ 96 rtems_task_priorityhighest; \96 Priority_Control highest; \ 97 97 \ 98 98 _Priority_Get_highest( highest ); \ -
c/src/exec/score/macros/thread.inl
r5250ff39 r7f6a24ab 94 94 #define _Thread_Calculate_heir() \ 95 95 { \ 96 rtems_task_priorityhighest; \96 Priority_Control highest; \ 97 97 \ 98 98 _Priority_Get_highest( highest ); \ -
c/src/exec/score/src/mpci.c
r5250ff39 r7f6a24ab 37 37 _Thread_queue_Initialize( 38 38 &_MPCI_Remote_blocked_threads, 39 RTEMS_FIFO, 40 STATES_WAITING_FOR_RPC_REPLY 39 OBJECTS_NO_CLASS, 40 THREAD_QUEUE_DISCIPLINE_FIFO, 41 STATES_WAITING_FOR_RPC_REPLY, 42 NULL 41 43 ); 42 44 } -
c/src/exec/score/src/object.c
r5250ff39 r7f6a24ab 477 477 return 0; 478 478 } 479 480 /*PAGE 481 * 482 * _Objects_Get_information 483 * 484 * XXX 485 */ 486 487 Objects_Information *_Objects_Get_information( 488 Objects_Id id 489 ) 490 { 491 Objects_Classes the_class; 492 493 the_class = rtems_get_class( id ); 494 495 if ( !_Objects_Is_class_valid( the_class ) ) 496 return NULL; 497 498 return _Objects_Information_table[ the_class ]; 499 } 500 -
c/src/exec/score/src/objectmp.c
r5250ff39 r7f6a24ab 51 51 * 52 52 */ 53 54 boolean _Objects_MP_Open ( 55 Objects_Information *information, 53 54 void _Objects_MP_Open ( 55 Objects_Information *information, 56 Objects_MP_Control *the_global_object, 56 57 unsigned32 the_name, /* XXX -- wrong for variable */ 57 Objects_Id the_id, 58 boolean is_fatal_error 59 ) 60 { 61 Objects_MP_Control *the_global_object; 62 63 the_global_object = _Objects_MP_Allocate_global_object(); 64 if ( _Objects_MP_Is_null_global_object( the_global_object ) ) { 65 66 if ( is_fatal_error == FALSE ) 67 return FALSE; 68 69 rtems_fatal_error_occurred( RTEMS_TOO_MANY ); 70 71 } 72 58 Objects_Id the_id 59 ) 60 { 73 61 the_global_object->Object.id = the_id; 74 62 the_global_object->name = the_name; 75 63 76 64 _Chain_Prepend( 77 65 &information->global_table[ rtems_get_node( the_id ) ], 78 66 &the_global_object->Object.Node 79 67 ); 68 69 } 70 71 /*PAGE 72 * 73 * _Objects_MP_Allocate_and_open 74 * 75 */ 76 77 boolean _Objects_MP_Allocate_and_open ( 78 Objects_Information *information, 79 unsigned32 the_name, /* XXX -- wrong for variable */ 80 Objects_Id the_id, 81 boolean is_fatal_error 82 ) 83 { 84 Objects_MP_Control *the_global_object; 85 86 the_global_object = _Objects_MP_Allocate_global_object(); 87 if ( _Objects_MP_Is_null_global_object( the_global_object ) ) { 88 89 if ( is_fatal_error == FALSE ) 90 return FALSE; 91 92 rtems_fatal_error_occurred( RTEMS_TOO_MANY ); 93 94 } 95 96 _Objects_MP_Open( information, the_global_object, the_name, the_id ); 80 97 81 98 return TRUE; -
c/src/exec/score/src/thread.c
r5250ff39 r7f6a24ab 143 143 void _Thread_Dispatch( void ) 144 144 { 145 Thread_Control *executing;146 Thread_Control *heir;147 ISR_Level 145 Thread_Control *executing; 146 Thread_Control *heir; 147 ISR_Level level; 148 148 rtems_signal_set signal_set; 149 rtems_modeprevious_mode;149 Modes_Control previous_mode; 150 150 151 151 executing = _Thread_Executing; … … 200 200 _Thread_Dispatch_disable_level = 0; 201 201 202 if ( _ASR_Are_signals_pending( &executing-> Signal ) ) {203 signal_set = executing->Signal.signals_posted;204 executing-> Signal.signals_posted = 0;202 if ( _ASR_Are_signals_pending( &executing->RTEMS_API->Signal ) ) { 203 signal_set = executing->RTEMS_API->Signal.signals_posted; 204 executing->RTEMS_API->Signal.signals_posted = 0; 205 205 _ISR_Enable( level ); 206 206 207 executing-> Signal.nest_level += 1;208 if (_Thread_Change_mode( executing-> Signal.mode_set,207 executing->RTEMS_API->Signal.nest_level += 1; 208 if (_Thread_Change_mode( executing->RTEMS_API->Signal.mode_set, 209 209 RTEMS_ALL_MODE_MASKS, &previous_mode )) 210 210 _Thread_Dispatch(); 211 211 212 (*executing-> Signal.handler)( signal_set );213 214 executing-> Signal.nest_level -= 1;212 (*executing->RTEMS_API->Signal.handler)( signal_set ); 213 214 executing->RTEMS_API->Signal.nest_level -= 1; 215 215 if (_Thread_Change_mode( previous_mode, 216 216 RTEMS_ALL_MODE_MASKS, &previous_mode )) … … 219 219 else 220 220 _ISR_Enable( level ); 221 } 222 223 /*PAGE 224 * 225 * _Thread_Initialize 226 * 227 * XXX 228 */ 229 230 boolean _Thread_Initialize( 231 Objects_Information *information, 232 Thread_Control *the_thread, 233 void *stack_area, /* NULL if to be allocated */ 234 unsigned32 stack_size, /* insure it is >= min */ 235 boolean is_fp, /* TRUE if thread uses FP */ 236 Priority_Control priority, 237 Modes_Control mode, 238 Objects_Name name 239 240 ) 241 { 242 unsigned32 actual_stack_size; 243 void *stack; 244 void *fp_area; 245 246 /* 247 * Allocate and Initialize the stack for this thread. 248 */ 249 250 if ( !_Stack_Is_enough( stack_size ) ) 251 actual_stack_size = RTEMS_MINIMUM_STACK_SIZE; 252 else 253 actual_stack_size = stack_size; 254 255 actual_stack_size = _Stack_Adjust_size( actual_stack_size ); 256 stack = stack_area; 257 258 if ( !stack ) { 259 stack = _Workspace_Allocate( actual_stack_size ); 260 261 if ( !stack ) 262 return FALSE; 263 264 the_thread->Start.stack = stack; 265 } else 266 the_thread->Start.stack = NULL; 267 268 _Stack_Initialize( 269 &the_thread->Start.Initial_stack, 270 stack, 271 actual_stack_size 272 ); 273 274 /* 275 * Allocate the floating point area for this thread 276 */ 277 278 if ( is_fp ) { 279 280 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 281 if ( !fp_area ) { 282 (void) _Workspace_Free( stack ); 283 return FALSE; 284 } 285 fp_area = _Context_Fp_start( fp_area, 0 ); 286 287 } else 288 fp_area = NULL; 289 290 the_thread->fp_context = fp_area; 291 the_thread->Start.fp_context = fp_area; 292 293 /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ 294 /* 295 * Allocate and initialize the RTEMS API specific information 296 */ 297 298 the_thread->RTEMS_API = _Workspace_Allocate( sizeof( RTEMS_API_Control ) ); 299 300 if ( !the_thread->RTEMS_API ) { 301 /* XXX when in task_create 302 _RTEMS_tasks_Free( the_thread ); 303 _Objects_MP_Free_global_object( the_global_object ); 304 305 _Thread_Enable_dispatch(); 306 return( RTEMS_UNSATISFIED ); 307 */ 308 (void) _Workspace_Free( stack ); 309 (void) _Workspace_Free( fp_area ); 310 return FALSE; 311 312 } 313 314 the_thread->RTEMS_API->is_global = FALSE; 315 the_thread->RTEMS_API->pending_events = EVENT_SETS_NONE_PENDING; 316 _ASR_Initialize( &the_thread->RTEMS_API->Signal ); 317 318 /* XXX should not be here .... */ 319 320 /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ 321 322 /* 323 * General initialization 324 */ 325 326 the_thread->current_state = STATES_DORMANT; 327 the_thread->current_modes = mode; 328 the_thread->resource_count = 0; 329 the_thread->real_priority = priority; 330 the_thread->Start.initial_priority = priority; 331 the_thread->Start.initial_modes = mode; 332 333 _Thread_Set_priority( the_thread, priority ); 334 335 /* 336 * Open the object 337 */ 338 339 _Objects_Open( information, &the_thread->Object, name ); 340 341 /* 342 * Invoke create extensions 343 */ 344 345 _User_extensions_Task_create( the_thread ); 346 /* XXX if this fails ... */ 347 348 return TRUE; 349 } 350 351 /* 352 * _Thread_Start 353 * 354 * DESCRIPTION: 355 * 356 * XXX 357 */ 358 359 boolean _Thread_Start( 360 Thread_Control *the_thread, 361 Thread_Start_types the_prototype, 362 void *entry_point, 363 void *pointer_argument, 364 unsigned32 numeric_argument 365 ) 366 { 367 if ( _States_Is_dormant( the_thread->current_state ) ) { 368 369 the_thread->Start.entry_point = entry_point; 370 371 the_thread->Start.prototype = the_prototype; 372 the_thread->Start.pointer_argument = pointer_argument; 373 the_thread->Start.numeric_argument = numeric_argument; 374 375 _Thread_Load_environment( the_thread ); 376 377 _Thread_Ready( the_thread ); 378 379 _User_extensions_Task_start( the_thread ); 380 381 return TRUE; 382 } 383 384 return FALSE; 385 386 } 387 388 /* 389 * _Thread_Restart 390 * 391 * DESCRIPTION: 392 * 393 * XXX 394 */ 395 396 boolean _Thread_Restart( 397 Thread_Control *the_thread, 398 void *pointer_argument, 399 unsigned32 numeric_argument 400 ) 401 { 402 if ( !_States_Is_dormant( the_thread->current_state ) ) { 403 404 _Thread_Set_transient( the_thread ); 405 the_thread->resource_count = 0; 406 the_thread->current_modes = the_thread->Start.initial_modes; 407 408 the_thread->Start.pointer_argument = pointer_argument; 409 the_thread->Start.numeric_argument = numeric_argument; 410 411 if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 412 413 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 414 (void) _Watchdog_Remove( &the_thread->Timer ); 415 } 416 417 if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 418 the_thread->real_priority = the_thread->Start.initial_priority; 419 _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 420 } 421 422 _Thread_Load_environment( the_thread ); 423 424 _Thread_Ready( the_thread ); 425 426 _User_extensions_Task_restart( the_thread ); 427 428 if ( _Thread_Is_executing ( the_thread ) ) 429 _Thread_Restart_self(); 430 431 return TRUE; 432 } 433 434 return FALSE; 435 } 436 437 /* 438 * _Thread_Close 439 * 440 * DESCRIPTION: 441 * 442 * XXX 443 */ 444 445 void _Thread_Close( 446 Objects_Information *information, 447 Thread_Control *the_thread 448 ) 449 { 450 _Objects_Close( information, &the_thread->Object ); 451 452 _Thread_Set_state( the_thread, STATES_TRANSIENT ); 453 454 if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 455 456 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 457 (void) _Watchdog_Remove( &the_thread->Timer ); 458 } 459 460 _User_extensions_Task_delete( the_thread ); 461 462 #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) 463 if ( _Thread_Is_allocated_fp( the_thread ) ) 464 _Thread_Deallocate_fp(); 465 #endif 466 the_thread->fp_context = NULL; 467 468 (void) _Workspace_Free( the_thread->Start.fp_context ); 469 470 if ( the_thread->Start.stack ) 471 (void) _Workspace_Free( the_thread->Start.stack ); 221 472 } 222 473 … … 596 847 _Thread_Enable_dispatch(); 597 848 598 (*executing->Start.entry_point)( executing->Start.initial_argument ); 849 switch ( executing->Start.prototype ) { 850 case THREAD_START_NUMERIC: 851 (*executing->Start.entry_point)( executing->Start.numeric_argument ); 852 break; 853 case THREAD_START_POINTER: 854 (*executing->Start.entry_point)( executing->Start.pointer_argument ); 855 break; 856 case THREAD_START_BOTH_POINTER_FIRST: 857 (*executing->Start.entry_point)( 858 executing->Start.pointer_argument, 859 executing->Start.numeric_argument 860 ); 861 break; 862 case THREAD_START_BOTH_NUMERIC_FIRST: 863 (*executing->Start.entry_point)( 864 executing->Start.numeric_argument, 865 executing->Start.pointer_argument 866 ); 867 break; 868 } 599 869 600 870 _User_extensions_Task_exitted( executing ); … … 655 925 656 926 void _Thread_Change_priority( 657 Thread_Control *the_thread,658 rtems_task_prioritynew_priority927 Thread_Control *the_thread, 928 Priority_Control new_priority 659 929 ) 660 930 { … … 705 975 706 976 void _Thread_Set_priority( 707 Thread_Control *the_thread,708 rtems_task_prioritynew_priority977 Thread_Control *the_thread, 978 Priority_Control new_priority 709 979 ) 710 980 { … … 736 1006 737 1007 boolean _Thread_Change_mode( 738 unsigned32new_mode_set,739 unsigned32mask,740 unsigned32*old_mode_set741 ) 742 { 743 rtems_modechanged;744 rtems_modethreads_new_mode_set;1008 Modes_Control new_mode_set, 1009 Modes_Control mask, 1010 Modes_Control *old_mode_set 1011 ) 1012 { 1013 Modes_Control changed; 1014 Modes_Control threads_new_mode_set; 745 1015 Thread_Control *executing; 746 1016 boolean need_dispatch; … … 755 1025 756 1026 if ( _Modes_Mask_changed( changed, RTEMS_ASR_MASK ) ) 757 _ASR_Swap_signals( &executing-> Signal );1027 _ASR_Swap_signals( &executing->RTEMS_API->Signal ); 758 1028 759 1029 executing->current_modes = threads_new_mode_set; … … 766 1036 _Context_Switch_necessary = TRUE; 767 1037 768 else if ( !_ASR_Are_signals_pending( &executing-> Signal ) )1038 else if ( !_ASR_Are_signals_pending( &executing->RTEMS_API->Signal ) ) 769 1039 770 1040 need_dispatch = FALSE; -
c/src/exec/score/src/threadq.c
r5250ff39 r7f6a24ab 31 31 * Input parameters: 32 32 * the_thread_queue - pointer to a threadq header 33 * attribute_set - used to determine queueing discipline 33 * the_class - class of the object to which this belongs 34 * discipline - queueing discipline 34 35 * state - state of waiting threads 35 36 * … … 38 39 39 40 void _Thread_queue_Initialize( 40 Thread_queue_Control *the_thread_queue, 41 rtems_attribute attribute_set, 42 States_Control state 41 Thread_queue_Control *the_thread_queue, 42 Objects_Classes the_class, 43 Thread_queue_Disciplines the_discipline, 44 States_Control state, 45 Thread_queue_Extract_callout proxy_extract_callout 43 46 ) 44 47 { 45 48 unsigned32 index; 46 49 47 if ( _Attributes_Is_priority( attribute_set ) ) { 48 the_thread_queue->discipline = THREAD_QUEUE_DATA_PRIORITY_DISCIPLINE; 49 for( index=0 ; 50 index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 51 index++) 52 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 53 } 54 else { 55 the_thread_queue->discipline = THREAD_QUEUE_DATA_FIFO_DISCIPLINE; 56 _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); 57 } 58 59 the_thread_queue->state = state; 50 _Thread_queue_Extract_table[ the_class ] = proxy_extract_callout; 51 52 the_thread_queue->state = state; 53 the_thread_queue->discipline = the_discipline; 54 55 switch ( the_discipline ) { 56 case THREAD_QUEUE_DISCIPLINE_FIFO: 57 _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); 58 break; 59 case THREAD_QUEUE_DISCIPLINE_PRIORITY: 60 for( index=0 ; 61 index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 62 index++) 63 _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); 64 break; 65 } 60 66 61 67 } … … 108 114 109 115 switch( the_thread_queue->discipline ) { 110 case THREAD_QUEUE_D ATA_FIFO_DISCIPLINE:116 case THREAD_QUEUE_DISCIPLINE_FIFO: 111 117 _Thread_queue_Enqueue_fifo( the_thread_queue, the_thread, timeout ); 112 118 break; 113 case THREAD_QUEUE_D ATA_PRIORITY_DISCIPLINE:119 case THREAD_QUEUE_DISCIPLINE_PRIORITY: 114 120 _Thread_queue_Enqueue_priority( 115 121 the_thread_queue, the_thread, timeout ); … … 145 151 146 152 switch ( the_thread_queue->discipline ) { 147 case THREAD_QUEUE_D ATA_FIFO_DISCIPLINE:153 case THREAD_QUEUE_DISCIPLINE_FIFO: 148 154 the_thread = _Thread_queue_Dequeue_fifo( the_thread_queue ); 149 155 break; 150 case THREAD_QUEUE_D ATA_PRIORITY_DISCIPLINE:156 case THREAD_QUEUE_DISCIPLINE_PRIORITY: 151 157 the_thread = _Thread_queue_Dequeue_priority( the_thread_queue ); 152 158 break; … … 172 178 /*PAGE 173 179 * 180 * _Thread_queue_Extract_with_proxy 181 * 182 * This routine extracts the_thread from the_thread_queue 183 * and insures that if there is a proxy for this task on 184 * another node, it is also dealt with. 185 * 186 * XXX 187 */ 188 189 boolean _Thread_queue_Extract_with_proxy( 190 Thread_Control *the_thread 191 ) 192 { 193 States_Control state; 194 Objects_Classes the_class; 195 Thread_queue_Extract_callout proxy_extract_callout; 196 197 state = the_thread->current_state; 198 199 if ( _States_Is_waiting_on_thread_queue( state ) ) { 200 if ( _States_Is_waiting_for_rpc_reply( state ) && 201 _States_Is_locally_blocked( state ) ) { 202 203 the_class = rtems_get_class( the_thread->Wait.id ); 204 205 proxy_extract_callout = _Thread_queue_Extract_table[ the_class ]; 206 207 if ( proxy_extract_callout ) 208 (*proxy_extract_callout)( the_thread ); 209 } 210 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 211 212 return TRUE; 213 } 214 return FALSE; 215 } 216 217 /*PAGE 218 * 174 219 * _Thread_queue_Extract 175 220 * … … 192 237 { 193 238 switch ( the_thread_queue->discipline ) { 194 case THREAD_QUEUE_D ATA_FIFO_DISCIPLINE:239 case THREAD_QUEUE_DISCIPLINE_FIFO: 195 240 _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 196 241 break; 197 case THREAD_QUEUE_D ATA_PRIORITY_DISCIPLINE:242 case THREAD_QUEUE_DISCIPLINE_PRIORITY: 198 243 _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 199 244 break; … … 249 294 250 295 switch ( the_thread_queue->discipline ) { 251 case THREAD_QUEUE_D ATA_FIFO_DISCIPLINE:296 case THREAD_QUEUE_DISCIPLINE_FIFO: 252 297 the_thread = _Thread_queue_First_fifo( the_thread_queue ); 253 298 break; 254 case THREAD_QUEUE_D ATA_PRIORITY_DISCIPLINE:299 case THREAD_QUEUE_DISCIPLINE_PRIORITY: 255 300 the_thread = _Thread_queue_First_priority( the_thread_queue ); 256 301 break; … … 438 483 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 439 484 _ISR_Enable( level ); 440 _Thread_Unblock( the_thread );441 485 } else { 442 486 _Watchdog_Deactivate( &the_thread->Timer ); 443 487 _ISR_Enable( level ); 444 488 (void) _Watchdog_Remove( &the_thread->Timer ); 445 _Thread_Unblock( the_thread ); 446 } 489 } 490 491 _Thread_Unblock( the_thread ); 447 492 448 493 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) 449 494 _Thread_MP_Free_proxy( the_thread ); 495 450 496 } 451 497 … … 499 545 ) 500 546 { 501 rtems_task_prioritysearch_priority;502 Thread_Control *search_thread;503 ISR_Level 504 Chain_Control *header;505 unsigned32 506 Chain_Node *the_node;507 Chain_Node *next_node;508 Chain_Node *previous_node;509 Chain_Node *search_node;510 rtems_task_prioritypriority;511 States_Control 547 Priority_Control search_priority; 548 Thread_Control *search_thread; 549 ISR_Level level; 550 Chain_Control *header; 551 unsigned32 header_index; 552 Chain_Node *the_node; 553 Chain_Node *next_node; 554 Chain_Node *previous_node; 555 Chain_Node *search_node; 556 Priority_Control priority; 557 States_Control block_state; 512 558 513 559 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); -
c/src/lib/libbsp/no_cpu/no_bsp/clock/ckinit.c
r5250ff39 r7f6a24ab 17 17 18 18 #include <rtems.h> 19 #include <rtems/libio.h> 19 20 #include <bsp.h> 20 #include <clockdrv.h> 21 22 void Clock_exit( void ); 23 rtems_isr Clock_isr( rtems_vector_number vector ); 24 21 25 22 26 /* … … 31 35 * number of clock ticks since the driver was initialized. 32 36 */ 37 33 38 volatile rtems_unsigned32 Clock_driver_ticks; 34 39 … … 44 49 45 50 /* 51 * These are set by clock driver during its init 52 */ 53 54 rtems_device_major_number rtems_clock_major = ~0; 55 rtems_device_minor_number rtems_clock_minor; 56 57 /* 46 58 * The previous ISR on this clock tick interrupt vector. 47 59 */ 48 60 49 61 rtems_isr_entry Old_ticker; 50 51 /*52 * Clock_initialize53 *54 * Device driver entry point for clock tick driver initialization.55 */56 57 rtems_device_driver Clock_initialize(58 rtems_device_major_number major,59 rtems_device_minor_number minor,60 void *pargp,61 rtems_id tid,62 rtems_unsigned32 *rval63 )64 {65 Install_clock( Clock_isr );66 }67 62 68 63 /* … … 142 137 } 143 138 } 139 140 /* 141 * Clock_initialize 142 * 143 * Device driver entry point for clock tick driver initialization. 144 */ 145 146 rtems_device_driver Clock_initialize( 147 rtems_device_major_number major, 148 rtems_device_minor_number minor, 149 void *pargp 150 ) 151 { 152 Install_clock((rtems_isr_entry) Clock_isr); 153 154 /* 155 * make major/minor avail to others such as shared memory driver 156 */ 157 rtems_clock_major = major; 158 rtems_clock_minor = minor; 159 160 return RTEMS_SUCCESSFUL; 161 } 162 163 rtems_device_driver Clock_control( 164 rtems_device_major_number major, 165 rtems_device_minor_number minor, 166 void *pargp 167 ) 168 { 169 rtems_libio_ioctl_args_t *args = pargp; 170 171 if (args == 0) 172 goto done; 173 174 /* 175 * This is hokey, but until we get a defined interface 176 * to do this, it will just be this simple... 177 */ 178 179 if (args->command == rtems_build_name('I', 'S', 'R', ' ')) 180 { 181 Clock_isr(CLOCK_VECTOR); 182 } 183 else if (args->command == rtems_build_name('N', 'E', 'W', ' ')) 184 { 185 ReInstall_clock(args->buffer); 186 } 187 188 done: 189 return RTEMS_SUCCESSFUL; 190 } -
c/src/lib/libbsp/no_cpu/no_bsp/include/bsp.h
r5250ff39 r7f6a24ab 24 24 25 25 #include <rtems.h> 26 #include <clockdrv.h> 26 27 27 28 /* … … 68 69 extern rtems_configuration_table BSP_Configuration; 69 70 71 /* 72 * Console driver init 73 */ 74 75 rtems_device_driver console_initialize( 76 rtems_device_major_number, rtems_device_minor_number minor, void *); 77 78 #define CONSOLE_DRIVER_TABLE_ENTRY \ 79 { console_initialize, NULL, NULL, NULL, NULL, NULL } 80 81 /* 82 * NOTE: Use the standard Clock driver entry 83 */ 84 70 85 /* functions */ 71 86 -
c/src/lib/libc/libio.c
r5250ff39 r7f6a24ab 112 112 } 113 113 114 rc = rtems_semaphore_create(RTEMS_LIBIO_SEM, 115 1, 116 RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 117 &rtems_libio_semaphore); 114 rc = rtems_semaphore_create( 115 RTEMS_LIBIO_SEM, 116 1, 117 RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 118 RTEMS_NO_PRIORITY, 119 &rtems_libio_semaphore 120 ); 118 121 if (rc != RTEMS_SUCCESSFUL) 119 122 rtems_fatal_error_occurred(rc); … … 200 203 */ 201 204 202 rc = rtems_semaphore_create(RTEMS_LIBIO_IOP_SEM(iop - rtems_libio_iops), 203 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 204 &iop->sem); 205 rc = rtems_semaphore_create( 206 RTEMS_LIBIO_IOP_SEM(iop - rtems_libio_iops), 207 1, 208 RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 209 RTEMS_NO_PRIORITY, 210 &iop->sem 211 ); 205 212 if (rc != RTEMS_SUCCESSFUL) 206 213 goto failed; -
c/src/lib/libc/support.c
r5250ff39 r7f6a24ab 23 23 ) 24 24 { 25 the_thread-> Notepads[ notepad ] = note;25 the_thread->RTEMS_API->Notepads[ notepad ] = note; 26 26 } 27 27 … … 32 32 ) 33 33 { 34 return the_thread-> Notepads[ notepad ];34 return the_thread->RTEMS_API->Notepads[ notepad ]; 35 35 } 36 36 -
c/src/lib/libmisc/monitor/mon-task.c
r5250ff39 r7f6a24ab 22 22 23 23 canonical_task->entry = rtems_thread->Start.entry_point; 24 canonical_task->argument = rtems_thread->Start. initial_argument;24 canonical_task->argument = rtems_thread->Start.numeric_argument; 25 25 canonical_task->stack = rtems_thread->Start.Initial_stack.area; 26 26 canonical_task->stack_size = rtems_thread->Start.Initial_stack.size; … … 28 28 canonical_task->state = rtems_thread->current_state; 29 29 canonical_task->wait_id = rtems_thread->Wait.id; 30 canonical_task->events = rtems_thread-> pending_events;30 canonical_task->events = rtems_thread->RTEMS_API->pending_events; 31 31 canonical_task->modes = rtems_thread->current_modes; 32 canonical_task->attributes = rtems_thread->attribute_set;33 (void) memcpy(canonical_task->notepad, rtems_thread-> Notepads, sizeof(canonical_task->notepad));32 canonical_task->attributes = 0 /* XXX FIX ME rtems_thread->RTEMS_API->attribute_set */; 33 (void) memcpy(canonical_task->notepad, rtems_thread->RTEMS_API->Notepads, sizeof(canonical_task->notepad)); 34 34 (void) memcpy(&canonical_task->wait_args, &rtems_thread->Wait.Extra, sizeof(canonical_task->wait_args)); 35 35 } -
c/src/lib/libmisc/stackchk/check.c
r5250ff39 r7f6a24ab 434 434 information = _Objects_Information_table[ class_index ]; 435 435 if ( information && information->is_thread ) { 436 for ( i=1 ; i < information->maximum ; i++ ) {436 for ( i=1 ; i <= information->maximum ; i++ ) { 437 437 the_thread = (Thread_Control *)information->local_table[ i ]; 438 438 Stack_check_Dump_threads_usage( the_thread ); -
c/src/libmisc/monitor/mon-task.c
r5250ff39 r7f6a24ab 22 22 23 23 canonical_task->entry = rtems_thread->Start.entry_point; 24 canonical_task->argument = rtems_thread->Start. initial_argument;24 canonical_task->argument = rtems_thread->Start.numeric_argument; 25 25 canonical_task->stack = rtems_thread->Start.Initial_stack.area; 26 26 canonical_task->stack_size = rtems_thread->Start.Initial_stack.size; … … 28 28 canonical_task->state = rtems_thread->current_state; 29 29 canonical_task->wait_id = rtems_thread->Wait.id; 30 canonical_task->events = rtems_thread-> pending_events;30 canonical_task->events = rtems_thread->RTEMS_API->pending_events; 31 31 canonical_task->modes = rtems_thread->current_modes; 32 canonical_task->attributes = rtems_thread->attribute_set;33 (void) memcpy(canonical_task->notepad, rtems_thread-> Notepads, sizeof(canonical_task->notepad));32 canonical_task->attributes = 0 /* XXX FIX ME rtems_thread->RTEMS_API->attribute_set */; 33 (void) memcpy(canonical_task->notepad, rtems_thread->RTEMS_API->Notepads, sizeof(canonical_task->notepad)); 34 34 (void) memcpy(&canonical_task->wait_args, &rtems_thread->Wait.Extra, sizeof(canonical_task->wait_args)); 35 35 } -
c/src/libmisc/stackchk/check.c
r5250ff39 r7f6a24ab 434 434 information = _Objects_Information_table[ class_index ]; 435 435 if ( information && information->is_thread ) { 436 for ( i=1 ; i < information->maximum ; i++ ) {436 for ( i=1 ; i <= information->maximum ; i++ ) { 437 437 the_thread = (Thread_Control *)information->local_table[ i ]; 438 438 Stack_check_Dump_threads_usage( the_thread ); -
c/src/optman/rtems/no-sem.c
r5250ff39 r7f6a24ab 32 32 33 33 rtems_status_code rtems_semaphore_create( 34 rtems_name name, 35 unsigned32 count, 36 rtems_attribute attribute_set, 37 Objects_Id *id 34 rtems_name name, 35 unsigned32 count, 36 rtems_attribute attribute_set, 37 rtems_task_priority priority_ceiling, 38 Objects_Id *id 38 39 ) 39 40 { -
c/src/optman/rtems/no-signal.c
r5250ff39 r7f6a24ab 23 23 rtems_status_code rtems_signal_catch( 24 24 rtems_asr_entry handler, 25 rtems_mode mode_set25 rtems_mode mode_set 26 26 ) 27 27 { … … 30 30 31 31 rtems_status_code rtems_signal_send( 32 Objects_Idid,32 rtems_id id, 33 33 rtems_signal_set signal_set 34 34 ) -
c/src/tests/mptests/mp08/init.c
r5250ff39 r7f6a24ab 51 51 1, 52 52 RTEMS_GLOBAL, 53 RTEMS_NO_PRIORITY, 53 54 &Semaphore_id[ 1 ] 54 55 ); -
c/src/tests/mptests/mp10/init.c
r5250ff39 r7f6a24ab 70 70 0, 71 71 RTEMS_GLOBAL | RTEMS_PRIORITY, 72 RTEMS_NO_PRIORITY, 72 73 &Semaphore_id[ 1 ] 73 74 ); -
c/src/tests/mptests/mp11/init.c
r5250ff39 r7f6a24ab 86 86 1, 87 87 RTEMS_GLOBAL, 88 RTEMS_NO_PRIORITY, 88 89 &junk_id 89 90 ); -
c/src/tests/mptests/mp13/init.c
r5250ff39 r7f6a24ab 63 63 1, 64 64 RTEMS_GLOBAL | RTEMS_PRIORITY, 65 RTEMS_NO_PRIORITY, 65 66 &Semaphore_id[ 1 ] 66 67 ); -
c/src/tests/mptests/mp14/init.c
r5250ff39 r7f6a24ab 95 95 1, 96 96 RTEMS_GLOBAL, 97 RTEMS_NO_PRIORITY, 97 98 &Semaphore_id[ 1 ] 98 99 ); -
c/src/tests/sptests/sp09/screen05.c
r5250ff39 r7f6a24ab 24 24 rtems_status_code status; 25 25 26 status = rtems_semaphore_create( 0, 1, RTEMS_DEFAULT_ATTRIBUTES, &Junk_id ); 26 status = rtems_semaphore_create( 27 0, 28 1, 29 RTEMS_DEFAULT_ATTRIBUTES, 30 RTEMS_NO_PRIORITY, 31 &Junk_id 32 ); 27 33 fatal_directive_status( 28 34 status, … … 36 42 1, 37 43 RTEMS_DEFAULT_ATTRIBUTES, 44 RTEMS_NO_PRIORITY, 38 45 &Semaphore_id[ 1 ] 39 46 ); … … 45 52 1, 46 53 RTEMS_BINARY_SEMAPHORE, 54 RTEMS_NO_PRIORITY, 47 55 &Semaphore_id[ 2 ] 48 56 ); … … 55 63 1, 56 64 RTEMS_DEFAULT_ATTRIBUTES, 57 &Junk_id); 65 RTEMS_NO_PRIORITY, 66 &Junk_id 67 ); 58 68 } while (status == RTEMS_SUCCESSFUL); 59 69 … … 69 79 1, 70 80 RTEMS_INHERIT_PRIORITY | RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO, 81 RTEMS_NO_PRIORITY, 71 82 &Junk_id 72 83 ); … … 82 93 1, 83 94 RTEMS_INHERIT_PRIORITY | RTEMS_COUNTING_SEMAPHORE | RTEMS_PRIORITY, 95 RTEMS_NO_PRIORITY, 84 96 &Junk_id 85 97 ); … … 95 107 2, 96 108 RTEMS_BINARY_SEMAPHORE, 109 RTEMS_NO_PRIORITY, 97 110 &Junk_id 98 111 ); … … 108 121 1, 109 122 RTEMS_GLOBAL, 123 RTEMS_NO_PRIORITY, 110 124 &Junk_id 111 125 ); -
c/src/tests/sptests/sp12/init.c
r5250ff39 r7f6a24ab 54 54 55 55 status = rtems_semaphore_create( 56 Semaphore_name[ 1 ], 57 1, 58 RTEMS_DEFAULT_ATTRIBUTES, 59 &Semaphore_id[ 1 ] 56 Semaphore_name[ 1 ], 57 1, 58 RTEMS_DEFAULT_ATTRIBUTES, 59 RTEMS_NO_PRIORITY, 60 &Semaphore_id[ 1 ] 60 61 ); 61 62 directive_failed( status, "rtems_semaphore_create of SM1" ); … … 65 66 0, 66 67 RTEMS_PRIORITY, 68 RTEMS_NO_PRIORITY, 67 69 &Semaphore_id[ 2 ] 68 70 ); … … 73 75 1, 74 76 RTEMS_DEFAULT_ATTRIBUTES, 77 RTEMS_NO_PRIORITY, 75 78 &Semaphore_id[ 3 ] 76 79 ); … … 95 98 0, 96 99 RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY, 100 RTEMS_NO_PRIORITY, 97 101 &Semaphore_id[ 2 ] 98 102 ); … … 111 115 1, 112 116 RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY, 117 RTEMS_NO_PRIORITY, 113 118 &Semaphore_id[ 2 ] 114 119 ); … … 126 131 0, 127 132 RTEMS_PRIORITY, 133 RTEMS_NO_PRIORITY, 128 134 &Semaphore_id[ 2 ] 129 135 ); -
c/src/tests/tmtests/tm01/task1.c
r5250ff39 r7f6a24ab 83 83 OPERATION_COUNT, 84 84 RTEMS_DEFAULT_MODES, 85 RTEMS_NO_PRIORITY, 85 86 &smid 86 87 ); … … 111 112 OPERATION_COUNT, 112 113 RTEMS_DEFAULT_ATTRIBUTES, 114 RTEMS_NO_PRIORITY, 113 115 &smid 114 116 ); -
c/src/tests/tmtests/tm02/task1.c
r5250ff39 r7f6a24ab 108 108 0, 109 109 RTEMS_DEFAULT_ATTRIBUTES, 110 RTEMS_NO_PRIORITY, 110 111 &Semaphore_id 111 112 ); -
c/src/tests/tmtests/tm03/task1.c
r5250ff39 r7f6a24ab 72 72 0, 73 73 RTEMS_DEFAULT_ATTRIBUTES, 74 RTEMS_NO_PRIORITY, 74 75 &Semaphore_id 75 76 ); -
c/src/tests/tmtests/tm04/task1.c
r5250ff39 r7f6a24ab 78 78 0, 79 79 RTEMS_DEFAULT_ATTRIBUTES, 80 RTEMS_NO_PRIORITY, 80 81 &Semaphore_id 81 82 ); -
c/src/tests/tmtests/tm21/task1.c
r5250ff39 r7f6a24ab 83 83 OPERATION_COUNT, 84 84 RTEMS_DEFAULT_ATTRIBUTES, 85 RTEMS_NO_PRIORITY, 85 86 &id 86 87 ); -
c/src/tests/tmtests/tm25/task1.c
r5250ff39 r7f6a24ab 42 42 0, 43 43 RTEMS_DEFAULT_ATTRIBUTES, 44 RTEMS_NO_PRIORITY, 44 45 &Semaphore_id 45 46 ); -
c/src/tests/tmtests/tm26/task1.c
r5250ff39 r7f6a24ab 142 142 OPERATION_COUNT, 143 143 RTEMS_DEFAULT_ATTRIBUTES, 144 RTEMS_NO_PRIORITY, 144 145 &Semaphore_id 145 146 ); -
c/src/tests/tmtests/tmoverhd/dumrtems.h
r5250ff39 r7f6a24ab 173 173 Empty_directive( rnid, segaddr ) 174 174 175 #define rtems_semaphore_create( name, count, attr, smid ) \176 Empty_directive( name, count, attr, smid )175 #define rtems_semaphore_create( name, count, attr, priceil, smid ) \ 176 Empty_directive( name, count, attr, priceil, smid ) 177 177 #define rtems_semaphore_delete( smid ) \ 178 178 Empty_directive( smid ) -
c/src/tests/tmtests/tmoverhd/testtask.c
r5250ff39 r7f6a24ab 511 511 128, 512 512 RTEMS_DEFAULT_ATTRIBUTES, 513 RTEMS_NO_PRIORITY, 513 514 &id 514 515 );
Note: See TracChangeset
for help on using the changeset viewer.