Changeset ac97074f in rtems
- Timestamp:
- 03/15/02 14:32:22 (21 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 2de2bec
- Parents:
- 082972a
- Files:
-
- 6 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/sapi/ChangeLog
r082972a rac97074f 1 2001-03-15 Joel Sherrill <joel@OARcorp.com> 2 3 * src/extension.c: Split to reduce minimum code size per PR134. 4 * src/extensioncreate.c, src/extensiondelete.c, src/extensionident.c: 5 New files. 6 src/Makefile.am: Modified to reflect above. 7 1 8 2002-01-07 Joel Sherrill <joel@OARcorp.com> 2 9 -
c/src/exec/sapi/src/Makefile.am
r082972a rac97074f 5 5 AUTOMAKE_OPTIONS = foreign 1.4 6 6 7 C_FILES = debug.c entrytable.c extension.c fatal.c exinit.c io.c itronapi.c \ 8 posixapi.c rtemsapi.c 7 EXTENSION_FILES = extension.c extensioncreate.c extensiondelete.c \ 8 extensionident.c 9 C_FILES = debug.c entrytable.c $(EXTENSION_FILES) fatal.c exinit.c io.c \ 10 itronapi.c posixapi.c rtemsapi.c 9 11 C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o) 10 12 -
c/src/exec/sapi/src/extension.c
r082972a rac97074f 3 3 * 4 4 * 5 * COPYRIGHT (c) 1989- 1999.5 * COPYRIGHT (c) 1989-2002. 6 6 * On-Line Applications Research Corporation (OAR). 7 7 * … … 46 46 ); 47 47 } 48 49 /*PAGE50 *51 * rtems_extension_create52 *53 * This directive creates a extension and performs some initialization.54 *55 * Input parameters:56 * name - extension name57 * extension_table - pointer to extension set information58 * id - pointer to extension id59 *60 * Output parameters:61 * id - extension id62 * RTEMS_SUCCESSFUL - if successful63 * error code - if unsuccessful64 */65 66 rtems_status_code rtems_extension_create(67 rtems_name name,68 rtems_extensions_table *extension_table,69 Objects_Id *id70 )71 {72 Extension_Control *the_extension;73 74 if ( !rtems_is_name_valid( name ) )75 return RTEMS_INVALID_NAME;76 77 _Thread_Disable_dispatch(); /* to prevent deletion */78 79 the_extension = _Extension_Allocate();80 81 if ( !the_extension ) {82 _Thread_Enable_dispatch();83 return RTEMS_TOO_MANY;84 }85 86 _User_extensions_Add_set( &the_extension->Extension, extension_table );87 88 _Objects_Open( &_Extension_Information, &the_extension->Object, &name );89 90 *id = the_extension->Object.id;91 _Thread_Enable_dispatch();92 return RTEMS_SUCCESSFUL;93 }94 95 /*PAGE96 *97 * rtems_extension_ident98 *99 * This directive returns the system ID associated with100 * the extension name.101 *102 * Input parameters:103 * name - user defined message queue name104 * id - pointer to extension id105 *106 * Output parameters:107 * *id - message queue id108 * RTEMS_SUCCESSFUL - if successful109 * error code - if unsuccessful110 */111 112 rtems_status_code rtems_extension_ident(113 rtems_name name,114 Objects_Id *id115 )116 {117 Objects_Name_to_id_errors status;118 119 status = _Objects_Name_to_id(120 &_Extension_Information,121 &name,122 OBJECTS_SEARCH_LOCAL_NODE,123 id124 );125 126 return _Status_Object_name_errors_to_status[ status ];127 }128 129 /*PAGE130 *131 * rtems_extension_delete132 *133 * This directive allows a thread to delete a extension.134 *135 * Input parameters:136 * id - extension id137 *138 * Output parameters:139 * RTEMS_SUCCESSFUL - if successful140 * error code - if unsuccessful141 */142 143 rtems_status_code rtems_extension_delete(144 Objects_Id id145 )146 {147 Extension_Control *the_extension;148 Objects_Locations location;149 150 the_extension = _Extension_Get( id, &location );151 switch ( location ) {152 case OBJECTS_ERROR:153 case OBJECTS_REMOTE: /* should never return this */154 return RTEMS_INVALID_ID;155 case OBJECTS_LOCAL:156 _User_extensions_Remove_set( &the_extension->Extension );157 _Objects_Close( &_Extension_Information, &the_extension->Object );158 _Extension_Free( the_extension );159 _Thread_Enable_dispatch();160 return RTEMS_SUCCESSFUL;161 }162 163 return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */164 } -
cpukit/sapi/ChangeLog
r082972a rac97074f 1 2001-03-15 Joel Sherrill <joel@OARcorp.com> 2 3 * src/extension.c: Split to reduce minimum code size per PR134. 4 * src/extensioncreate.c, src/extensiondelete.c, src/extensionident.c: 5 New files. 6 src/Makefile.am: Modified to reflect above. 7 1 8 2002-01-07 Joel Sherrill <joel@OARcorp.com> 2 9 -
cpukit/sapi/src/Makefile.am
r082972a rac97074f 5 5 AUTOMAKE_OPTIONS = foreign 1.4 6 6 7 C_FILES = debug.c entrytable.c extension.c fatal.c exinit.c io.c itronapi.c \ 8 posixapi.c rtemsapi.c 7 EXTENSION_FILES = extension.c extensioncreate.c extensiondelete.c \ 8 extensionident.c 9 C_FILES = debug.c entrytable.c $(EXTENSION_FILES) fatal.c exinit.c io.c \ 10 itronapi.c posixapi.c rtemsapi.c 9 11 C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o) 10 12 -
cpukit/sapi/src/extension.c
r082972a rac97074f 3 3 * 4 4 * 5 * COPYRIGHT (c) 1989- 1999.5 * COPYRIGHT (c) 1989-2002. 6 6 * On-Line Applications Research Corporation (OAR). 7 7 * … … 46 46 ); 47 47 } 48 49 /*PAGE50 *51 * rtems_extension_create52 *53 * This directive creates a extension and performs some initialization.54 *55 * Input parameters:56 * name - extension name57 * extension_table - pointer to extension set information58 * id - pointer to extension id59 *60 * Output parameters:61 * id - extension id62 * RTEMS_SUCCESSFUL - if successful63 * error code - if unsuccessful64 */65 66 rtems_status_code rtems_extension_create(67 rtems_name name,68 rtems_extensions_table *extension_table,69 Objects_Id *id70 )71 {72 Extension_Control *the_extension;73 74 if ( !rtems_is_name_valid( name ) )75 return RTEMS_INVALID_NAME;76 77 _Thread_Disable_dispatch(); /* to prevent deletion */78 79 the_extension = _Extension_Allocate();80 81 if ( !the_extension ) {82 _Thread_Enable_dispatch();83 return RTEMS_TOO_MANY;84 }85 86 _User_extensions_Add_set( &the_extension->Extension, extension_table );87 88 _Objects_Open( &_Extension_Information, &the_extension->Object, &name );89 90 *id = the_extension->Object.id;91 _Thread_Enable_dispatch();92 return RTEMS_SUCCESSFUL;93 }94 95 /*PAGE96 *97 * rtems_extension_ident98 *99 * This directive returns the system ID associated with100 * the extension name.101 *102 * Input parameters:103 * name - user defined message queue name104 * id - pointer to extension id105 *106 * Output parameters:107 * *id - message queue id108 * RTEMS_SUCCESSFUL - if successful109 * error code - if unsuccessful110 */111 112 rtems_status_code rtems_extension_ident(113 rtems_name name,114 Objects_Id *id115 )116 {117 Objects_Name_to_id_errors status;118 119 status = _Objects_Name_to_id(120 &_Extension_Information,121 &name,122 OBJECTS_SEARCH_LOCAL_NODE,123 id124 );125 126 return _Status_Object_name_errors_to_status[ status ];127 }128 129 /*PAGE130 *131 * rtems_extension_delete132 *133 * This directive allows a thread to delete a extension.134 *135 * Input parameters:136 * id - extension id137 *138 * Output parameters:139 * RTEMS_SUCCESSFUL - if successful140 * error code - if unsuccessful141 */142 143 rtems_status_code rtems_extension_delete(144 Objects_Id id145 )146 {147 Extension_Control *the_extension;148 Objects_Locations location;149 150 the_extension = _Extension_Get( id, &location );151 switch ( location ) {152 case OBJECTS_ERROR:153 case OBJECTS_REMOTE: /* should never return this */154 return RTEMS_INVALID_ID;155 case OBJECTS_LOCAL:156 _User_extensions_Remove_set( &the_extension->Extension );157 _Objects_Close( &_Extension_Information, &the_extension->Object );158 _Extension_Free( the_extension );159 _Thread_Enable_dispatch();160 return RTEMS_SUCCESSFUL;161 }162 163 return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */164 }
Note: See TracChangeset
for help on using the changeset viewer.