Changeset 05279b84 in rtems
- Timestamp:
- 04/17/04 13:32:13 (20 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 50f32b11
- Parents:
- 3b2c473
- Location:
- cpukit/score
- Files:
-
- 74 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/score/include/rtems/debug.h
r3b2c473 r05279b84 71 71 * This routine disables the specified types of debug checks. 72 72 */ 73 73 74 74 void rtems_debug_disable ( 75 75 rtems_debug_control to_be_disabled 76 76 ); 77 77 78 78 /* 79 79 * -
cpukit/score/include/rtems/score/apiext.h
r3b2c473 r05279b84 24 24 * can add an extension to the system initialization thread. 25 25 */ 26 26 27 27 typedef void (*API_extensions_Predriver_hook)(void); 28 28 typedef void (*API_extensions_Postdriver_hook)(void); … … 30 30 Thread_Control * 31 31 ); 32 32 33 33 34 34 typedef struct { … … 42 42 * This is the list of API extensions to the system initialization. 43 43 */ 44 44 45 45 SCORE_EXTERN Chain_Control _API_extensions_List; 46 46 … … 53 53 * 54 54 */ 55 55 56 56 void _API_extensions_Initialization( void ); 57 57 58 58 /* 59 59 * _API_extensions_Add … … 63 63 * XXX 64 64 */ 65 65 66 66 void _API_extensions_Add( 67 67 API_extensions_Control *the_extension … … 75 75 * XXX 76 76 */ 77 77 78 78 void _API_extensions_Run_predriver( void ); 79 79 -
cpukit/score/include/rtems/score/apimutex.h
r3b2c473 r05279b84 110 110 &(_the_mutex)->Mutex, (_the_mutex)->Object.id, TRUE, 0, (_level) ); \ 111 111 } while (0) 112 112 113 113 /* 114 114 * _API_Mutex_Unlock -
cpukit/score/include/rtems/score/bitfield.h
r3b2c473 r05279b84 62 62 }; 63 63 #endif 64 64 65 65 #endif 66 66 -
cpukit/score/include/rtems/score/chain.h
r3b2c473 r05279b84 86 86 * _Chain_Get_first_unprotected 87 87 */ 88 88 89 89 #ifndef RTEMS_INLINES 90 90 Chain_Node *_Chain_Get_first_unprotected( -
cpukit/score/include/rtems/score/coremsg.h
r3b2c473 r05279b84 13 13 * $Id$ 14 14 */ 15 15 16 16 #ifndef __RTEMS_CORE_MESSAGE_QUEUE_h 17 17 #define __RTEMS_CORE_MESSAGE_QUEUE_h 18 18 19 19 #ifdef __cplusplus 20 20 extern "C" { … … 26 26 #include <rtems/score/priority.h> 27 27 #include <rtems/score/watchdog.h> 28 28 29 29 /* 30 30 * The following type defines the callout which the API provides 31 31 * to support global/multiprocessor operations on message_queues. 32 32 */ 33 33 34 34 typedef void ( *CORE_message_queue_API_mp_support_callout )( 35 35 Thread_Control *, … … 44 44 * but since messages are variable length we just make a ptr to 1. 45 45 */ 46 46 47 47 typedef struct { 48 48 uint32_t size; 49 49 uint32_t buffer[1]; 50 50 } CORE_message_queue_Buffer; 51 51 52 52 /* 53 53 * The following records define the organization of a message 54 54 * buffer. 55 55 */ 56 56 57 57 typedef struct { 58 58 Chain_Node Node; … … 82 82 #define CORE_MESSAGE_QUEUE_SEND_REQUEST INT_MAX 83 83 #define CORE_MESSAGE_QUEUE_URGENT_REQUEST INT_MIN 84 84 85 85 typedef int CORE_message_queue_Submit_types; 86 86 … … 88 88 * Core Message queue handler return statuses. 89 89 */ 90 90 91 91 typedef enum { 92 92 CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL, … … 108 108 CORE_message_queue_Disciplines discipline; 109 109 } CORE_message_queue_Attributes; 110 110 111 111 /* 112 112 * The following defines the type for a Notification handler. A notification … … 121 121 * counting message_queue. 122 122 */ 123 123 124 124 typedef struct { 125 125 Thread_queue_Control Wait_queue; … … 149 149 uint32_t maximum_message_size 150 150 ); 151 151 152 152 /* 153 153 * _CORE_message_queue_Close … … 158 158 * flushing the message_queue's task wait queue. 159 159 */ 160 160 161 161 void _CORE_message_queue_Close( 162 162 CORE_message_queue_Control *the_message_queue, … … 187 187 * them to the inactive message chain. 188 188 */ 189 189 190 190 uint32_t _CORE_message_queue_Flush_support( 191 191 CORE_message_queue_Control *the_message_queue 192 192 ); 193 193 194 194 /* 195 195 * _CORE_message_queue_Flush_waiting_threads … … 215 215 * 216 216 */ 217 217 218 218 CORE_message_queue_Status _CORE_message_queue_Broadcast( 219 219 CORE_message_queue_Control *the_message_queue, … … 238 238 * 239 239 */ 240 240 241 241 CORE_message_queue_Status _CORE_message_queue_Submit( 242 242 CORE_message_queue_Control *the_message_queue, … … 262 262 * NOTE: Returns message priority via return are in TCB. 263 263 */ 264 264 265 265 void _CORE_message_queue_Seize( 266 266 CORE_message_queue_Control *the_message_queue, … … 295 295 } 296 296 #endif 297 297 298 298 #endif 299 299 /* end of include file */ -
cpukit/score/include/rtems/score/coremutex.h
r3b2c473 r05279b84 15 15 * $Id$ 16 16 */ 17 17 18 18 #ifndef __RTEMS_CORE_MUTEX_h 19 19 #define __RTEMS_CORE_MUTEX_h 20 20 21 21 #ifdef __cplusplus 22 22 extern "C" { … … 29 29 #include <rtems/score/interr.h> 30 30 #include <rtems/score/sysstate.h> 31 31 32 32 /* 33 33 * The following type defines the callout which the API provides 34 34 * to support global/multiprocessor operations on mutexes. 35 35 */ 36 36 37 37 typedef void ( *CORE_mutex_API_mp_support_callout )( 38 38 Thread_Control *, … … 54 54 * Mutex handler return statuses. 55 55 */ 56 56 57 57 typedef enum { 58 58 CORE_MUTEX_STATUS_SUCCESSFUL, … … 93 93 CORE_MUTEX_NESTING_BLOCKS 94 94 } CORE_mutex_Nesting_behaviors; 95 95 96 96 /* 97 97 * Locked and unlocked values … … 112 112 Priority_Control priority_ceiling; 113 113 } CORE_mutex_Attributes; 114 114 115 115 /* 116 116 * The following defines the control block used to manage each mutex. 117 117 */ 118 118 119 119 typedef struct { 120 120 Thread_queue_Control Wait_queue; … … 140 140 uint32_t initial_lock 141 141 ); 142 142 143 143 /* 144 144 * _CORE_mutex_Seize … … 210 210 CORE_mutex_API_mp_support_callout api_mutex_mp_support 211 211 ); 212 212 213 213 /* 214 214 * _CORE_mutex_Flush … … 219 219 * wait queue. 220 220 */ 221 221 222 222 void _CORE_mutex_Flush( 223 223 CORE_mutex_Control *the_mutex, … … 225 225 uint32_t status 226 226 ); 227 227 228 228 #include <rtems/score/coremutex.inl> 229 229 #endif … … 232 232 } 233 233 #endif 234 234 235 235 #endif 236 236 /* end of include file */ -
cpukit/score/include/rtems/score/coresem.h
r3b2c473 r05279b84 15 15 * $Id$ 16 16 */ 17 17 18 18 #ifndef __RTEMS_CORE_COUNTING_SEMAPHORE_h 19 19 #define __RTEMS_CORE_COUNTING_SEMAPHORE_h 20 20 21 21 #ifdef __cplusplus 22 22 extern "C" { … … 27 27 #include <rtems/score/priority.h> 28 28 #include <rtems/score/watchdog.h> 29 29 30 30 /* 31 31 * The following type defines the callout which the API provides 32 32 * to support global/multiprocessor operations on semaphores. 33 33 */ 34 34 35 35 typedef void ( *CORE_semaphore_API_mp_support_callout )( 36 36 Thread_Control *, … … 50 50 * Core Semaphore handler return statuses. 51 51 */ 52 52 53 53 typedef enum { 54 54 CORE_SEMAPHORE_STATUS_SUCCESSFUL, … … 68 68 CORE_semaphore_Disciplines discipline; 69 69 } CORE_semaphore_Attributes; 70 70 71 71 /* 72 72 * The following defines the control block used to manage each 73 73 * counting semaphore. 74 74 */ 75 75 76 76 typedef struct { 77 77 Thread_queue_Control Wait_queue; … … 93 93 uint32_t initial_value 94 94 ); 95 95 96 96 /* 97 97 * _CORE_semaphore_Seize … … 111 111 Watchdog_Interval timeout 112 112 ); 113 113 114 114 /* 115 115 * _CORE_semaphore_Surrender … … 127 127 CORE_semaphore_API_mp_support_callout api_semaphore_mp_support 128 128 ); 129 129 130 130 /* 131 131 * _CORE_semaphore_Flush … … 150 150 } 151 151 #endif 152 152 153 153 #endif 154 154 /* end of include file */ -
cpukit/score/include/rtems/score/heap.h
r3b2c473 r05279b84 45 45 HEAP_GET_INFORMATION_BLOCK_ERROR 46 46 } Heap_Get_information_status; 47 47 48 48 /* 49 49 * Information block returned by _Heap_Get_information -
cpukit/score/include/rtems/score/interr.h
r3b2c473 r05279b84 61 61 * This type holds the fatal error information. 62 62 */ 63 63 64 64 typedef struct { 65 65 Internal_errors_Source the_source; -
cpukit/score/include/rtems/score/isr.h
r3b2c473 r05279b84 61 61 * the cpu can vector. 62 62 */ 63 63 64 64 #define ISR_NUMBER_OF_VECTORS CPU_INTERRUPT_NUMBER_OF_VECTORS 65 65 … … 167 167 * This routine returns the current interrupt level. 168 168 */ 169 169 170 170 #define _ISR_Get_level() \ 171 171 _CPU_ISR_Get_level() 172 172 173 173 /* 174 174 * _ISR_Set_level -
cpukit/score/include/rtems/score/mpci.h
r3b2c473 r05279b84 33 33 * the system threads. 34 34 */ 35 35 36 36 #define MPCI_RECEIVE_SERVER_STACK_SIZE \ 37 37 ( STACK_MINIMUM_SIZE + \ … … 101 101 102 102 typedef void (*MPCI_Packet_processor)( MP_packet_Prefix * ); 103 103 104 104 /* 105 105 * The following enumerated type defines the list of 106 106 * internal MP operations. 107 107 */ 108 108 109 109 typedef enum { 110 110 MPCI_PACKETS_SYSTEM_VERIFY = 0 111 111 } MPCI_Internal_Remote_operations; 112 112 113 113 /* 114 114 * The following data structure defines the packet used to perform 115 115 * remote event operations. 116 116 */ 117 117 118 118 typedef struct { 119 119 MP_packet_Prefix Prefix; … … 139 139 * configuration information. 140 140 */ 141 141 142 142 SCORE_EXTERN MPCI_Control *_MPCI_table; 143 143 … … 145 145 * The following points to the MPCI Receive Server. 146 146 */ 147 147 148 148 SCORE_EXTERN Thread_Control *_MPCI_Receive_server_tcb; 149 149 … … 198 198 * designated object class. 199 199 */ 200 200 201 201 void _MPCI_Register_packet_processor( 202 202 MP_packet_Classes the_class, 203 203 MPCI_Packet_processor the_packet_processor 204 205 ); 206 204 205 ); 206 207 207 /* 208 208 * _MPCI_Get_packet … … 301 301 * 302 302 */ 303 303 304 304 Thread _MPCI_Receive_server( 305 305 uint32_t ignored … … 314 314 * XXX 315 315 */ 316 316 317 317 void _MPCI_Announce ( void ); 318 318 … … 325 325 * process operation can be performed on another node. 326 326 */ 327 327 328 328 void _MPCI_Internal_packets_Send_process_packet ( 329 329 MPCI_Internal_Remote_operations operation 330 330 ); 331 331 332 332 /* 333 333 * _MPCI_Internal_packets_Send_request_packet … … 341 341 * packets to be sent by this manager. 342 342 */ 343 343 344 344 /* 345 345 * _MPCI_Internal_packets_Send_response_packet … … 353 353 * packets to be sent by this manager. 354 354 */ 355 355 356 356 /* 357 357 * … … 363 363 * the request from another node. 364 364 */ 365 365 366 366 void _MPCI_Internal_packets_Process_packet ( 367 367 MP_packet_Prefix *the_packet_prefix 368 368 ); 369 369 370 370 /* 371 371 * _MPCI_Internal_packets_Send_object_was_deleted … … 380 380 * deleted by this manager. 381 381 */ 382 382 383 383 /* 384 384 * _MPCI_Internal_packets_Send_extract_proxy … … 393 393 * deleted by this manager. 394 394 */ 395 395 396 396 /* 397 397 * _MPCI_Internal_packets_Get_packet … … 401 401 * This routine is used to obtain a internal threads mp packet. 402 402 */ 403 403 404 404 MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void ); 405 405 -
cpukit/score/include/rtems/score/object.h
r3b2c473 r05279b84 378 378 * This method zeroes out the name. 379 379 */ 380 380 381 381 void _Objects_Clear_name( 382 382 void *name, -
cpukit/score/include/rtems/score/objectmp.h
r3b2c473 r05279b84 56 56 * specified information table. 57 57 */ 58 58 59 59 void _Objects_MP_Open ( 60 60 Objects_Information *information, -
cpukit/score/include/rtems/score/priority.h
r3b2c473 r05279b84 74 74 * These may simply be pass throughs to CPU dependent routines. 75 75 */ 76 76 77 77 #if ( CPU_USE_GENERIC_BITFIELD_CODE == FALSE ) 78 78 79 79 #define _Priority_Mask( _bit_number ) \ 80 80 _CPU_Priority_Mask( _bit_number ) 81 81 82 82 #define _Priority_Bits_index( _priority ) \ 83 83 _CPU_Priority_bits_index( _priority ) 84 84 85 85 #endif 86 86 87 87 #ifndef __RTEMS_APPLICATION__ 88 88 #include <rtems/score/priority.inl> -
cpukit/score/include/rtems/score/sysstate.h
r3b2c473 r05279b84 44 44 * an multiprocessing system. 45 45 */ 46 46 47 47 SCORE_EXTERN boolean _System_state_Is_multiprocessing; 48 48 -
cpukit/score/include/rtems/score/thread.h
r3b2c473 r05279b84 232 232 233 233 SCORE_EXTERN void *rtems_ada_self; 234 234 235 235 /* 236 236 * The following defines the information control block used to 237 237 * manage this class of objects. 238 238 */ 239 239 240 240 SCORE_EXTERN Objects_Information _Thread_Internal_information; 241 241 242 242 /* 243 243 * The following define the thread control pointers used to access 244 244 * and manipulate the idle thread. 245 245 */ 246 246 247 247 SCORE_EXTERN Thread_Control *_Thread_Idle; 248 248 … … 254 254 * which initiated the system. 255 255 */ 256 256 257 257 SCORE_EXTERN Context_Control _Thread_BSP_context; 258 258 259 259 /* 260 260 * The following declares the dispatch critical section nesting … … 349 349 * WARNING!! No thread should be created before this one. 350 350 */ 351 351 352 352 void _Thread_Create_idle( void ); 353 353 … … 454 454 * thread competes with all other threads for CPU time. 455 455 */ 456 456 457 457 boolean _Thread_Start( 458 458 Thread_Control *the_thread, … … 472 472 * original starting point. 473 473 */ 474 474 475 475 /* XXX multiple task arg profiles */ 476 476 477 477 boolean _Thread_Restart( 478 478 Thread_Control *the_thread, … … 489 489 * not restart it. 490 490 */ 491 491 492 492 void _Thread_Reset( 493 493 Thread_Control *the_thread, … … 505 505 * operations on this thread are allowed. 506 506 */ 507 507 508 508 void _Thread_Close( 509 509 Objects_Information *information, … … 741 741 * subroutine call. 742 742 */ 743 743 744 744 #ifndef RTEMS_INLINES 745 745 Thread_Control *_Thread_Get ( … … 756 756 * This routine is the body of the system idle thread. 757 757 */ 758 758 759 759 #if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE) 760 760 Thread _Thread_Idle_body( … … 771 771 * invokes the specified routine. 772 772 */ 773 773 774 774 typedef void (*rtems_per_thread_routine)( Thread_Control * ); 775 775 -
cpukit/score/include/rtems/score/threadq.h
r3b2c473 r05279b84 30 30 * Constant for indefinite wait. 31 31 */ 32 32 33 33 #define THREAD_QUEUE_WAIT_FOREVER WATCHDOG_NO_TIMEOUT 34 34 … … 47 47 * extracted from the remote queue). 48 48 */ 49 49 50 50 #if 0 51 51 typedef void ( *Thread_queue_Extract_callout )( … … 109 109 * another node, it is also dealt with. 110 110 */ 111 111 112 112 boolean _Thread_queue_Extract_with_proxy( 113 113 Thread_Control *the_thread -
cpukit/score/include/rtems/score/tqdata.h
r3b2c473 r05279b84 39 39 * queue was in the synchronization window. 40 40 */ 41 41 42 42 typedef enum { 43 43 THREAD_QUEUE_SYNCHRONIZED, -
cpukit/score/include/rtems/score/userext.h
r3b2c473 r05279b84 32 32 * the system as a whole. 33 33 */ 34 34 35 35 typedef void User_extensions_routine; 36 36 37 37 typedef boolean ( *User_extensions_thread_create_extension )( 38 38 Thread_Control *, 39 39 Thread_Control * 40 40 ); 41 41 42 42 typedef User_extensions_routine ( *User_extensions_thread_delete_extension )( 43 43 Thread_Control *, 44 44 Thread_Control * 45 45 ); 46 46 47 47 typedef User_extensions_routine ( *User_extensions_thread_start_extension )( 48 48 Thread_Control *, 49 49 Thread_Control * 50 50 ); 51 51 52 52 typedef User_extensions_routine ( *User_extensions_thread_restart_extension )( 53 53 Thread_Control *, 54 54 Thread_Control * 55 55 ); 56 56 57 57 typedef User_extensions_routine ( *User_extensions_thread_switch_extension )( 58 58 Thread_Control *, 59 59 Thread_Control * 60 60 ); 61 61 62 62 typedef User_extensions_routine ( 63 63 *User_extensions_thread_post_switch_extension )( 64 64 Thread_Control * 65 65 ); 66 66 67 67 typedef User_extensions_routine ( *User_extensions_thread_begin_extension )( 68 68 Thread_Control * 69 69 ); 70 70 71 71 typedef User_extensions_routine ( *User_extensions_thread_exitted_extension )( 72 72 Thread_Control * 73 73 ); 74 74 75 75 typedef User_extensions_routine ( *User_extensions_fatal_extension )( 76 76 Internal_errors_Source /* the_source */, … … 79 79 ); 80 80 81 81 82 82 typedef struct { 83 83 User_extensions_thread_create_extension thread_create; -
cpukit/score/include/rtems/score/wkspace.h
r3b2c473 r05279b84 39 39 * This routine performs the initialization necessary for this handler. 40 40 */ 41 41 42 42 void _Workspace_Handler_initialization( 43 43 void *starting_address, -
cpukit/score/include/rtems/seterr.h
r3b2c473 r05279b84 9 9 * $Id$ 10 10 */ 11 11 12 12 #ifndef __RTEMS_SET_ERRNO_h 13 13 #define __RTEMS_SET_ERRNO_h 14 14 15 15 #define rtems_set_errno_and_return_minus_one( _error ) \ 16 16 do { errno = (_error); return -1; } while(0) -
cpukit/score/src/apiext.c
r3b2c473 r05279b84 21 21 * _API_extensions_Initialization 22 22 */ 23 23 24 24 void _API_extensions_Initialization( void ) 25 25 { 26 26 _Chain_Initialize_empty( &_API_extensions_List ); 27 27 } 28 28 29 29 /*PAGE 30 30 * 31 31 * _API_extensions_Add 32 32 */ 33 33 34 34 void _API_extensions_Add( 35 35 API_extensions_Control *the_extension … … 48 48 Chain_Node *the_node; 49 49 API_extensions_Control *the_extension; 50 50 51 51 for ( the_node = _API_extensions_List.first ; 52 52 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 53 53 the_node = the_node->next ) { 54 54 55 55 the_extension = (API_extensions_Control *) the_node; 56 56 57 57 if ( the_extension->predriver_hook ) 58 58 (*the_extension->predriver_hook)(); … … 69 69 Chain_Node *the_node; 70 70 API_extensions_Control *the_extension; 71 71 72 72 for ( the_node = _API_extensions_List.first ; 73 73 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 74 74 the_node = the_node->next ) { 75 75 76 76 the_extension = (API_extensions_Control *) the_node; 77 77 78 78 if ( the_extension->postdriver_hook ) 79 79 (*the_extension->postdriver_hook)(); … … 90 90 Chain_Node *the_node; 91 91 API_extensions_Control *the_extension; 92 92 93 93 for ( the_node = _API_extensions_List.first ; 94 94 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 95 95 the_node = the_node->next ) { 96 96 97 97 the_extension = (API_extensions_Control *) the_node; 98 98 99 99 if ( the_extension->postswitch_hook ) 100 100 (*the_extension->postswitch_hook)( _Thread_Executing ); -
cpukit/score/src/coremsg.c
r3b2c473 r05279b84 63 63 the_message_queue->maximum_message_size = maximum_message_size; 64 64 _CORE_message_queue_Set_notify( the_message_queue, NULL, NULL ); 65 65 66 66 /* 67 67 * round size up to multiple of a ptr for chain init 68 68 */ 69 69 70 70 allocated_message_size = maximum_message_size; 71 71 if (allocated_message_size & (sizeof(uint32_t ) - 1)) { … … 73 73 allocated_message_size &= ~(sizeof(uint32_t ) - 1); 74 74 } 75 75 76 76 message_buffering_required = maximum_pending_messages * 77 77 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 78 78 79 79 the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 80 80 _Workspace_Allocate( message_buffering_required ); 81 81 82 82 if (the_message_queue->message_buffers == 0) 83 83 return FALSE; 84 84 85 85 _Chain_Initialize ( 86 86 &the_message_queue->Inactive_messages, … … 89 89 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) 90 90 ); 91 91 92 92 _Chain_Initialize_empty( &the_message_queue->Pending_messages ); 93 93 94 94 _Thread_queue_Initialize( 95 95 &the_message_queue->Wait_queue, -
cpukit/score/src/coremsgclose.c
r3b2c473 r05279b84 44 44 * Output parameters: NONE 45 45 */ 46 46 47 47 void _CORE_message_queue_Close( 48 48 CORE_message_queue_Control *the_message_queue, … … 68 68 * the flush satisfying any blocked senders as a side-effect. 69 69 */ 70 70 71 71 if ( the_message_queue->number_of_pending_messages != 0 ) 72 72 (void) _CORE_message_queue_Flush_support( the_message_queue ); -
cpukit/score/src/coremsgflush.c
r3b2c473 r05279b84 43 43 * returns - the number of messages flushed from the queue 44 44 */ 45 45 46 46 uint32_t _CORE_message_queue_Flush( 47 47 CORE_message_queue_Control *the_message_queue -
cpukit/score/src/coremsgflushwait.c
r3b2c473 r05279b84 43 43 * returns - the number of messages flushed from the queue 44 44 */ 45 45 46 46 void _CORE_message_queue_Flush_waiting_threads( 47 47 CORE_message_queue_Control *the_message_queue -
cpukit/score/src/coremsgsubmit.c
r3b2c473 r05279b84 76 76 * Is there a thread currently waiting on this message queue? 77 77 */ 78 78 79 79 if ( the_message_queue->number_of_pending_messages == 0 ) { 80 80 the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); … … 87 87 *(uint32_t *)the_thread->Wait.return_argument_1 = size; 88 88 the_thread->Wait.count = submit_type; 89 89 90 90 #if defined(RTEMS_MULTIPROCESSING) 91 91 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) -
cpukit/score/src/coremutexseize.c
r3b2c473 r05279b84 84 84 Thread_Control *executing; 85 85 ISR_Level level = *level_p; 86 86 87 87 /* disabled when you get here */ 88 88 89 89 executing = _Thread_Executing; 90 90 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; -
cpukit/score/src/coremutexsurrender.c
r3b2c473 r05279b84 111 111 #if defined(RTEMS_MULTIPROCESSING) 112 112 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) { 113 113 114 114 the_mutex->holder = NULL; 115 115 the_mutex->holder_id = the_thread->Object.id; -
cpukit/score/src/coresemflush.c
r3b2c473 r05279b84 41 41 * Output parameters: NONE 42 42 */ 43 43 44 44 void _CORE_semaphore_Flush( 45 45 CORE_semaphore_Control *the_semaphore, … … 48 48 ) 49 49 { 50 50 51 51 _Thread_queue_Flush( 52 52 &the_semaphore->Wait_queue, … … 54 54 status 55 55 ); 56 56 57 57 } -
cpukit/score/src/heapallocate.c
r3b2c473 r05279b84 55 55 excess = size % the_heap->page_size; 56 56 the_size = size + the_heap->page_size + HEAP_BLOCK_USED_OVERHEAD; 57 57 58 58 if ( excess ) 59 59 the_size += the_heap->page_size - excess; … … 91 91 ptr = _Heap_Start_of_user_area( the_block ); 92 92 } 93 93 94 94 /* 95 95 * round ptr up to a multiple of page size 96 96 * Have to save the bump amount in the buffer so that free can figure it out 97 97 */ 98 98 99 99 offset = the_heap->page_size - (((uint32_t ) ptr) & (the_heap->page_size - 1)); 100 100 ptr = _Addresses_Add_offset( ptr, offset ); -
cpukit/score/src/heapextend.c
r3b2c473 r05279b84 42 42 Heap_Block *the_block; 43 43 uint32_t *p; 44 44 45 45 /* 46 46 * The overhead was taken from the original heap memory. … … 107 107 p++; 108 108 _Heap_Free( the_heap, p ); 109 109 110 110 return HEAP_EXTEND_SUCCESSFUL; 111 111 } -
cpukit/score/src/heapgetinfo.c
r3b2c473 r05279b84 68 68 69 69 while (notdone) { 70 70 71 71 /* 72 72 * Accumulate size … … 80 80 the_info->used_size += _Heap_Block_size(the_block); 81 81 } 82 82 83 83 /* 84 84 * Handle the last block -
cpukit/score/src/heapsizeofuserarea.c
r3b2c473 r05279b84 46 46 47 47 the_block = _Heap_User_block_at( starting_address ); 48 48 49 49 if ( !_Heap_Is_block_in( the_heap, the_block ) || 50 50 _Heap_Is_block_free( the_block ) ) -
cpukit/score/src/heapwalk.c
r3b2c473 r05279b84 89 89 if (error && (passes > 10)) 90 90 abort(); 91 91 92 92 if (do_dump == TRUE) { 93 93 printf("PASS: %d Block @ 0x%p Back %d, Front %d", -
cpukit/score/src/iterateoverthreads.c
r3b2c473 r05279b84 25 25 Thread_Control *the_thread; 26 26 Objects_Information *information; 27 27 28 28 for ( api_index = 1 ; 29 29 api_index <= OBJECTS_APIS_LAST ; … … 35 35 for ( i=1 ; i <= information->maximum ; i++ ) { 36 36 the_thread = (Thread_Control *)information->local_table[ i ]; 37 37 38 38 if ( !the_thread ) 39 39 continue; 40 40 41 41 (*routine)(the_thread); 42 42 } 43 43 } 44 44 } 45 45 46 46 } -
cpukit/score/src/mpci.c
r3b2c473 r05279b84 58 58 * Register the MP Process Packet routine. 59 59 */ 60 60 61 61 _MPCI_Register_packet_processor( 62 62 MP_PACKET_MPCI_INTERNAL, … … 104 104 105 105 _MPCI_Receive_server_tcb = _Thread_Internal_allocate(); 106 106 107 107 _Thread_Initialize( 108 108 &_Thread_Internal_information, … … 118 118 _MPCI_Internal_name 119 119 ); 120 120 121 121 _Thread_Start( 122 122 _MPCI_Receive_server_tcb, … … 148 148 * designated object class. 149 149 */ 150 150 151 151 void _MPCI_Register_packet_processor( 152 152 MP_packet_Classes the_class, 153 153 MPCI_Packet_processor the_packet_processor 154 154 155 155 ) 156 156 { … … 348 348 ) 349 349 { 350 350 351 351 MP_packet_Prefix *the_packet; 352 352 MPCI_Packet_processor the_function; 353 353 Thread_Control *executing; 354 354 355 355 executing = _Thread_Executing; 356 356 357 357 for ( ; ; ) { 358 358 359 359 executing->receive_packet = NULL; 360 360 … … 362 362 _CORE_semaphore_Seize( &_MPCI_Semaphore, 0, TRUE, WATCHDOG_NO_TIMEOUT ); 363 363 _Thread_Enable_dispatch(); 364 364 365 365 for ( ; ; ) { 366 366 the_packet = _MPCI_Receive_packet(); 367 367 368 368 if ( !the_packet ) 369 369 break; 370 370 371 371 executing->receive_packet = the_packet; 372 372 373 373 if ( !_Mp_packet_Is_valid_packet_class ( the_packet->the_class ) ) 374 374 break; 375 375 376 376 the_function = _MPCI_Packet_processors[ the_packet->the_class ]; 377 377 378 378 if ( !the_function ) 379 379 _Internal_error_Occurred( … … 382 382 INTERNAL_ERROR_BAD_PACKET 383 383 ); 384 384 385 385 (*the_function)( the_packet ); 386 386 } … … 395 395 * 396 396 */ 397 397 398 398 void _MPCI_Announce ( void ) 399 399 { … … 408 408 * 409 409 */ 410 410 411 411 void _MPCI_Internal_packets_Send_process_packet ( 412 412 MPCI_Internal_Remote_operations operation … … 414 414 { 415 415 MPCI_Internal_packet *the_packet; 416 416 417 417 switch ( operation ) { 418 418 419 419 case MPCI_PACKETS_SYSTEM_VERIFY: 420 420 421 421 the_packet = _MPCI_Internal_packets_Get_packet(); 422 422 the_packet->Prefix.the_class = MP_PACKET_MPCI_INTERNAL; … … 424 424 the_packet->Prefix.to_convert = sizeof ( MPCI_Internal_packet ); 425 425 the_packet->operation = operation; 426 426 427 427 the_packet->maximum_nodes = _Objects_Maximum_nodes; 428 428 429 429 the_packet->maximum_global_objects = _Objects_MP_Maximum_global_objects; 430 430 431 431 _MPCI_Send_process_packet( MPCI_ALL_NODES, &the_packet->Prefix ); 432 432 break; 433 433 } 434 434 } 435 435 436 436 /*PAGE 437 437 * … … 442 442 * 443 443 */ 444 444 445 445 /*PAGE 446 446 * … … 451 451 * 452 452 */ 453 453 454 454 /*PAGE 455 455 * … … 458 458 * 459 459 */ 460 460 461 461 void _MPCI_Internal_packets_Process_packet ( 462 462 MP_packet_Prefix *the_packet_prefix … … 466 466 uint32_t maximum_nodes; 467 467 uint32_t maximum_global_objects; 468 468 469 469 the_packet = (MPCI_Internal_packet *) the_packet_prefix; 470 470 471 471 switch ( the_packet->operation ) { 472 472 473 473 case MPCI_PACKETS_SYSTEM_VERIFY: 474 474 475 475 maximum_nodes = the_packet->maximum_nodes; 476 476 maximum_global_objects = the_packet->maximum_global_objects; 477 477 if ( maximum_nodes != _Objects_Maximum_nodes || 478 478 maximum_global_objects != _Objects_MP_Maximum_global_objects ) { 479 479 480 480 _MPCI_Return_packet( the_packet_prefix ); 481 481 482 482 _Internal_error_Occurred( 483 483 INTERNAL_ERROR_CORE, … … 486 486 ); 487 487 } 488 488 489 489 _MPCI_Return_packet( the_packet_prefix ); 490 490 491 491 break; 492 492 } 493 493 } 494 494 495 495 /*PAGE 496 496 * … … 501 501 * 502 502 */ 503 503 504 504 /*PAGE 505 505 * … … 510 510 * 511 511 */ 512 512 513 513 /*PAGE 514 514 * … … 516 516 * 517 517 */ 518 518 519 519 MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void ) 520 520 { -
cpukit/score/src/objectallocate.c
r3b2c473 r05279b84 47 47 * extend information base. 48 48 */ 49 49 50 50 if ( !the_object ) { 51 51 _Objects_Extend_information( information ); 52 52 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 53 53 } 54 54 55 55 if ( the_object ) { 56 56 uint32_t block; 57 57 58 58 block = _Objects_Get_index( the_object->id ) - 59 59 _Objects_Get_index( information->minimum_id ); 60 60 block /= information->allocation_size; 61 61 62 62 information->inactive_per_block[ block ]--; 63 63 information->inactive--; 64 64 } 65 65 } 66 66 67 67 return the_object; 68 68 } -
cpukit/score/src/objectallocatebyindex.c
r3b2c473 r05279b84 55 55 * + etc. 56 56 */ 57 57 58 58 the_object = (Objects_Control *) _Addresses_Add_offset( 59 59 information->object_blocks[ 0 ], … … 61 61 ); 62 62 _Chain_Extract( &the_object->Node ); 63 63 64 64 return the_object; 65 65 } -
cpukit/score/src/objectcomparenameraw.c
r3b2c473 r05279b84 31 31 * XXX 32 32 */ 33 33 34 34 boolean _Objects_Compare_name_raw( 35 35 void *name_1, … … 43 43 uint32_t tmp_length = length / OBJECTS_NAME_ALIGNMENT; 44 44 #endif 45 45 46 46 if ( name_1 == name_2 ) 47 47 return TRUE; -
cpukit/score/src/objectcomparenamestring.c
r3b2c473 r05279b84 41 41 * returns - TRUE on a match 42 42 */ 43 43 44 44 boolean _Objects_Compare_name_string( 45 45 void *name_1, -
cpukit/score/src/objectcopynameraw.c
r3b2c473 r05279b84 31 31 * XXX 32 32 */ 33 33 34 34 void _Objects_Copy_name_raw( 35 35 void *source, … … 41 41 uint32_t *destination_p = (uint32_t *) destination; 42 42 uint32_t tmp_length = length / OBJECTS_NAME_ALIGNMENT; 43 43 44 44 while ( tmp_length-- ) 45 45 *destination_p++ = *source_p++; -
cpukit/score/src/objectcopynamestring.c
r3b2c473 r05279b84 31 31 * XXX 32 32 */ 33 33 34 34 void _Objects_Copy_name_string( 35 35 void *source, … … 39 39 uint8_t *source_p = (uint8_t *) source; 40 40 uint8_t *destination_p = (uint8_t *) destination; 41 41 42 42 *destination_p = '\0'; 43 43 if ( source_p ) { -
cpukit/score/src/objectextendinformation.c
r3b2c473 r05279b84 60 60 index_base = minimum_index; 61 61 block = 0; 62 62 63 63 if ( information->maximum < minimum_index ) 64 64 block_count = 0; 65 65 else { 66 66 block_count = information->maximum / information->allocation_size; 67 67 68 68 for ( ; block < block_count; block++ ) { 69 69 if ( information->object_blocks[ block ] == NULL ) … … 86 86 uint32_t maximum; 87 87 void *old_tables; 88 88 89 89 /* 90 90 * Growing the tables means allocating a new area, doing a copy and … … 110 110 111 111 block_count++; 112 112 113 113 maximum = information->maximum + information->allocation_size; 114 114 … … 116 116 * Allocate the tables and break it up. 117 117 */ 118 118 119 119 if ( information->auto_extend ) { 120 120 object_blocks = (void**) … … 141 141 * 142 142 */ 143 143 144 144 inactive_per_block = (uint32_t *) _Addresses_Add_offset( 145 145 object_blocks, block_count * sizeof(void*) ); … … 148 148 local_table = (Objects_Control **) _Addresses_Add_offset( 149 149 name_table, block_count * sizeof(Objects_Name *) ); 150 150 151 151 /* 152 152 * Take the block count down. Saves all the (block_count - 1) … … 155 155 156 156 block_count--; 157 157 158 158 if ( information->maximum > minimum_index ) { 159 159 160 160 /* 161 161 * Copy each section of the table over. This has to be performed as 162 162 * separate parts as size of each block has changed. 163 163 */ 164 164 165 165 memcpy( object_blocks, 166 166 information->object_blocks, … … 185 185 } 186 186 } 187 187 188 188 /* 189 189 * Initialise the new entries in the table. 190 190 */ 191 191 192 192 object_blocks[block_count] = NULL; 193 193 inactive_per_block[block_count] = 0; … … 199 199 local_table[ index ] = NULL; 200 200 } 201 201 202 202 _ISR_Disable( level ); 203 203 204 204 old_tables = information->object_blocks; 205 205 206 206 information->object_blocks = object_blocks; 207 207 information->inactive_per_block = inactive_per_block; … … 220 220 if ( old_tables ) 221 221 _Workspace_Free( old_tables ); 222 222 223 223 block_count++; 224 224 } 225 225 226 226 /* 227 227 * Allocate the name table, and the objects … … 245 245 ); 246 246 } 247 247 248 248 name_area = (Objects_Name *) _Addresses_Add_offset( 249 249 information->object_blocks[ block ], … … 268 268 269 269 index = index_base; 270 270 271 271 while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 272 272 273 273 the_object->id = _Objects_Build_id( 274 274 information->the_api, … … 277 277 index 278 278 ); 279 279 280 280 the_object->name = (void *) name_area; 281 281 … … 286 286 index++; 287 287 } 288 288 289 289 information->inactive_per_block[ block ] = information->allocation_size; 290 290 information->inactive += information->allocation_size; -
cpukit/score/src/objectfree.c
r3b2c473 r05279b84 46 46 if ( information->auto_extend ) { 47 47 uint32_t block; 48 48 49 49 block = 50 50 _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); 51 51 block /= information->allocation_size; 52 52 53 53 information->inactive_per_block[ block ]++; 54 54 information->inactive++; 55 55 56 56 /* 57 57 * Check if the threshold level has been met of -
cpukit/score/src/objectgetnext.c
r3b2c473 r05279b84 61 61 Objects_Control *object; 62 62 Objects_Id next_id; 63 63 64 64 if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 65 65 next_id = information->minimum_id; … … 74 74 goto final; 75 75 } 76 76 77 77 /* try to grab one */ 78 78 object = _Objects_Get(information, next_id, location_p); -
cpukit/score/src/objectidtoname.c
r3b2c473 r05279b84 42 42 Objects_Control *the_object = (Objects_Control *) 0; 43 43 Objects_Locations ignored_location; 44 44 45 45 if ( !name ) 46 46 return OBJECTS_INVALID_NAME; … … 49 49 if ( the_api && the_api > OBJECTS_APIS_LAST ) 50 50 return OBJECTS_INVALID_ID; 51 51 52 52 the_class = _Objects_Get_class( id ); 53 53 … … 55 55 if ( !information ) 56 56 return OBJECTS_INVALID_ID; 57 57 58 58 if ( information->is_string ) 59 59 return OBJECTS_INVALID_ID; -
cpukit/score/src/objectinitializeinformation.c
r3b2c473 r05279b84 69 69 information->the_class = the_class; 70 70 information->is_string = is_string; 71 71 72 72 information->local_table = 0; 73 73 information->name_table = 0; 74 74 information->inactive_per_block = 0; 75 75 information->object_blocks = 0; 76 76 77 77 information->inactive = 0; 78 78 79 79 /* 80 80 * Set the entry in the object information table. … … 88 88 89 89 information->size = size; 90 90 91 91 /* 92 92 * Are we operating in unlimited, or auto-extend mode … … 95 95 information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? TRUE : FALSE; 96 96 maximum &= ~OBJECTS_UNLIMITED_OBJECTS; 97 97 98 98 /* 99 99 * The allocation unit is the maximum value … … 131 131 132 132 _Chain_Initialize_empty( &information->Inactive ); 133 133 134 134 /* 135 135 * Initialize objects .. if there are any … … 142 142 * extended. 143 143 */ 144 144 145 145 information->maximum = 0; 146 146 147 147 /* 148 148 * Always have the maximum size available so the current performance … … 150 150 * number then a performance hit is taken. 151 151 */ 152 152 153 153 _Objects_Extend_information( information ); 154 154 155 155 } 156 156 -
cpukit/score/src/objectmp.c
r3b2c473 r05279b84 54 54 * 55 55 */ 56 56 57 57 void _Objects_MP_Open ( 58 58 Objects_Information *information, … … 64 64 the_global_object->Object.id = the_id; 65 65 the_global_object->name = the_name; 66 66 67 67 _Chain_Prepend( 68 68 &information->global_table[ _Objects_Get_node( the_id ) ], -
cpukit/score/src/objectshrinkinformation.c
r3b2c473 r05279b84 57 57 index_base = _Objects_Get_index( information->minimum_id ); 58 58 block_count = ( information->maximum - index_base ) / information->allocation_size; 59 59 60 60 for ( block = 0; block < block_count; block++ ) { 61 61 if ( information->inactive_per_block[ block ] == information->allocation_size ) { … … 65 65 * and remove elements. 66 66 */ 67 67 68 68 the_object = (Objects_Control *) information->Inactive.first; 69 69 … … 77 77 if ((index >= index_base) && 78 78 (index < (index_base + information->allocation_size))) { 79 79 80 80 /* 81 81 * Get the next node before the node is extracted 82 82 */ 83 83 84 84 extract_me = the_object; 85 85 … … 88 88 else 89 89 the_object = NULL; 90 90 91 91 _Chain_Extract( &extract_me->Node ); 92 92 } … … 107 107 108 108 information->inactive -= information->allocation_size; 109 109 110 110 return; 111 111 } 112 112 113 113 index_base += information->allocation_size; 114 114 } -
cpukit/score/src/thread.c
r3b2c473 r05279b84 88 88 * Initialize this class of objects. 89 89 */ 90 90 91 91 _Objects_Initialize_information( 92 92 &_Thread_Internal_information, -
cpukit/score/src/threadchangepriority.c
r3b2c473 r05279b84 63 63 * append not a prepend. 64 64 */ 65 65 66 66 /* 67 67 * Techically, the prepend should conditional on the thread lowering … … 76 76 prepend_it = TRUE; 77 77 */ 78 78 79 79 _Thread_Set_transient( the_thread ); 80 80 -
cpukit/score/src/threadclearstate.c
r3b2c473 r05279b84 57 57 _ISR_Disable( level ); 58 58 current_state = the_thread->current_state; 59 59 60 60 if ( current_state & state ) { 61 61 current_state = -
cpukit/score/src/threadclose.c
r3b2c473 r05279b84 36 36 * operations on this thread are allowed. 37 37 */ 38 38 39 39 void _Thread_Close( 40 40 Objects_Information *information, … … 43 43 { 44 44 _User_extensions_Thread_delete( the_thread ); 45 45 46 46 _Objects_Close( information, &the_thread->Object ); 47 47 48 48 _Thread_Set_state( the_thread, STATES_TRANSIENT ); 49 49 50 50 if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 51 51 if ( _Watchdog_Is_active( &the_thread->Timer ) ) -
cpukit/score/src/threadcreateidle.c
r3b2c473 r05279b84 44 44 * _Workspace_Initialization. 45 45 */ 46 46 47 47 _Thread_Idle = _Thread_Internal_allocate(); 48 48 49 49 /* 50 50 * Initialize the IDLE task. 51 51 */ 52 52 53 53 #if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE) 54 54 idle = (void *) _CPU_Thread_Idle_body; … … 56 56 idle = (void *) _Thread_Idle_body; 57 57 #endif 58 58 59 59 if ( _CPU_Table.idle_task ) 60 60 idle = _CPU_Table.idle_task; 61 61 62 62 idle_task_stack_size = _CPU_Table.idle_task_stack_size; 63 63 if ( idle_task_stack_size < STACK_MINIMUM_SIZE ) 64 64 idle_task_stack_size = STACK_MINIMUM_SIZE; 65 65 66 66 _Thread_Initialize( 67 67 &_Thread_Internal_information, … … 77 77 (Objects_Name) _Thread_Idle_name 78 78 ); 79 79 80 80 /* 81 81 * WARNING!!! This is necessary to "kick" start the system and 82 82 * MUST be done before _Thread_Start is invoked. 83 83 */ 84 84 85 85 _Thread_Heir = 86 86 _Thread_Executing = _Thread_Idle; 87 87 88 88 _Thread_Start( 89 89 _Thread_Idle, … … 93 93 0 94 94 ); 95 95 96 96 } -
cpukit/score/src/threaddispatch.c
r3b2c473 r05279b84 138 138 _API_extensions_Run_postswitch(); 139 139 } 140 140 141 141 } -
cpukit/score/src/threadget.c
r3b2c473 r05279b84 48 48 Objects_Information *information; 49 49 Thread_Control *tp = (Thread_Control *) 0; 50 50 51 51 if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 52 52 _Thread_Disable_dispatch(); … … 55 55 goto done; 56 56 } 57 57 58 58 the_api = _Objects_Get_API( id ); 59 59 if ( the_api && the_api > OBJECTS_APIS_LAST ) { … … 61 61 goto done; 62 62 } 63 63 64 64 the_class = _Objects_Get_class( id ); 65 65 if ( the_class != 1 ) { /* threads are always first class :) */ … … 67 67 goto done; 68 68 } 69 69 70 70 information = _Objects_Information_table[ the_api ][ the_class ]; 71 71 72 72 if ( !information ) { 73 73 *location = OBJECTS_ERROR; 74 74 goto done; 75 75 } 76 76 77 77 tp = (Thread_Control *) _Objects_Get( information, id, location ); 78 78 79 79 done: 80 80 return tp; -
cpukit/score/src/threadhandler.c
r3b2c473 r05279b84 69 69 extern void _main(void); 70 70 #endif 71 71 72 72 executing = _Thread_Executing; 73 73 74 74 /* 75 75 * have to put level into a register for those cpu's that use 76 76 * inline asm here 77 77 */ 78 78 79 79 level = executing->Start.isr_level; 80 80 _ISR_Set_level(level); … … 101 101 * disabled until all 'begin' extensions complete. 102 102 */ 103 103 104 104 _User_extensions_Thread_begin( executing ); 105 105 106 106 /* 107 107 * At this point, the dispatch disable level BETTER be 1. … … 118 118 #endif 119 119 120 120 121 121 switch ( executing->Start.prototype ) { 122 122 case THREAD_START_NUMERIC: -
cpukit/score/src/threadidlebody.c
r3b2c473 r05279b84 40 40 * Output parameters: NONE 41 41 */ 42 42 43 43 #if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE) 44 44 Thread _Thread_Idle_body( -
cpukit/score/src/threadinitialize.c
r3b2c473 r05279b84 76 76 77 77 actual_stack_size = _Thread_Stack_Allocate( the_thread, actual_stack_size ); 78 78 79 79 if ( !actual_stack_size ) 80 80 return FALSE; /* stack allocation failed */ … … 97 97 * Allocate the floating point area for this thread 98 98 */ 99 99 100 100 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) 101 101 if ( is_fp ) { … … 118 118 * Clear the libc reent hook. 119 119 */ 120 120 121 121 the_thread->libc_reent = NULL; 122 122 123 123 /* 124 124 * Allocate the extensions area for this thread … … 142 142 } else 143 143 extensions_area = NULL; 144 144 145 145 the_thread->extensions = (void **) extensions_area; 146 146 … … 186 186 the_thread->Start.initial_priority = priority; 187 187 the_thread->ticks_executed = 0; 188 188 189 189 _Thread_Set_priority( the_thread, priority ); 190 190 … … 215 215 216 216 return TRUE; 217 217 218 218 } -
cpukit/score/src/threadqenqueuepriority.c
r3b2c473 r05279b84 184 184 */ 185 185 break; 186 186 187 187 case THREAD_QUEUE_NOTHING_HAPPENED: 188 188 /* … … 190 190 */ 191 191 break; 192 192 193 193 case THREAD_QUEUE_TIMEOUT: 194 194 the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 195 195 _ISR_Enable( level ); 196 196 break; 197 197 198 198 case THREAD_QUEUE_SATISFIED: 199 199 if ( _Watchdog_Is_active( &the_thread->Timer ) ) { … … 205 205 break; 206 206 } 207 207 208 208 /* 209 209 * Global objects with thread queue's should not be operated on from an … … 211 211 * correctly. 212 212 */ 213 213 214 214 _Thread_Unblock( the_thread ); 215 215 216 216 #if defined(RTEMS_MULTIPROCESSING) 217 217 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) -
cpukit/score/src/threadqextractfifo.c
r3b2c473 r05279b84 69 69 _Thread_MP_Free_proxy( the_thread ); 70 70 #endif 71 71 72 72 } -
cpukit/score/src/threadqextractwithproxy.c
r3b2c473 r05279b84 32 32 * XXX 33 33 */ 34 34 35 35 boolean _Thread_queue_Extract_with_proxy( 36 36 Thread_Control *the_thread -
cpukit/score/src/threadreset.c
r3b2c473 r05279b84 36 36 * operations and this division helps support this. 37 37 */ 38 38 39 39 void _Thread_Reset( 40 40 Thread_Control *the_thread, -
cpukit/score/src/threadrestart.c
r3b2c473 r05279b84 36 36 * original starting point. 37 37 */ 38 38 39 39 boolean _Thread_Restart( 40 40 Thread_Control *the_thread, … … 44 44 { 45 45 if ( !_States_Is_dormant( the_thread->current_state ) ) { 46 46 47 47 _Thread_Set_transient( the_thread ); 48 48 49 49 _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 50 50 51 51 _Thread_Load_environment( the_thread ); 52 52 53 53 _Thread_Ready( the_thread ); 54 54 55 55 _User_extensions_Thread_restart( the_thread ); 56 56 57 57 if ( _Thread_Is_executing ( the_thread ) ) 58 58 _Thread_Restart_self(); 59 59 60 60 return TRUE; 61 61 } 62 62 63 63 return FALSE; 64 64 } -
cpukit/score/src/threadresume.c
r3b2c473 r05279b84 58 58 59 59 _ISR_Disable( level ); 60 60 61 61 if ( force == TRUE ) 62 62 the_thread->suspend_count = 0; -
cpukit/score/src/threadstackallocate.c
r3b2c473 r05279b84 43 43 { 44 44 void *stack_addr = 0; 45 45 46 46 if ( !_Stack_Is_enough( stack_size ) ) 47 47 stack_size = STACK_MINIMUM_SIZE; 48 48 49 49 /* 50 50 * Call ONLY the CPU table stack allocate hook, _or_ the … … 72 72 stack_addr = _Workspace_Allocate( stack_size ); 73 73 } 74 74 75 75 if ( !stack_addr ) 76 76 stack_size = 0; 77 77 78 78 the_thread->Start.stack = stack_addr; 79 79 80 80 return stack_size; 81 81 } -
cpukit/score/src/threadstart.c
r3b2c473 r05279b84 36 36 * thread competes with all other threads for CPU time. 37 37 */ 38 38 39 39 boolean _Thread_Start( 40 40 Thread_Control *the_thread, … … 46 46 { 47 47 if ( _States_Is_dormant( the_thread->current_state ) ) { 48 48 49 49 the_thread->Start.entry_point = (Thread_Entry) entry_point; 50 50 51 51 the_thread->Start.prototype = the_prototype; 52 52 the_thread->Start.pointer_argument = pointer_argument; 53 53 the_thread->Start.numeric_argument = numeric_argument; 54 54 55 55 _Thread_Load_environment( the_thread ); 56 56 57 57 _Thread_Ready( the_thread ); 58 58 59 59 _User_extensions_Thread_start( the_thread ); 60 60 61 61 return TRUE; 62 62 } 63 63 64 64 return FALSE; 65 65 66 66 } -
cpukit/score/src/threadstartmultitasking.c
r3b2c473 r05279b84 75 75 * switch in the first thread if it is FP. 76 76 */ 77 77 78 78 79 79 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) -
cpukit/score/src/userext.c
r3b2c473 r05279b84 29 29 User_extensions_Control *the_extension; 30 30 boolean status; 31 32 for ( the_node = _User_extensions_List.first ; 33 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 34 the_node = the_node->next ) { 35 36 the_extension = (User_extensions_Control *) the_node; 37 31 32 for ( the_node = _User_extensions_List.first ; 33 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 34 the_node = the_node->next ) { 35 36 the_extension = (User_extensions_Control *) the_node; 37 38 38 if ( the_extension->Callouts.thread_create != NULL ) { 39 39 status = (*the_extension->Callouts.thread_create)( … … 45 45 } 46 46 } 47 47 48 48 return TRUE; 49 49 } … … 53 53 * _User_extensions_Thread_delete 54 54 */ 55 55 56 56 void _User_extensions_Thread_delete ( 57 57 Thread_Control *the_thread … … 60 60 Chain_Node *the_node; 61 61 User_extensions_Control *the_extension; 62 62 63 63 for ( the_node = _User_extensions_List.last ; 64 64 !_Chain_Is_head( &_User_extensions_List, the_node ) ; 65 65 the_node = the_node->previous ) { 66 67 the_extension = (User_extensions_Control *) the_node; 68 66 67 the_extension = (User_extensions_Control *) the_node; 68 69 69 if ( the_extension->Callouts.thread_delete != NULL ) 70 70 (*the_extension->Callouts.thread_delete)( … … 74 74 } 75 75 } 76 76 77 77 /*PAGE 78 78 * … … 80 80 * 81 81 */ 82 82 83 83 void _User_extensions_Thread_start ( 84 84 Thread_Control *the_thread … … 87 87 Chain_Node *the_node; 88 88 User_extensions_Control *the_extension; 89 90 for ( the_node = _User_extensions_List.first ; 91 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 92 the_node = the_node->next ) { 93 94 the_extension = (User_extensions_Control *) the_node; 95 89 90 for ( the_node = _User_extensions_List.first ; 91 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 92 the_node = the_node->next ) { 93 94 the_extension = (User_extensions_Control *) the_node; 95 96 96 if ( the_extension->Callouts.thread_start != NULL ) 97 97 (*the_extension->Callouts.thread_start)( … … 101 101 } 102 102 } 103 103 104 104 /*PAGE 105 105 * … … 107 107 * 108 108 */ 109 109 110 110 void _User_extensions_Thread_restart ( 111 111 Thread_Control *the_thread … … 114 114 Chain_Node *the_node; 115 115 User_extensions_Control *the_extension; 116 117 for ( the_node = _User_extensions_List.first ; 118 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 119 the_node = the_node->next ) { 120 121 the_extension = (User_extensions_Control *) the_node; 122 116 117 for ( the_node = _User_extensions_List.first ; 118 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 119 the_node = the_node->next ) { 120 121 the_extension = (User_extensions_Control *) the_node; 122 123 123 if ( the_extension->Callouts.thread_restart != NULL ) 124 124 (*the_extension->Callouts.thread_restart)( … … 128 128 } 129 129 } 130 130 131 131 /*PAGE 132 132 * … … 134 134 * 135 135 */ 136 136 137 137 void _User_extensions_Thread_begin ( 138 138 Thread_Control *executing … … 141 141 Chain_Node *the_node; 142 142 User_extensions_Control *the_extension; 143 144 for ( the_node = _User_extensions_List.first ; 145 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 146 the_node = the_node->next ) { 147 148 the_extension = (User_extensions_Control *) the_node; 149 143 144 for ( the_node = _User_extensions_List.first ; 145 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 146 the_node = the_node->next ) { 147 148 the_extension = (User_extensions_Control *) the_node; 149 150 150 if ( the_extension->Callouts.thread_begin != NULL ) 151 151 (*the_extension->Callouts.thread_begin)( executing ); 152 152 } 153 153 } 154 154 155 155 /*PAGE 156 156 * 157 157 * _User_extensions_Thread_exitted 158 158 */ 159 159 160 160 void _User_extensions_Thread_exitted ( 161 161 Thread_Control *executing … … 164 164 Chain_Node *the_node; 165 165 User_extensions_Control *the_extension; 166 166 167 167 for ( the_node = _User_extensions_List.last ; 168 168 !_Chain_Is_head( &_User_extensions_List, the_node ) ; 169 169 the_node = the_node->previous ) { 170 171 the_extension = (User_extensions_Control *) the_node; 172 170 171 the_extension = (User_extensions_Control *) the_node; 172 173 173 if ( the_extension->Callouts.thread_exitted != NULL ) 174 174 (*the_extension->Callouts.thread_exitted)( executing ); … … 180 180 * _User_extensions_Fatal 181 181 */ 182 182 183 183 void _User_extensions_Fatal ( 184 184 Internal_errors_Source the_source, … … 189 189 Chain_Node *the_node; 190 190 User_extensions_Control *the_extension; 191 191 192 192 for ( the_node = _User_extensions_List.last ; 193 193 !_Chain_Is_head( &_User_extensions_List, the_node ) ; 194 194 the_node = the_node->previous ) { 195 196 the_extension = (User_extensions_Control *) the_node; 197 195 196 the_extension = (User_extensions_Control *) the_node; 197 198 198 if ( the_extension->Callouts.fatal != NULL ) 199 199 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); -
cpukit/score/src/watchdoginsert.c
r3b2c473 r05279b84 34 34 uint32_t insert_isr_nest_level; 35 35 Watchdog_Interval delta_interval; 36 36 37 37 38 38 insert_isr_nest_level = _ISR_Nest_level; -
cpukit/score/src/watchdogremove.c
r3b2c473 r05279b84 40 40 41 41 case WATCHDOG_BEING_INSERTED: 42 42 43 43 /* 44 44 * It is not actually on the chain so just change the state and -
cpukit/score/src/wkspace.c
r3b2c473 r05279b84 24 24 * _Workspace_Handler_initialization 25 25 */ 26 26 27 27 void _Workspace_Handler_initialization( 28 28 void *starting_address, … … 33 33 uint32_t index; 34 34 uint32_t memory_available; 35 35 36 36 if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 37 37 _Internal_error_Occurred( … … 40 40 INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS 41 41 ); 42 42 43 43 if ( _CPU_Table.do_zero_of_workspace ) { 44 44 for( zero_out_array = (uint32_t *) starting_address, index = 0 ; … … 47 47 zero_out_array[ index ] = 0; 48 48 } 49 49 50 50 memory_available = _Heap_Initialize( 51 51 &_Workspace_Area, … … 54 54 CPU_HEAP_ALIGNMENT 55 55 ); 56 56 57 57 if ( memory_available == 0 ) 58 58 _Internal_error_Occurred(
Note: See TracChangeset
for help on using the changeset viewer.