- Timestamp:
- 01/15/96 21:50:28 (28 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- a625ccd
- Parents:
- 5c491aef
- Location:
- c/src/lib
- Files:
-
- 1 added
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/include/rtems/assoc.h
r5c491aef rc64e4ed4 1 1 /* 2 * @(#)assoc.h 1. 2 - 95/06/282 * @(#)assoc.h 1.4 - 95/10/25 3 3 * 4 4 * … … 14 14 15 15 typedef struct { 16 c har*name;16 const char *name; 17 17 unsigned32 local_value; 18 18 unsigned32 remote_value; … … 25 25 #define RTEMS_ASSOC_DEFAULT_NAME "(default)" 26 26 27 rtems_assoc_t *rtems_assoc_ptr_by_name(rtems_assoc_t *,char *);28 rtems_assoc_t *rtems_assoc_ptr_by_value(rtems_assoc_t *, unsigned32);29 rtems_assoc_t *rtems_assoc_ptr_by_remote(rtems_assoc_t *, unsigned32);27 const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *); 28 const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32); 29 const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32); 30 30 31 unsigned32 rtems_assoc_remote_by_local( rtems_assoc_t *, unsigned32);32 unsigned32 rtems_assoc_local_by_remote( rtems_assoc_t *, unsigned32);33 unsigned32 rtems_assoc_remote_by_name( rtems_assoc_t *,char *);34 unsigned32 rtems_assoc_local_by_name( rtems_assoc_t *,char *);35 c har *rtems_assoc_name_by_local(rtems_assoc_t *, unsigned32);36 c har *rtems_assoc_name_by_remote(rtems_assoc_t *, unsigned32);31 unsigned32 rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32); 32 unsigned32 rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32); 33 unsigned32 rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *); 34 unsigned32 rtems_assoc_local_by_name(const rtems_assoc_t *, const char *); 35 const char *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32); 36 const char *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32); 37 37 38 unsigned32 rtems_assoc_remote_by_local_bitfield( rtems_assoc_t *, unsigned32);39 char *rtems_assoc_name_by_local_bitfield(rtems_assoc_t *, unsigned32, char *);40 char *rtems_assoc_name_by_remote_bitfield(rtems_assoc_t *, unsigned32, char *);41 unsigned32 rtems_assoc_local_by_remote_bitfield( rtems_assoc_t *ap, unsigned32);38 unsigned32 rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32); 39 char *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *); 40 char *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *); 41 unsigned32 rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32); 42 42 43 43 -
c/src/lib/include/rtems/error.h
r5c491aef rc64e4ed4 1 1 2 /* 2 * @(#)error.h 1. 1 - 95/08/023 * @(#)error.h 1.3 - 95/10/25 3 4 * 4 5 * … … 7 8 * $Id$ 8 9 */ 10 11 #ifndef __RTEMS_ERROR_h 12 #define __RTEMS_ERROR_h 9 13 10 14 /* … … 19 23 RTEMS_ERROR_PANIC) /* all */ 20 24 21 c har *rtems_status_text(rtems_status_code);22 int rtems_error(int error_code, c har *printf_format, ...);23 void rtems_panic(c har *printf_format, ...);25 const char *rtems_status_text(rtems_status_code); 26 int rtems_error(int error_code, const char *printf_format, ...); 27 void rtems_panic(const char *printf_format, ...); 24 28 25 29 extern int rtems_panic_in_progress; 26 30 31 #endif 32 /* end of include file */ -
c/src/lib/include/rtems/libcsupport.h
r5c491aef rc64e4ed4 30 30 ); 31 31 32 extern void malloc_dump(void); 32 33 extern void libc_init(int reentrant); 34 extern int host_errno(void); 35 extern void fix_syscall_errno(void); 33 36 34 37 #ifdef __cplusplus … … 36 39 #endif 37 40 38 extern int host_errno(void);39 extern void fix_syscall_errno(void);40 41 41 #endif 42 42 /* end of include file */ -
c/src/lib/libbsp/hppa1.1/simhppa/include/bsp.h
r5c491aef rc64e4ed4 67 67 68 68 /* 69 * Todo: this should be put somewhere else 70 */ 71 72 #undef CLOCK_DRIVER_TABLE_ENTRY 73 #define CLOCK_DRIVER_TABLE_ENTRY { Clock_initialize, NULL, NULL, NULL, NULL, Clock_control } 74 rtems_device_driver Clock_control( 75 rtems_device_major_number major, 76 rtems_device_minor_number minor, 77 void *pargp 78 ); 79 80 /* 69 81 * We printf() to a buffer if multiprocessing, *or* if this is set. 70 * ref: src/lib/libbsp/hppa/ simhppa/iosupp/consupp.c82 * ref: src/lib/libbsp/hppa/pxfl/iosupp/consupp.c 71 83 */ 72 84 73 85 extern int use_print_buffer; 86 87 /* 88 * When not doing printf to a buffer, we do printf thru RTEMS libio 89 * and our tty driver. Set it up so that console is right. 90 */ 91 92 #define CONSOLE_DRIVER_TABLE_ENTRY \ 93 { tty_initialize, tty_open, tty_close, tty_read, tty_write, tty_control } 94 95 /* 96 * How many libio files we want 97 */ 98 #define BSP_LIBIO_MAX_FDS 20 74 99 75 100 /* … … 98 123 rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int); 99 124 125 rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int); 126 100 127 void bsp_start( void ); 101 128 void bsp_cleanup( void ); -
c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/getcfg.c
r5c491aef rc64e4ed4 36 36 37 37 #include <bsp.h> 38 #include <runway.h>39 38 40 39 #include <shm.h> … … 44 43 45 44 #define HPPA_RUNWAY_PROC_HPA_BASE ((void *) 0xFFFA0000) 46 45 47 46 /* given a processor number, where is its HPA? */ 48 47 #define HPPA_RUNWAY_HPA(cpu) \ 49 48 ((rtems_unsigned32) (HPPA_RUNWAY_PROC_HPA_BASE + ((cpu) * 0x2000))) 50 49 51 50 #define HPPA_RUNWAY_REG_IO_EIR_OFFSET 0x000 52 51 53 52 shm_config_table BSP_shm_cfgtbl; 54 53 55 void Shm_Cause_interrupt_pxfl( rtems_unsigned32 node );54 extern void Shm_Cause_interrupt_pxfl( rtems_unsigned32 node ); 56 55 57 56 void Shm_Get_configuration( -
c/src/lib/libbsp/hppa1.1/simhppa/shmsupp/intr.c
r5c491aef rc64e4ed4 23 23 24 24 #include <rtems.h> 25 #include <rtems/error.h> 26 25 27 #include <shm.h> 26 28 … … 39 41 case NO_INTERRUPT: 40 42 break; 43 41 44 case LONG: 42 45 u32 = (rtems_unsigned32 *)intr->address; … … 45 48 default: 46 49 fprintf( stderr, "Shm_Cause_interrupt_pxfl: Unsupported length!!!\n" ); 47 rtems_shutdown_executive( 0 );48 break;49 50 } 50 51 } -
c/src/lib/libbsp/shmdr/getlq.c
r5c491aef rc64e4ed4 23 23 24 24 #include <rtems.h> 25 #include "shm.h"25 #include <shm.h> 26 26 27 27 Shm_Envelope_control *Shm_Locked_queue_Get( -
c/src/lib/libbsp/shmdr/shm.h
r5c491aef rc64e4ed4 471 471 void Init_env_pool(); 472 472 void Shm_Print_statistics( void ); 473 void MPCI_Fatal( 474 Internal_errors_Source source, 475 boolean is_internal, 476 rtems_unsigned32 error 477 ); 473 void MPCI_Fatal( Internal_errors_Source, boolean, rtems_unsigned32 ); 478 474 rtems_task Shm_Cause_interrupt( rtems_unsigned32 ); 479 475 void Shm_Poll(); -
c/src/lib/libbsp/shmdr/shm_driver.h
r5c491aef rc64e4ed4 471 471 void Init_env_pool(); 472 472 void Shm_Print_statistics( void ); 473 void MPCI_Fatal( 474 Internal_errors_Source source, 475 boolean is_internal, 476 rtems_unsigned32 error 477 ); 473 void MPCI_Fatal( Internal_errors_Source, boolean, rtems_unsigned32 ); 478 474 rtems_task Shm_Cause_interrupt( rtems_unsigned32 ); 479 475 void Shm_Poll(); -
c/src/lib/libbsp/unix/posix/shmsupp/getcfg.c
r5c491aef rc64e4ed4 28 28 #include <bsp.h> 29 29 #include <shm.h> 30 #include <sys/types.h> /* pid_t */ 30 31 31 32 shm_config_table BSP_shm_cfgtbl; 32 33 33 int 34 int semid; 34 35 35 36 void Shm_Cause_interrupt_unix( -
c/src/lib/libbsp/unix/posix/shmsupp/intr.c
r5c491aef rc64e4ed4 22 22 #include <bsp.h> 23 23 #include <shm.h> 24 #include <sys/types.h> /* pid_t */ 24 25 25 26 void Shm_Cause_interrupt_unix( … … 30 31 intr = &Shm_Interrupt_table[node]; 31 32 32 _CPU_SHM_Send_interrupt( ( int) intr->address, (int)intr->value );33 _CPU_SHM_Send_interrupt( (pid_t) intr->address, intr->value ); 33 34 } -
c/src/lib/libbsp/unix/posix/shmsupp/lock.c
r5c491aef rc64e4ed4 20 20 #include <bsp.h> 21 21 #include <shm.h> 22 23 extern int semid;24 22 25 23 /* -
c/src/lib/libbsp/unix/posix/startup/rtems-ctor.cc
r5c491aef rc64e4ed4 1 // 1 2 // @(#)rtems-ctor.cc 1.6 - 95/04/25 2 //3 3 // 4 4 … … 82 82 83 83 extern "C" { 84 extern void invoke_non_gnu_constructors(void); 85 84 86 int 85 87 main(int argc, … … 95 97 else 96 98 rtems_progname = "RTEMS"; 99 100 /* 101 * run any non-gnu constructors we may need 102 */ 103 104 invoke_non_gnu_constructors(); 97 105 98 106 /* -
c/src/lib/libc/assoc.c
r5c491aef rc64e4ed4 1 1 /* 2 * @(#)assoc.c 1. 4 - 95/08/023 * 2 * @(#)assoc.c 1.6 - 95/10/25 3 * 4 4 * 5 5 * assoc.c … … 9 9 */ 10 10 11 12 11 #include <rtems.h> 13 12 #include "assoc.h" … … 19 18 #define rtems_assoc_is_default(ap) ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME)) 20 19 21 rtems_assoc_t *20 const rtems_assoc_t * 22 21 rtems_assoc_ptr_by_name( 23 rtems_assoc_t *ap,24 c har *name25 ) 26 { 27 rtems_assoc_t *default_ap = 0;22 const rtems_assoc_t *ap, 23 const char *name 24 ) 25 { 26 const rtems_assoc_t *default_ap = 0; 28 27 29 28 if (rtems_assoc_is_default(ap)) … … 37 36 } 38 37 39 rtems_assoc_t *38 const rtems_assoc_t * 40 39 rtems_assoc_ptr_by_local( 41 rtems_assoc_t *ap,42 unsigned32 local_value 43 ) 44 { 45 rtems_assoc_t *default_ap = 0;40 const rtems_assoc_t *ap, 41 unsigned32 local_value 42 ) 43 { 44 const rtems_assoc_t *default_ap = 0; 46 45 47 46 if (rtems_assoc_is_default(ap)) … … 56 55 57 56 58 rtems_assoc_t *57 const rtems_assoc_t * 59 58 rtems_assoc_ptr_by_remote( 60 rtems_assoc_t *ap,61 unsigned32 remote_value 62 ) 63 { 64 rtems_assoc_t *default_ap = 0;59 const rtems_assoc_t *ap, 60 unsigned32 remote_value 61 ) 62 { 63 const rtems_assoc_t *default_ap = 0; 65 64 66 65 if (rtems_assoc_is_default(ap)) … … 81 80 unsigned32 82 81 rtems_assoc_remote_by_local( 83 rtems_assoc_t *ap,84 unsigned32 local_value 85 ) 86 { 87 rtems_assoc_t *nap;82 const rtems_assoc_t *ap, 83 unsigned32 local_value 84 ) 85 { 86 const rtems_assoc_t *nap; 88 87 nap = rtems_assoc_ptr_by_local(ap, local_value); 89 88 if (nap) … … 95 94 unsigned32 96 95 rtems_assoc_local_by_remote( 97 rtems_assoc_t *ap,98 unsigned32 remote_value 99 ) 100 { 101 rtems_assoc_t *nap;96 const rtems_assoc_t *ap, 97 unsigned32 remote_value 98 ) 99 { 100 const rtems_assoc_t *nap; 102 101 nap = rtems_assoc_ptr_by_remote(ap, remote_value); 103 102 if (nap) … … 109 108 unsigned32 110 109 rtems_assoc_remote_by_name( 111 rtems_assoc_t *ap,112 c har *name113 ) 114 { 115 rtems_assoc_t *nap;110 const rtems_assoc_t *ap, 111 const char *name 112 ) 113 { 114 const rtems_assoc_t *nap; 116 115 nap = rtems_assoc_ptr_by_name(ap, name); 117 116 if (nap) … … 123 122 unsigned32 124 123 rtems_assoc_local_by_name( 125 rtems_assoc_t *ap,126 c har *name127 ) 128 { 129 rtems_assoc_t *nap;124 const rtems_assoc_t *ap, 125 const char *name 126 ) 127 { 128 const rtems_assoc_t *nap; 130 129 nap = rtems_assoc_ptr_by_name(ap, name); 131 130 if (nap) … … 140 139 */ 141 140 142 c har *141 const char * 143 142 rtems_assoc_name_bad( 144 143 unsigned32 bad_value 145 144 ) 146 145 { 146 #ifdef RTEMS_DEBUG 147 147 static char bad_buffer[32]; 148 148 149 149 sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value); 150 #else 151 static char bad_buffer[32] = "<assoc.c: BAD NAME>"; 152 #endif 150 153 return bad_buffer; 151 154 } 152 155 153 156 154 c har *157 const char * 155 158 rtems_assoc_name_by_local( 156 rtems_assoc_t *ap,157 unsigned32 local_value 158 ) 159 { 160 rtems_assoc_t *nap;159 const rtems_assoc_t *ap, 160 unsigned32 local_value 161 ) 162 { 163 const rtems_assoc_t *nap; 161 164 nap = rtems_assoc_ptr_by_local(ap, local_value); 162 165 if (nap) … … 166 169 } 167 170 168 c har *171 const char * 169 172 rtems_assoc_name_by_remote( 170 rtems_assoc_t *ap,171 unsigned32 remote_value 172 ) 173 { 174 rtems_assoc_t *nap;173 const rtems_assoc_t *ap, 174 unsigned32 remote_value 175 ) 176 { 177 const rtems_assoc_t *nap; 175 178 nap = rtems_assoc_ptr_by_remote(ap, remote_value); 176 179 if (nap) … … 186 189 187 190 unsigned32 rtems_assoc_remote_by_local_bitfield( 188 rtems_assoc_t *ap,191 const rtems_assoc_t *ap, 189 192 unsigned32 local_value 190 193 ) … … 202 205 203 206 unsigned32 rtems_assoc_local_by_remote_bitfield( 204 rtems_assoc_t *ap,207 const rtems_assoc_t *ap, 205 208 unsigned32 remote_value 206 209 ) … … 216 219 } 217 220 218 char *rtems_assoc_name_by_remote_bitfield( 219 rtems_assoc_t *ap, 221 char * 222 rtems_assoc_name_by_remote_bitfield( 223 const rtems_assoc_t *ap, 220 224 unsigned32 value, 221 225 char *buffer … … 237 241 } 238 242 239 char *rtems_assoc_name_by_local_bitfield( 240 rtems_assoc_t *ap, 243 char * 244 rtems_assoc_name_by_local_bitfield( 245 const rtems_assoc_t *ap, 241 246 unsigned32 value, 242 247 char *buffer -
c/src/lib/libc/assoc.h
r5c491aef rc64e4ed4 1 1 /* 2 * @(#)assoc.h 1. 2 - 95/06/282 * @(#)assoc.h 1.4 - 95/10/25 3 3 * 4 4 * … … 14 14 15 15 typedef struct { 16 c har*name;16 const char *name; 17 17 unsigned32 local_value; 18 18 unsigned32 remote_value; … … 25 25 #define RTEMS_ASSOC_DEFAULT_NAME "(default)" 26 26 27 rtems_assoc_t *rtems_assoc_ptr_by_name(rtems_assoc_t *,char *);28 rtems_assoc_t *rtems_assoc_ptr_by_value(rtems_assoc_t *, unsigned32);29 rtems_assoc_t *rtems_assoc_ptr_by_remote(rtems_assoc_t *, unsigned32);27 const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *); 28 const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32); 29 const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32); 30 30 31 unsigned32 rtems_assoc_remote_by_local( rtems_assoc_t *, unsigned32);32 unsigned32 rtems_assoc_local_by_remote( rtems_assoc_t *, unsigned32);33 unsigned32 rtems_assoc_remote_by_name( rtems_assoc_t *,char *);34 unsigned32 rtems_assoc_local_by_name( rtems_assoc_t *,char *);35 c har *rtems_assoc_name_by_local(rtems_assoc_t *, unsigned32);36 c har *rtems_assoc_name_by_remote(rtems_assoc_t *, unsigned32);31 unsigned32 rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32); 32 unsigned32 rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32); 33 unsigned32 rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *); 34 unsigned32 rtems_assoc_local_by_name(const rtems_assoc_t *, const char *); 35 const char *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32); 36 const char *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32); 37 37 38 unsigned32 rtems_assoc_remote_by_local_bitfield( rtems_assoc_t *, unsigned32);39 char *rtems_assoc_name_by_local_bitfield(rtems_assoc_t *, unsigned32, char *);40 char *rtems_assoc_name_by_remote_bitfield(rtems_assoc_t *, unsigned32, char *);41 unsigned32 rtems_assoc_local_by_remote_bitfield( rtems_assoc_t *ap, unsigned32);38 unsigned32 rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32); 39 char *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *); 40 char *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *); 41 unsigned32 rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32); 42 42 43 43 -
c/src/lib/libc/error.c
r5c491aef rc64e4ed4 1 1 /* 2 * @(#)error.c 1. 2 - 95/08/022 * @(#)error.c 1.6 - 95/12/12 3 3 * 4 4 * 5 * report errors and panics to RTEMS' stderr. 6 * Currently just used by RTEMS monitor. 7 * 5 * report errors and panics to RTEMS' stderr. 6 * Currently just used by RTEMS monitor. 8 7 * 9 8 * $Id$ … … 98 97 99 98 100 c har *99 const char * 101 100 rtems_status_text( 102 101 rtems_status_code status … … 109 108 static int rtems_verror( 110 109 unsigned32 error_flag, 111 c har*printf_format,110 const char *printf_format, 112 111 va_list arglist 113 112 ) … … 182 181 int rtems_error( 183 182 int error_flag, 184 c har *printf_format,183 const char *printf_format, 185 184 ... 186 185 ) … … 201 200 202 201 void rtems_panic( 203 c har *printf_format,202 const char *printf_format, 204 203 ... 205 204 ) -
c/src/lib/libc/error.h
r5c491aef rc64e4ed4 1 1 2 /* 2 * @(#)error.h 1. 1 - 95/08/023 * @(#)error.h 1.3 - 95/10/25 3 4 * 4 5 * … … 7 8 * $Id$ 8 9 */ 10 11 #ifndef __RTEMS_ERROR_h 12 #define __RTEMS_ERROR_h 9 13 10 14 /* … … 19 23 RTEMS_ERROR_PANIC) /* all */ 20 24 21 c har *rtems_status_text(rtems_status_code);22 int rtems_error(int error_code, c har *printf_format, ...);23 void rtems_panic(c har *printf_format, ...);25 const char *rtems_status_text(rtems_status_code); 26 int rtems_error(int error_code, const char *printf_format, ...); 27 void rtems_panic(const char *printf_format, ...); 24 28 25 29 extern int rtems_panic_in_progress; 26 30 31 #endif 32 /* end of include file */ -
c/src/lib/libc/libcsupport.h
r5c491aef rc64e4ed4 30 30 ); 31 31 32 extern void malloc_dump(void); 32 33 extern void libc_init(int reentrant); 34 extern int host_errno(void); 35 extern void fix_syscall_errno(void); 33 36 34 37 #ifdef __cplusplus … … 36 39 #endif 37 40 38 extern int host_errno(void);39 extern void fix_syscall_errno(void);40 41 41 #endif 42 42 /* end of include file */ -
c/src/lib/libc/libio.c
r5c491aef rc64e4ed4 16 16 #include <stdio.h> /* O_RDONLY, et.al. */ 17 17 #include <fcntl.h> /* O_RDONLY, et.al. */ 18 #include <sys/fcntl.h> /* O_RDONLY, et.al. */ 18 19 19 #if defined(solaris2) 20 20 #define O_NDELAY O_NONBLOCK … … 22 22 #define O_NDELAY _FNBIO 23 23 #endif 24 24 25 #include <errno.h> 25 26 #include <string.h> /* strcmp */ … … 209 210 rc = rtems_semaphore_create( 210 211 RTEMS_LIBIO_IOP_SEM(iop - rtems_libio_iops), 211 1, 212 1, 212 213 RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 213 214 RTEMS_NO_PRIORITY, -
c/src/lib/libc/no_libc.c
r5c491aef rc64e4ed4 1 #if !defined(RTEMS_ LIBC) && !defined(RTEMS_NEWLIB) && !defined(RTEMS_UNIX)1 #if !defined(RTEMS_NEWLIB) && !defined(RTEMS_UNIX) 2 2 3 3 /* no_libc.h -
c/src/lib/libmisc/assoc/assoc.c
r5c491aef rc64e4ed4 1 1 /* 2 * @(#)assoc.c 1. 4 - 95/08/023 * 2 * @(#)assoc.c 1.6 - 95/10/25 3 * 4 4 * 5 5 * assoc.c … … 9 9 */ 10 10 11 12 11 #include <rtems.h> 13 12 #include "assoc.h" … … 19 18 #define rtems_assoc_is_default(ap) ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME)) 20 19 21 rtems_assoc_t *20 const rtems_assoc_t * 22 21 rtems_assoc_ptr_by_name( 23 rtems_assoc_t *ap,24 c har *name25 ) 26 { 27 rtems_assoc_t *default_ap = 0;22 const rtems_assoc_t *ap, 23 const char *name 24 ) 25 { 26 const rtems_assoc_t *default_ap = 0; 28 27 29 28 if (rtems_assoc_is_default(ap)) … … 37 36 } 38 37 39 rtems_assoc_t *38 const rtems_assoc_t * 40 39 rtems_assoc_ptr_by_local( 41 rtems_assoc_t *ap,42 unsigned32 local_value 43 ) 44 { 45 rtems_assoc_t *default_ap = 0;40 const rtems_assoc_t *ap, 41 unsigned32 local_value 42 ) 43 { 44 const rtems_assoc_t *default_ap = 0; 46 45 47 46 if (rtems_assoc_is_default(ap)) … … 56 55 57 56 58 rtems_assoc_t *57 const rtems_assoc_t * 59 58 rtems_assoc_ptr_by_remote( 60 rtems_assoc_t *ap,61 unsigned32 remote_value 62 ) 63 { 64 rtems_assoc_t *default_ap = 0;59 const rtems_assoc_t *ap, 60 unsigned32 remote_value 61 ) 62 { 63 const rtems_assoc_t *default_ap = 0; 65 64 66 65 if (rtems_assoc_is_default(ap)) … … 81 80 unsigned32 82 81 rtems_assoc_remote_by_local( 83 rtems_assoc_t *ap,84 unsigned32 local_value 85 ) 86 { 87 rtems_assoc_t *nap;82 const rtems_assoc_t *ap, 83 unsigned32 local_value 84 ) 85 { 86 const rtems_assoc_t *nap; 88 87 nap = rtems_assoc_ptr_by_local(ap, local_value); 89 88 if (nap) … … 95 94 unsigned32 96 95 rtems_assoc_local_by_remote( 97 rtems_assoc_t *ap,98 unsigned32 remote_value 99 ) 100 { 101 rtems_assoc_t *nap;96 const rtems_assoc_t *ap, 97 unsigned32 remote_value 98 ) 99 { 100 const rtems_assoc_t *nap; 102 101 nap = rtems_assoc_ptr_by_remote(ap, remote_value); 103 102 if (nap) … … 109 108 unsigned32 110 109 rtems_assoc_remote_by_name( 111 rtems_assoc_t *ap,112 c har *name113 ) 114 { 115 rtems_assoc_t *nap;110 const rtems_assoc_t *ap, 111 const char *name 112 ) 113 { 114 const rtems_assoc_t *nap; 116 115 nap = rtems_assoc_ptr_by_name(ap, name); 117 116 if (nap) … … 123 122 unsigned32 124 123 rtems_assoc_local_by_name( 125 rtems_assoc_t *ap,126 c har *name127 ) 128 { 129 rtems_assoc_t *nap;124 const rtems_assoc_t *ap, 125 const char *name 126 ) 127 { 128 const rtems_assoc_t *nap; 130 129 nap = rtems_assoc_ptr_by_name(ap, name); 131 130 if (nap) … … 140 139 */ 141 140 142 c har *141 const char * 143 142 rtems_assoc_name_bad( 144 143 unsigned32 bad_value 145 144 ) 146 145 { 146 #ifdef RTEMS_DEBUG 147 147 static char bad_buffer[32]; 148 148 149 149 sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value); 150 #else 151 static char bad_buffer[32] = "<assoc.c: BAD NAME>"; 152 #endif 150 153 return bad_buffer; 151 154 } 152 155 153 156 154 c har *157 const char * 155 158 rtems_assoc_name_by_local( 156 rtems_assoc_t *ap,157 unsigned32 local_value 158 ) 159 { 160 rtems_assoc_t *nap;159 const rtems_assoc_t *ap, 160 unsigned32 local_value 161 ) 162 { 163 const rtems_assoc_t *nap; 161 164 nap = rtems_assoc_ptr_by_local(ap, local_value); 162 165 if (nap) … … 166 169 } 167 170 168 c har *171 const char * 169 172 rtems_assoc_name_by_remote( 170 rtems_assoc_t *ap,171 unsigned32 remote_value 172 ) 173 { 174 rtems_assoc_t *nap;173 const rtems_assoc_t *ap, 174 unsigned32 remote_value 175 ) 176 { 177 const rtems_assoc_t *nap; 175 178 nap = rtems_assoc_ptr_by_remote(ap, remote_value); 176 179 if (nap) … … 186 189 187 190 unsigned32 rtems_assoc_remote_by_local_bitfield( 188 rtems_assoc_t *ap,191 const rtems_assoc_t *ap, 189 192 unsigned32 local_value 190 193 ) … … 202 205 203 206 unsigned32 rtems_assoc_local_by_remote_bitfield( 204 rtems_assoc_t *ap,207 const rtems_assoc_t *ap, 205 208 unsigned32 remote_value 206 209 ) … … 216 219 } 217 220 218 char *rtems_assoc_name_by_remote_bitfield( 219 rtems_assoc_t *ap, 221 char * 222 rtems_assoc_name_by_remote_bitfield( 223 const rtems_assoc_t *ap, 220 224 unsigned32 value, 221 225 char *buffer … … 237 241 } 238 242 239 char *rtems_assoc_name_by_local_bitfield( 240 rtems_assoc_t *ap, 243 char * 244 rtems_assoc_name_by_local_bitfield( 245 const rtems_assoc_t *ap, 241 246 unsigned32 value, 242 247 char *buffer -
c/src/lib/libmisc/assoc/assoc.h
r5c491aef rc64e4ed4 1 1 /* 2 * @(#)assoc.h 1. 2 - 95/06/282 * @(#)assoc.h 1.4 - 95/10/25 3 3 * 4 4 * … … 14 14 15 15 typedef struct { 16 c har*name;16 const char *name; 17 17 unsigned32 local_value; 18 18 unsigned32 remote_value; … … 25 25 #define RTEMS_ASSOC_DEFAULT_NAME "(default)" 26 26 27 rtems_assoc_t *rtems_assoc_ptr_by_name(rtems_assoc_t *,char *);28 rtems_assoc_t *rtems_assoc_ptr_by_value(rtems_assoc_t *, unsigned32);29 rtems_assoc_t *rtems_assoc_ptr_by_remote(rtems_assoc_t *, unsigned32);27 const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *); 28 const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32); 29 const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32); 30 30 31 unsigned32 rtems_assoc_remote_by_local( rtems_assoc_t *, unsigned32);32 unsigned32 rtems_assoc_local_by_remote( rtems_assoc_t *, unsigned32);33 unsigned32 rtems_assoc_remote_by_name( rtems_assoc_t *,char *);34 unsigned32 rtems_assoc_local_by_name( rtems_assoc_t *,char *);35 c har *rtems_assoc_name_by_local(rtems_assoc_t *, unsigned32);36 c har *rtems_assoc_name_by_remote(rtems_assoc_t *, unsigned32);31 unsigned32 rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32); 32 unsigned32 rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32); 33 unsigned32 rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *); 34 unsigned32 rtems_assoc_local_by_name(const rtems_assoc_t *, const char *); 35 const char *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32); 36 const char *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32); 37 37 38 unsigned32 rtems_assoc_remote_by_local_bitfield( rtems_assoc_t *, unsigned32);39 char *rtems_assoc_name_by_local_bitfield(rtems_assoc_t *, unsigned32, char *);40 char *rtems_assoc_name_by_remote_bitfield(rtems_assoc_t *, unsigned32, char *);41 unsigned32 rtems_assoc_local_by_remote_bitfield( rtems_assoc_t *ap, unsigned32);38 unsigned32 rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32); 39 char *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *); 40 char *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *); 41 unsigned32 rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32); 42 42 43 43 -
c/src/lib/libmisc/error/error.c
r5c491aef rc64e4ed4 1 1 /* 2 * @(#)error.c 1. 2 - 95/08/022 * @(#)error.c 1.6 - 95/12/12 3 3 * 4 4 * 5 * report errors and panics to RTEMS' stderr. 6 * Currently just used by RTEMS monitor. 7 * 5 * report errors and panics to RTEMS' stderr. 6 * Currently just used by RTEMS monitor. 8 7 * 9 8 * $Id$ … … 98 97 99 98 100 c har *99 const char * 101 100 rtems_status_text( 102 101 rtems_status_code status … … 109 108 static int rtems_verror( 110 109 unsigned32 error_flag, 111 c har*printf_format,110 const char *printf_format, 112 111 va_list arglist 113 112 ) … … 182 181 int rtems_error( 183 182 int error_flag, 184 c har *printf_format,183 const char *printf_format, 185 184 ... 186 185 ) … … 201 200 202 201 void rtems_panic( 203 c har *printf_format,202 const char *printf_format, 204 203 ... 205 204 ) -
c/src/lib/libmisc/error/error.h
r5c491aef rc64e4ed4 1 1 2 /* 2 * @(#)error.h 1. 1 - 95/08/023 * @(#)error.h 1.3 - 95/10/25 3 4 * 4 5 * … … 7 8 * $Id$ 8 9 */ 10 11 #ifndef __RTEMS_ERROR_h 12 #define __RTEMS_ERROR_h 9 13 10 14 /* … … 19 23 RTEMS_ERROR_PANIC) /* all */ 20 24 21 c har *rtems_status_text(rtems_status_code);22 int rtems_error(int error_code, c har *printf_format, ...);23 void rtems_panic(c har *printf_format, ...);25 const char *rtems_status_text(rtems_status_code); 26 int rtems_error(int error_code, const char *printf_format, ...); 27 void rtems_panic(const char *printf_format, ...); 24 28 25 29 extern int rtems_panic_in_progress; 26 30 31 #endif 32 /* end of include file */ -
c/src/lib/libmisc/monitor/mon-monitor.c
r5c491aef rc64e4ed4 1 1 /* 2 * @(#)monitor.c 1. 18 - 95/08/022 * @(#)monitor.c 1.22 - 95/11/02 3 3 * 4 * 4 5 * 5 6 * RTEMS monitor main body … … 18 19 * remote request/response stuff should be cleaned up 19 20 * maybe we can use real rpc?? 21 * 'info' commadn to print out: 22 * interrupt stack location, direction and size 23 * floating point config stuff 24 * interrupt config stuff 20 25 * 21 26 * $Id$ … … 228 233 " A continue from the debugger will return to the monitor.\n", 229 234 0, 230 CPU_INVOKE_DEBUGGER,235 rtems_monitor_debugger_cmd, 231 236 0, 232 237 }, … … 297 302 } 298 303 304 void 305 rtems_monitor_debugger_cmd( 306 int argc, 307 char **argv, 308 unsigned32 command_arg, 309 boolean verbose 310 ) 311 { 312 #ifdef CPU_INVOKE_DEBUGGER 313 CPU_INVOKE_DEBUGGER; 314 #endif 315 } 299 316 300 317 void … … 339 356 * 400a7090 ? _Configuration_Table 340 357 * 341 *342 358 * We ignore the type field. 343 *344 * Parameters:345 *346 *347 * Returns:348 *349 359 * 350 360 * Side Effects: 351 361 * Creates and fills in 'rtems_monitor_symbols' table 352 362 * 353 * Notes: 354 * 355 * 356 * Deficiencies/ToDo: 363 * TODO 364 * there should be a BSP #define or something like that 365 * to do this; Assuming stdio is crazy. 357 366 * Someday this should know BFD 358 367 * Maybe we could get objcopy to just copy the symbol areas … … 374 383 return; 375 384 376 #ifdef simhppa385 #ifdef SIMHPPA 377 386 fp = fdopen(8, "r"); /* don't ask; don't tell */ 378 387 #else -
c/src/lib/libmisc/monitor/mon-prmisc.c
r5c491aef rc64e4ed4 71 71 unsigned32 b; 72 72 unsigned32 length = 0; 73 c har *name;73 const char *name; 74 74 75 75 for (b = 1; b; b <<= 1) -
c/src/lib/libmisc/monitor/monitor.h
r5c491aef rc64e4ed4 1 1 /* 2 * @(#)monitor.h 1. 14 - 95/08/022 * @(#)monitor.h 1.20 - 95/12/12 3 3 * 4 * 4 5 * $Id$ 5 6 */ … … 319 320 void rtems_monitor_fatal_cmd(int, char **, unsigned32, boolean); 320 321 void rtems_monitor_continue_cmd(int, char **, unsigned32, boolean); 322 void rtems_monitor_debugger_cmd(int, char **, unsigned32, boolean); 321 323 void rtems_monitor_node_cmd(int, char **, unsigned32, boolean); 322 324 void rtems_monitor_symbols_loadup(void);
Note: See TracChangeset
for help on using the changeset viewer.