Changeset 7d91d72 in rtems
- Timestamp:
- 12/13/99 15:29:20 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- d16faa2
- Parents:
- e9067989
- Files:
-
- 8 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/rtems/include/rtems/rtems/attr.h
re9067989 r7d91d72 47 47 #define RTEMS_PRIORITY_CEILING 0x00000040 48 48 49 #define RTEMS_NESTING_ALLOWED 0x00000000 50 #define RTEMS_NO_NESTING_ALLOWED 0x00000080 51 49 52 #define RTEMS_APPLICATION_TASK 0x00000000 50 #define RTEMS_SYSTEM_TASK 0x00000080 53 #define RTEMS_SYSTEM_TASK 0x00000100 54 51 55 52 56 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) -
c/src/exec/rtems/inline/rtems/rtems/attr.inl
re9067989 r7d91d72 159 159 /*PAGE 160 160 * 161 * _Attributes_Is_nesting_allowed 162 * 163 * DESCRIPTION: 164 * 165 * This function returns TRUE if the nesting allowed attribute 166 * is enabled in the attribute_set and FALSE otherwise. 167 */ 168 169 RTEMS_INLINE_ROUTINE boolean _Attributes_Is_nesting_allowed( 170 rtems_attribute attribute_set 171 ) 172 { 173 return ( !(attribute_set & RTEMS_NO_NESTING_ALLOWED) ); 174 } 175 176 /*PAGE 177 * 161 178 * _Attributes_Is_system_task 162 179 * -
c/src/exec/rtems/macros/rtems/rtems/attr.inl
re9067989 r7d91d72 91 91 /*PAGE 92 92 * 93 * _Attributes_Is_nesting_allowed 94 * 95 */ 96 97 #define _Attributes_Is_nesting_allowed( _attribute_set ) \ 98 ( !((_attribute_set) & RTEMS_NO_NESTING_ALLOWED) ) 99 100 /*PAGE 101 * 93 102 * _Attributes_Is_system_task 94 103 * -
c/src/exec/rtems/src/semcreate.c
re9067989 r7d91d72 130 130 if ( _Attributes_Is_inherit_priority( attribute_set ) ) 131 131 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 132 else if ( _Attributes_Is_priority_ceiling( attribute_set ) )132 else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 133 133 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 134 else if ( _Attributes_Is_priority( attribute_set ) )134 else if ( _Attributes_Is_priority( attribute_set ) ) 135 135 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 136 136 else 137 137 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 138 138 139 the_mutex_attributes.allow_nesting = TRUE; 139 if ( _Attributes_Is_nesting_allowed( attribute_set ) ) 140 the_mutex_attributes.allow_nesting = TRUE; 141 else 142 the_mutex_attributes.allow_nesting = FALSE; 140 143 141 144 /* Add priority ceiling code here ????? */ -
c/src/exec/rtems/src/semtranslatereturncode.c
re9067989 r7d91d72 68 68 return RTEMS_UNSATISFIED; 69 69 case CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED: 70 return RTEMS_ INTERNAL_ERROR;70 return RTEMS_UNSATISFIED; 71 71 case CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE: 72 72 return RTEMS_NOT_OWNER_OF_RESOURCE; -
c/src/exec/score/src/coremutexseize.c
re9067989 r7d91d72 91 91 } 92 92 } 93 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 93 94 return; 94 95 } -
c/src/exec/score/src/coremutexsurrender.c
re9067989 r7d91d72 62 62 */ 63 63 64 if ( !_Objects_Are_ids_equal( 65 _Thread_Executing->Object.id, the_mutex->holder_id ) ) { 66 67 switch ( the_mutex->Attributes.discipline ) { 68 case CORE_MUTEX_DISCIPLINES_FIFO: 69 case CORE_MUTEX_DISCIPLINES_PRIORITY: 70 break; 71 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: 72 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: 73 return( CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE ); 74 break; 64 if ( the_mutex->Attributes.allow_nesting ) { 65 if ( !_Objects_Are_ids_equal( 66 _Thread_Executing->Object.id, the_mutex->holder_id ) ) { 67 68 switch ( the_mutex->Attributes.discipline ) { 69 case CORE_MUTEX_DISCIPLINES_FIFO: 70 case CORE_MUTEX_DISCIPLINES_PRIORITY: 71 break; 72 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: 73 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: 74 return( CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE ); 75 break; 76 } 75 77 } 76 78 } 79 80 /* XXX already unlocked -- not right status */ 81 82 if ( !the_mutex->nest_count ) 83 return( CORE_MUTEX_STATUS_SUCCESSFUL ); 77 84 78 85 the_mutex->nest_count--; 79 86 80 87 if ( the_mutex->nest_count != 0 ) 81 return( CORE_MUTEX_STATUS_ SUCCESSFUL);88 return( CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED ); 82 89 83 90 _Thread_Executing->resource_count--; -
c/src/tests/sptests/Makefile.am
re9067989 r7d91d72 8 8 ## sp10 and spfatal are not included for now 9 9 SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \ 10 sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 spsize 10 sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 sp29 \ 11 spsize 11 12 12 13 EXTRA_DIST = sptests.am spfatal -
c/src/tests/sptests/configure.in
re9067989 r7d91d72 67 67 sp27/Makefile 68 68 sp28/Makefile 69 sp29/Makefile 69 70 spsize/Makefile 70 71 ) -
cpukit/rtems/include/rtems/rtems/attr.h
re9067989 r7d91d72 47 47 #define RTEMS_PRIORITY_CEILING 0x00000040 48 48 49 #define RTEMS_NESTING_ALLOWED 0x00000000 50 #define RTEMS_NO_NESTING_ALLOWED 0x00000080 51 49 52 #define RTEMS_APPLICATION_TASK 0x00000000 50 #define RTEMS_SYSTEM_TASK 0x00000080 53 #define RTEMS_SYSTEM_TASK 0x00000100 54 51 55 52 56 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) -
cpukit/rtems/inline/rtems/rtems/attr.inl
re9067989 r7d91d72 159 159 /*PAGE 160 160 * 161 * _Attributes_Is_nesting_allowed 162 * 163 * DESCRIPTION: 164 * 165 * This function returns TRUE if the nesting allowed attribute 166 * is enabled in the attribute_set and FALSE otherwise. 167 */ 168 169 RTEMS_INLINE_ROUTINE boolean _Attributes_Is_nesting_allowed( 170 rtems_attribute attribute_set 171 ) 172 { 173 return ( !(attribute_set & RTEMS_NO_NESTING_ALLOWED) ); 174 } 175 176 /*PAGE 177 * 161 178 * _Attributes_Is_system_task 162 179 * -
cpukit/rtems/macros/rtems/rtems/attr.inl
re9067989 r7d91d72 91 91 /*PAGE 92 92 * 93 * _Attributes_Is_nesting_allowed 94 * 95 */ 96 97 #define _Attributes_Is_nesting_allowed( _attribute_set ) \ 98 ( !((_attribute_set) & RTEMS_NO_NESTING_ALLOWED) ) 99 100 /*PAGE 101 * 93 102 * _Attributes_Is_system_task 94 103 * -
cpukit/rtems/src/semcreate.c
re9067989 r7d91d72 130 130 if ( _Attributes_Is_inherit_priority( attribute_set ) ) 131 131 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 132 else if ( _Attributes_Is_priority_ceiling( attribute_set ) )132 else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 133 133 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 134 else if ( _Attributes_Is_priority( attribute_set ) )134 else if ( _Attributes_Is_priority( attribute_set ) ) 135 135 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 136 136 else 137 137 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 138 138 139 the_mutex_attributes.allow_nesting = TRUE; 139 if ( _Attributes_Is_nesting_allowed( attribute_set ) ) 140 the_mutex_attributes.allow_nesting = TRUE; 141 else 142 the_mutex_attributes.allow_nesting = FALSE; 140 143 141 144 /* Add priority ceiling code here ????? */ -
cpukit/rtems/src/semtranslatereturncode.c
re9067989 r7d91d72 68 68 return RTEMS_UNSATISFIED; 69 69 case CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED: 70 return RTEMS_ INTERNAL_ERROR;70 return RTEMS_UNSATISFIED; 71 71 case CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE: 72 72 return RTEMS_NOT_OWNER_OF_RESOURCE; -
cpukit/score/src/coremutexseize.c
re9067989 r7d91d72 91 91 } 92 92 } 93 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 93 94 return; 94 95 } -
cpukit/score/src/coremutexsurrender.c
re9067989 r7d91d72 62 62 */ 63 63 64 if ( !_Objects_Are_ids_equal( 65 _Thread_Executing->Object.id, the_mutex->holder_id ) ) { 66 67 switch ( the_mutex->Attributes.discipline ) { 68 case CORE_MUTEX_DISCIPLINES_FIFO: 69 case CORE_MUTEX_DISCIPLINES_PRIORITY: 70 break; 71 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: 72 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: 73 return( CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE ); 74 break; 64 if ( the_mutex->Attributes.allow_nesting ) { 65 if ( !_Objects_Are_ids_equal( 66 _Thread_Executing->Object.id, the_mutex->holder_id ) ) { 67 68 switch ( the_mutex->Attributes.discipline ) { 69 case CORE_MUTEX_DISCIPLINES_FIFO: 70 case CORE_MUTEX_DISCIPLINES_PRIORITY: 71 break; 72 case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: 73 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: 74 return( CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE ); 75 break; 76 } 75 77 } 76 78 } 79 80 /* XXX already unlocked -- not right status */ 81 82 if ( !the_mutex->nest_count ) 83 return( CORE_MUTEX_STATUS_SUCCESSFUL ); 77 84 78 85 the_mutex->nest_count--; 79 86 80 87 if ( the_mutex->nest_count != 0 ) 81 return( CORE_MUTEX_STATUS_ SUCCESSFUL);88 return( CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED ); 82 89 83 90 _Thread_Executing->resource_count--; -
testsuites/sptests/Makefile.am
re9067989 r7d91d72 8 8 ## sp10 and spfatal are not included for now 9 9 SUBDIRS = sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \ 10 sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 spsize 10 sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 sp29 \ 11 spsize 11 12 12 13 EXTRA_DIST = sptests.am spfatal
Note: See TracChangeset
for help on using the changeset viewer.