Remove stray white spaces.

This commit is contained in:
Ralf Corsepius
2004-04-16 12:06:28 +00:00
parent 84860816e3
commit aed742c9a0
42 changed files with 578 additions and 522 deletions
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -2,7 +2,7 @@
------------------------------------------------------------------------
$Id$
------------------------------------------------------------------------
Copyright Objective Design Systems Pty Ltd, 2002
All rights reserved Objective Design Systems Pty Ltd, 2002
Chris Johns (ccj@acm.org)
@@ -14,7 +14,7 @@
found in the file LICENSE in this distribution.
This software with is provided ``as is'' and with NO WARRANTY.
------------------------------------------------------------------------
RTEMS Performance Monitoring and Measurement Framework.
File diff suppressed because it is too large Load Diff
+22 -22
View File
@@ -2,7 +2,7 @@
------------------------------------------------------------------------
$Id$
------------------------------------------------------------------------
Copyright Objective Design Systems Pty Ltd, 2002
All rights reserved Objective Design Systems Pty Ltd, 2002
Chris Johns (ccj@acm.org)
@@ -14,7 +14,7 @@
found in the file LICENSE in this distribution.
This software with is provided ``as is'' and with NO WARRANTY.
------------------------------------------------------------------------
RTEMS Performance Monitoring and Measurement Framework.
@@ -42,7 +42,7 @@ extern "C" {
*
* DESCRIPTION:
*
* RTEMS control holds the trigger and watch configuration for a group of
* RTEMS control holds the trigger and watch configuration for a group of
* tasks with the same name.
*/
typedef struct rtems_capture_control_s
@@ -62,15 +62,15 @@ typedef struct rtems_capture_control_s
#define RTEMS_CAPTURE_FROM_ANY (1 << 1)
#define RTEMS_CAPTURE_TO_ANY (1 << 2)
#define RTEMS_CAPTURE_FROM_TO (1 << 3)
/*
* rtems_capture_control_t
*
* DESCRIPTION:
*
* RTEMS capture control provdes the information about a task, along
* RTEMS capture control provdes the information about a task, along
* with its trigger state. The control is referenced by each
* capture record. This is* information neeed by the decoder. The
* capture record. This is* information neeed by the decoder. The
* capture record cannot assume the task will exist when the record is
* dumped via the target interface so task info needed for tracing is
* copied and held here.
@@ -79,7 +79,7 @@ typedef struct rtems_capture_control_s
* contained in this structure.
*
* Note, the tracer code exploits the fact an rtems_name is a
* 32bit value.
* 32bit value.
*/
typedef struct rtems_capture_task_s
{
@@ -407,7 +407,7 @@ rtems_capture_release (uint32_t count);
*
* This function returns the tick period in micro-seconds.
*/
uint32_t
uint32_t
rtems_capture_tick_time ();
/*
@@ -417,7 +417,7 @@ rtems_capture_tick_time ();
*
* This function returns the tick period in micro-seconds.
*/
uint32_t
uint32_t
rtems_capture_tick_time ();
/*
@@ -519,7 +519,7 @@ rtems_capture_task_name (rtems_capture_task_t* task)
*
* This function returns the task flags.
*/
static inline uint32_t
static inline uint32_t
rtems_capture_task_flags (rtems_capture_task_t* task)
{
return task->flags;
@@ -545,7 +545,7 @@ rtems_capture_task_control (rtems_capture_task_t* task)
*
* This function returns the task control flags if a control is present.
*/
static inline uint32_t
static inline uint32_t
rtems_capture_task_control_flags (rtems_capture_task_t* task)
{
if (!task->control)
@@ -561,7 +561,7 @@ rtems_capture_task_control_flags (rtems_capture_task_t* task)
* This function returns the number of times the task has
* been switched into context.
*/
static inline uint32_t
static inline uint32_t
rtems_capture_task_switched_in (rtems_capture_task_t* task)
{
return task->in;
@@ -575,7 +575,7 @@ rtems_capture_task_switched_in (rtems_capture_task_t* task)
* This function returns the number of times the task has
* been switched out of context.
*/
static inline uint32_t
static inline uint32_t
rtems_capture_task_switched_out (rtems_capture_task_t* task)
{
return task->out;
@@ -633,7 +633,7 @@ rtems_capture_task_curr_priority (rtems_capture_task_t* task)
* This function updates the stack usage. The task control block
* is updated.
*/
uint32_t
uint32_t
rtems_capture_task_stack_usage (rtems_capture_task_t* task);
/*
@@ -643,7 +643,7 @@ rtems_capture_task_stack_usage (rtems_capture_task_t* task);
*
* This function returns the task's stack size.
*/
static inline uint32_t
static inline uint32_t
rtems_capture_task_stack_size (rtems_capture_task_t* task)
{
return task->stack_size;
@@ -656,7 +656,7 @@ rtems_capture_task_stack_size (rtems_capture_task_t* task)
*
* This function returns the amount of stack used.
*/
static inline uint32_t
static inline uint32_t
rtems_capture_task_stack_used (rtems_capture_task_t* task)
{
return task->stack_size - task->stack_clean;
@@ -669,7 +669,7 @@ rtems_capture_task_stack_used (rtems_capture_task_t* task)
*
* This function returns the current execution time as ticks.
*/
static inline uint32_t
static inline uint32_t
rtems_capture_task_ticks (rtems_capture_task_t* task)
{
return task->ticks;
@@ -682,7 +682,7 @@ rtems_capture_task_ticks (rtems_capture_task_t* task)
*
* This function returns the current execution time tick offset.
*/
static inline uint32_t
static inline uint32_t
rtems_capture_task_tick_offset (rtems_capture_task_t* task)
{
return task->tick_offset;
@@ -730,12 +730,12 @@ rtems_capture_task_delta_time (rtems_capture_task_t* task)
* This function returns the number of tasks the capture
* engine knows about.
*/
static inline uint32_t
static inline uint32_t
rtems_capture_task_count ()
{
rtems_capture_task_t* task = rtems_capture_get_task_list ();
uint32_t count = 0;
while (task)
{
count++;
@@ -803,7 +803,7 @@ rtems_capture_control_name (rtems_capture_control_t* control)
*
* This function returns the control flags.
*/
static inline uint32_t
static inline uint32_t
rtems_capture_control_flags (rtems_capture_control_t* control)
{
return control->flags;
@@ -847,7 +847,7 @@ rtems_capture_control_from_id (rtems_capture_control_t* control, int from)
* This function returns the number of controls the capture
* engine has.
*/
static inline uint32_t
static inline uint32_t
rtems_capture_control_count ()
{
rtems_capture_control_t* control = rtems_capture_get_control_list ();
+5 -5
View File
@@ -53,7 +53,7 @@ void CPU_usage_Dump( void )
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
if ( the_thread )
total_units += the_thread->ticks_executed;
}
@@ -67,8 +67,8 @@ void CPU_usage_Dump( void )
printf( " ID NAME TICKS\n" );
#endif
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
@@ -76,7 +76,7 @@ void CPU_usage_Dump( void )
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
@@ -106,7 +106,7 @@ void CPU_usage_Dump( void )
the_thread->Object.id,
name,
the_thread->ticks_executed,
(total_units) ?
(total_units) ?
(double)the_thread->ticks_executed / (double)total_units :
(double)total_units
);
+5 -5
View File
@@ -45,7 +45,7 @@ rtems_device_driver null_initialize(
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
@@ -57,10 +57,10 @@ rtems_device_driver null_initialize(
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
@@ -153,10 +153,10 @@ rtems_device_driver null_write(
)
{
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
rw_args->bytes_moved = rw_args->count;
return NULL_SUCCESSFUL;
}
+16 -16
View File
@@ -17,13 +17,13 @@
#include <string.h>
#include <ctype.h>
#include <rtems/dumpbuf.h>
/*
* Put the body below Dump_Buffer so it won't get inlined.
*/
static inline void Dump_Line(
unsigned char *buffer,
unsigned char *buffer,
int length
);
@@ -32,18 +32,18 @@ void Dump_Buffer(
int length
)
{
int i, mod, max;
if ( !length ) return;
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
}
@@ -53,27 +53,27 @@ static inline void Dump_Line(
int length
)
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
printf( line_buffer );
}
+5 -5
View File
@@ -78,7 +78,7 @@ int rtems_fsmount_create_mountpoint
*/
if (0 != stat(tok_buffer,&file_info)) {
/*
* if not, create directory
* if not, create directory
*/
rc = mknod(tok_buffer,S_IRWXU | S_IRWXG | S_IRWXO | S_IFDIR,0);
}
@@ -86,7 +86,7 @@ int rtems_fsmount_create_mountpoint
} while ((rc == 0) &&
(token_type != IMFS_NO_MORE_PATH) &&
(token_type != IMFS_INVALID_TOKEN));
/*
* return token buffer to heap
*/
@@ -126,7 +126,7 @@ int rtems_fsmount
/*
* scan through all fstab entries;
*/
while (!terminate &&
while (!terminate &&
(fstab_idx < fstab_count)) {
tmp_rc = 0;
/*
@@ -177,9 +177,9 @@ int rtems_fsmount
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_OK)) {
terminate = TRUE;
}
}
}
}
}
/*
* proceed to next entry
*/
+2 -2
View File
@@ -30,9 +30,9 @@
/*
* bits to define, what errors will cause reporting (via printf) and
* abort of mount processing
* Use a combination of these bits
* Use a combination of these bits
* for the fields "report_reasons" and "abort_reasons"
*/
*/
#define FSMOUNT_MNT_OK 0x0001 /* mounted ok */
#define FSMOUNT_MNTPNT_CRTERR 0x0002 /* cannot create mount point */
#define FSMOUNT_MNT_FAILED 0x0004 /* mounting failed */
+27 -27
View File
@@ -24,8 +24,8 @@
/*
* 2001-01-30 KJO (vac4050@cae597.rsc.raytheon.com):
* Fixed rtems_monitor_command_lookup() to accept partial
* commands to uniqeness. Added support for setting
* Fixed rtems_monitor_command_lookup() to accept partial
* commands to uniqeness. Added support for setting
* the monitor prompt via an environment variable:
* RTEMS_MONITOR_PROMPT
*
@@ -47,9 +47,9 @@
#define KEYS_LARROW (4)
#define KEYS_RARROW (5)
#define KEYS_HOME (6)
#define KEYS_END (7)
#define KEYS_F1 (8)
#define KEYS_F2 (9)
#define KEYS_END (7)
#define KEYS_F1 (8)
#define KEYS_F2 (9)
#define KEYS_F3 (10)
#define KEYS_F4 (11)
#define KEYS_F5 (12)
@@ -233,7 +233,7 @@ rtems_monitor_line_editor (
memset (buffer, 0, RTEMS_COMMAND_BUFFER_SIZE);
history = history_next;
pos = 0;
if (!logged_in)
printf ("\nMonitor ready, press enter to login.\n\n");
else
@@ -248,7 +248,7 @@ rtems_monitor_line_editor (
* Make the extended_key usable as a boolean.
*/
extended_key &= ~KEYS_NORMAL_MASK;
if (!extended_key && !logged_in)
{
if (c == '\n')
@@ -276,7 +276,7 @@ rtems_monitor_line_editor (
printf ("\r%s $ ", monitor_prompt);
pos = 0;
break;
case KEYS_LARROW:
if (pos > 0)
{
@@ -319,7 +319,7 @@ rtems_monitor_line_editor (
putchar ('\b');
}
break;
case KEYS_DARROW:
if (history < history_next)
{
@@ -493,14 +493,14 @@ rtems_monitor_command_read(char *command,
* put node number in the prompt if we are multiprocessing
*/
if (!rtems_configuration_get_user_multiprocessing_table ())
sprintf (monitor_prompt, "%s",
sprintf (monitor_prompt, "%s",
(env_prompt == NULL) ? MONITOR_PROMPT: env_prompt);
else if (rtems_monitor_default_node != rtems_monitor_node)
sprintf (monitor_prompt, "%d-%s-%d", rtems_monitor_node,
(env_prompt == NULL) ? MONITOR_PROMPT : env_prompt,
rtems_monitor_default_node);
else
sprintf (monitor_prompt, "%d-%s", rtems_monitor_node,
sprintf (monitor_prompt, "%d-%s", rtems_monitor_node,
(env_prompt == NULL) ? MONITOR_PROMPT : env_prompt);
#if defined(RTEMS_UNIX)
@@ -535,7 +535,7 @@ rtems_monitor_command_lookup(
if ((table == 0) || (argv[0] == 0))
return 0;
while (table)
{
if (table->command)
@@ -550,7 +550,7 @@ rtems_monitor_command_lookup(
{
return 0;
}
else
found_it = table;
}
@@ -596,11 +596,11 @@ rtems_monitor_show_help (
printf (" - No help associated.\n");
return;
}
while (help_len)
{
printf ("%*c", spaces, ' ');
if (line_one)
printf (" - ");
@@ -611,11 +611,11 @@ rtems_monitor_show_help (
* See if greater then the line length if so, work back
* from the end for a space, tab or lf or cr.
*/
if (help_len > MAX_HELP_LINE_LENGTH)
{
for (show_this_line = MAX_HELP_LINE_LENGTH - 1;
show_this_line;
for (show_this_line = MAX_HELP_LINE_LENGTH - 1;
show_this_line;
show_this_line--)
if ((help[show_this_line] == ' ') ||
(help[show_this_line] == '\n') ||
@@ -625,7 +625,7 @@ rtems_monitor_show_help (
/*
* If show_this_line is 0, it is a very long word !!
*/
if (show_this_line == 0)
show_this_line = MAX_HELP_LINE_LENGTH - 1;
}
@@ -639,14 +639,14 @@ rtems_monitor_show_help (
putchar (help[c]);
printf ("\n");
help += show_this_line;
help_len -= show_this_line;
/*
* Move past the line feeds or what ever else is being skipped.
*/
while (help_len)
{
if ((*help != '\r') && (*help != '\n'))
@@ -673,16 +673,16 @@ rtems_monitor_command_usage(
{
rtems_monitor_command_entry_t *command = table;
int max_cmd_len = 0;
/* if first entry in table is a usage, then print it out */
if (command_string && (*command_string != '\0'))
{
char *argv[2];
argv[0] = command_string;
argv[1] = 0;
command = rtems_monitor_command_lookup (table, 1, argv);
if (command)
@@ -691,11 +691,11 @@ rtems_monitor_command_usage(
printf ("Unrecognised command; try just 'help'\n");
return;
}
/*
* Find the largest command size.
*/
while (command)
{
int len = command->command ? strlen (command->command) : 0 ;
@@ -734,7 +734,7 @@ rtems_monitor_help_cmd(
rtems_monitor_command_entry_t *command;
command = command_arg->monitor_command_entry;
if (argc == 1)
rtems_monitor_command_usage(command, 0);
else
+2 -2
View File
@@ -48,7 +48,7 @@ rtems_monitor_config_canonical(
canonical_config->microseconds_per_tick = c->microseconds_per_tick;
canonical_config->ticks_per_timeslice = c->ticks_per_timeslice;
canonical_config->number_of_initialization_tasks = r->number_of_initialization_tasks;
}
}
/*
* This is easy, since there is only 1 (altho we could get them from
@@ -67,7 +67,7 @@ rtems_monitor_config_next(
if (n >= 1)
goto failed;
_Thread_Disable_dispatch();
*next_id += 1;
+3 -3
View File
@@ -46,7 +46,7 @@ rtems_monitor_dname_canonical(
(void) strncpy(canonical_dname->name_string, np->device_name, sizeof(canonical_dname->name_string));
canonical_dname->major = np->major;
canonical_dname->minor = np->minor;
}
}
void *
rtems_monitor_dname_next(
@@ -63,7 +63,7 @@ rtems_monitor_dname_next(
for (np = table + n ; n<_IO_Number_of_devices; n++, np++)
if (np->device_name)
goto done;
*next_id = RTEMS_OBJECT_ID_FINAL;
return 0;
@@ -79,7 +79,7 @@ done:
*next_id += 1;
return np;
}
}
void
rtems_monitor_dname_dump_header(
+1 -1
View File
@@ -71,7 +71,7 @@ rtems_monitor_driver_next(
if (n >= c->number_of_device_drivers)
goto failed;
_Thread_Disable_dispatch();
/*
+1 -1
View File
@@ -50,7 +50,7 @@ rtems_monitor_extension_dump_header(
ID NAME\n");
/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
0 1 2 3 4 5 6 7 */
rtems_monitor_separator();
}
+3 -3
View File
@@ -24,7 +24,7 @@ rtems_monitor_init_task_canonical(
)
{
rtems_initialization_tasks_table *rtems_itask = itask_void;
rtems_monitor_symbol_canonical_by_value(&canonical_itask->entry,
(void *) rtems_itask->entry_point);
@@ -48,7 +48,7 @@ rtems_monitor_init_task_next(
if (n >= c->RTEMS_api_configuration->number_of_initialization_tasks)
goto failed;
_Thread_Disable_dispatch();
itask = c->RTEMS_api_configuration->User_initialization_tasks_table + n;
@@ -111,7 +111,7 @@ rtems_monitor_init_task_dump(
length += rtems_monitor_pad(54, length);
length += rtems_monitor_dump_attributes(monitor_itask->attributes);
length += rtems_monitor_pad(66, length);
length += printf("%d [0x%x]", monitor_itask->stack_size, monitor_itask->stack_size);
+2 -2
View File
@@ -33,10 +33,10 @@ rtems_monitor_manager_next(
/*
* When we are called, it must be local
*/
if ( ! _Objects_Is_local_id(*next_id))
goto done;
object = _Objects_Get_next(table, *next_id, &location, next_id);
if (object)
+16 -16
View File
@@ -1,6 +1,6 @@
/*
* RTEMS monitor main body
*
*
* TODO:
* add stuff to RTEMS api
* rtems_get_name(id)
@@ -84,7 +84,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
rtems_monitor_object_cmd,
{ RTEMS_MONITOR_OBJECT_INIT_TASK },
&rtems_monitor_commands[2],
},
},
{ "mpci",
"Show the MPCI system configuration, if configured.",
0,
@@ -227,7 +227,7 @@ rtems_monitor_command_entry_t rtems_monitor_commands[] = {
{ 0 },
&rtems_monitor_commands[19],
},
#endif
#endif
{ 0, 0, 0, 0, { 0 }, &rtems_registered_commands },
};
@@ -237,7 +237,7 @@ rtems_monitor_suspend(rtems_interval timeout)
{
rtems_event_set event_set;
rtems_status_code status;
status = rtems_event_receive(MONITOR_WAKEUP_EVENT,
RTEMS_DEFAULT_OPTIONS,
timeout,
@@ -249,7 +249,7 @@ void
rtems_monitor_wakeup(void)
{
rtems_status_code status;
status = rtems_event_send(rtems_monitor_task_id, MONITOR_WAKEUP_EVENT);
}
@@ -314,7 +314,7 @@ rtems_monitor_node_cmd(
)
{
uint32_t new_node = rtems_monitor_default_node;
switch (argc)
{
case 1: /* no node, just set back to ours */
@@ -370,13 +370,13 @@ rtems_monitor_symbols_loadup(void)
if (rtems_monitor_symbols)
rtems_symbol_table_destroy(rtems_monitor_symbols);
rtems_monitor_symbols = rtems_symbol_table_create(10);
if (rtems_monitor_symbols == 0)
return;
fp = fopen("symbols", "r");
if (fp == 0)
return;
@@ -441,7 +441,7 @@ rtems_monitor_erase_cmd (
)
{
rtems_monitor_command_entry_t **p = & rtems_registered_commands.next;
while (*p) {
if ( STREQ(command->command, (*p)->command) ) {
*p = (*p)->next;
@@ -468,14 +468,14 @@ rtems_monitor_task(
rtems_context_fp *fp;
char command_buffer[513];
int argc;
char *argv[64];
char *argv[64];
boolean verbose = FALSE;
struct termios term;
/*
* Make the stdin stream characte not line based.
*/
if (tcgetattr (STDIN_FILENO, &term) < 0)
{
printf("rtems-monitor: cannot get terminal attributes.\n");
@@ -487,7 +487,7 @@ rtems_monitor_task(
*/
term.c_lflag &= ~(ECHO | ICANON | IEXTEN);
/*
* No sigint on BREAK, CR-to-NL off, input parity off,
* don't strip 8th bit on input, output flow control off
@@ -502,7 +502,7 @@ rtems_monitor_task(
printf("cannot set terminal attributes\n");
}
}
if (monitor_flags & RTEMS_MONITOR_SUSPEND)
(void) rtems_monitor_suspend(RTEMS_NO_TIMEOUT);
@@ -543,7 +543,7 @@ rtems_monitor_kill(void)
if (rtems_monitor_task_id)
rtems_task_delete(rtems_monitor_task_id);
rtems_monitor_task_id = 0;
rtems_monitor_server_kill();
}
@@ -553,7 +553,7 @@ rtems_monitor_init(
)
{
rtems_status_code status;
rtems_monitor_kill();
status = rtems_task_create(RTEMS_MONITOR_NAME,
@@ -579,7 +579,7 @@ rtems_monitor_init(
/*
* Start the monitor task itself
*/
status = rtems_task_start(rtems_monitor_task_id,
rtems_monitor_task,
monitor_flags);
+7 -7
View File
@@ -38,7 +38,7 @@ rtems_monitor_mpci_canonical(
if (m == 0)
return;
mt = m->User_mpci_table;
canonical_mpci->node = m->node;
canonical_mpci->maximum_nodes = m->maximum_nodes;
canonical_mpci->maximum_global_objects = m->maximum_global_objects;
@@ -58,7 +58,7 @@ rtems_monitor_mpci_canonical(
(void *) mt->send_packet);
rtems_monitor_symbol_canonical_by_value(&canonical_mpci->receive_packet,
(void *) mt->receive_packet);
}
}
/*
* This is easy, since there is only 1 (altho we could get them from
@@ -77,10 +77,10 @@ rtems_monitor_mpci_next(
if (n >= 1)
goto failed;
if ( ! c->User_multiprocessing_table)
goto failed;
_Thread_Disable_dispatch();
*next_id += 1;
@@ -102,7 +102,7 @@ rtems_monitor_mpci_dump_header(
node nodes globals proxies timeout pktsize\n");
/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
0 1 2 3 4 5 6 7 */
rtems_monitor_separator();
}
@@ -119,10 +119,10 @@ rtems_monitor_mpci_dump(
length += printf(" %d", monitor_mpci->node);
length += rtems_monitor_pad(11, length);
length += printf("%d", monitor_mpci->maximum_nodes);
length += rtems_monitor_pad(18, length);
length += rtems_monitor_dump_decimal(monitor_mpci->maximum_global_objects);
length += rtems_monitor_pad(28, length);
length += rtems_monitor_dump_decimal(monitor_mpci->maximum_proxies);
+11 -11
View File
@@ -126,7 +126,7 @@ rtems_monitor_id_fixup(
)
{
uint32_t node;
node = rtems_get_node(id);
if (node == 0)
{
@@ -171,7 +171,7 @@ rtems_monitor_object_canonical_next_remote(
/*
* Send request
*/
request.command = RTEMS_MONITOR_SERVER_CANONICAL;
request.argument0 = (uint32_t ) type;
request.argument1 = (uint32_t ) id;
@@ -183,7 +183,7 @@ rtems_monitor_object_canonical_next_remote(
/*
* process response
*/
next_id = (rtems_id) response.result0;
if (next_id != RTEMS_OBJECT_ID_FINAL)
(void) memcpy(canonical, &response.payload, response.result1);
@@ -213,7 +213,7 @@ rtems_monitor_object_canonical_next(
else
{
next_id = id;
raw_item = (void *) info->next(info->object_information,
canonical,
&next_id);
@@ -222,8 +222,8 @@ rtems_monitor_object_canonical_next(
{
info->canonical(canonical, raw_item);
_Thread_Enable_dispatch();
}
}
}
}
return next_id;
}
@@ -284,7 +284,7 @@ rtems_monitor_object_dump_1(
* of the canonical structures are almost too big for shared
* memory driver (eg: mpci)
*/
if ((info->next != rtems_monitor_manager_next) ||
(id == canonical.generic.id))
info->dump(&canonical, verbose);
@@ -322,7 +322,7 @@ rtems_monitor_object_cmd(
int arg;
rtems_monitor_object_info_t *info = 0;
rtems_monitor_object_type_t type ;
/* what is the default type? */
type = command_arg->monitor_object;
@@ -333,7 +333,7 @@ rtems_monitor_object_cmd(
printf("A type must be specified to \"dump all\"\n");
goto done;
}
info = rtems_monitor_object_lookup(type);
if (info == 0)
goto not_found;
@@ -364,7 +364,7 @@ rtems_monitor_object_cmd(
info = rtems_monitor_object_lookup(type);
if (info == 0)
goto not_found;
if (info->dump_header)
info->dump_header(verbose);
}
@@ -378,7 +378,7 @@ not_found: printf("Invalid or unsupported type %d\n", type);
rtems_monitor_object_dump_1(info, id, verbose);
default_node = rtems_get_node(id);
last_type = type;
}
}
+23 -23
View File
@@ -25,14 +25,14 @@ rtems_monitor_separator(void)
printf("------------------------------------------------------------------------------\n");
}
uint32_t
uint32_t
rtems_monitor_pad(
uint32_t destination_column,
uint32_t current_column
)
{
int pad_length;
if (destination_column <= current_column)
pad_length = 1;
else
@@ -41,7 +41,7 @@ rtems_monitor_pad(
return printf("%*s", pad_length, "");
}
uint32_t
uint32_t
rtems_monitor_dump_char(uint8_t ch)
{
if (isprint(ch))
@@ -50,25 +50,25 @@ rtems_monitor_dump_char(uint8_t ch)
return printf("%02x", ch);
}
uint32_t
uint32_t
rtems_monitor_dump_decimal(uint32_t num)
{
return printf("%4d", num);
}
uint32_t
uint32_t
rtems_monitor_dump_hex(uint32_t num)
{
return printf("0x%x", num);
}
uint32_t
uint32_t
rtems_monitor_dump_assoc_bitfield(
rtems_assoc_t *ap,
char *separator,
uint32_t value
)
{
{
uint32_t b;
uint32_t length = 0;
const char *name;
@@ -80,23 +80,23 @@ rtems_monitor_dump_assoc_bitfield(
length += printf("%s", separator);
name = rtems_assoc_name_by_local(ap, b);
if (name)
length += printf("%s", name);
else
length += printf("0x%x", b);
}
return length;
}
uint32_t
uint32_t
rtems_monitor_dump_id(rtems_id id)
{
return printf("%08x", id);
}
uint32_t
uint32_t
rtems_monitor_dump_name(rtems_name name)
{
uint32_t i;
@@ -105,9 +105,9 @@ rtems_monitor_dump_name(rtems_name name)
uint32_t ui;
char c[4];
} u;
u.ui = (uint32_t ) name;
#if (CPU_BIG_ENDIAN == TRUE)
for (i=0; i<sizeof(u.c); i++)
length += rtems_monitor_dump_char(u.c[i]);
@@ -118,7 +118,7 @@ rtems_monitor_dump_name(rtems_name name)
return length;
}
uint32_t
uint32_t
rtems_monitor_dump_priority(rtems_task_priority priority)
{
return printf("%3d", priority);
@@ -146,14 +146,14 @@ rtems_assoc_t rtems_monitor_state_assoc[] = {
{ 0, 0, 0 },
};
uint32_t
uint32_t
rtems_monitor_dump_state(States_Control state)
{
uint32_t length = 0;
if (state == STATES_READY) /* assoc doesn't deal with this as it is 0 */
length += printf("READY");
length += rtems_monitor_dump_assoc_bitfield(rtems_monitor_state_assoc,
":",
state);
@@ -169,14 +169,14 @@ rtems_assoc_t rtems_monitor_attribute_assoc[] = {
{ 0, 0, 0 },
};
uint32_t
uint32_t
rtems_monitor_dump_attributes(rtems_attribute attributes)
{
uint32_t length = 0;
if (attributes == RTEMS_DEFAULT_ATTRIBUTES) /* value is 0 */
length += printf("DEFAULT");
length += rtems_monitor_dump_assoc_bitfield(rtems_monitor_attribute_assoc,
":",
attributes);
@@ -190,14 +190,14 @@ rtems_assoc_t rtems_monitor_modes_assoc[] = {
{ 0, 0, 0 },
};
uint32_t
uint32_t
rtems_monitor_dump_modes(rtems_mode modes)
{
uint32_t length = 0;
if (modes == RTEMS_DEFAULT_MODES) /* value is 0 */
length += printf("P:T:nA");
length += rtems_monitor_dump_assoc_bitfield(rtems_monitor_modes_assoc,
":",
modes);
@@ -240,21 +240,21 @@ rtems_assoc_t rtems_monitor_events_assoc[] = {
{ 0, 0, 0 },
};
uint32_t
uint32_t
rtems_monitor_dump_events(rtems_event_set events)
{
uint32_t length = 0;
if (events == EVENT_SETS_NONE_PENDING) /* value is 0 */
length += printf("NONE");
length += rtems_monitor_dump_assoc_bitfield(rtems_monitor_events_assoc,
":",
events);
return length;
}
uint32_t
uint32_t
rtems_monitor_dump_notepad(uint32_t *notepad)
{
uint32_t length = 0;
+16 -16
View File
@@ -47,7 +47,7 @@ rtems_monitor_server_request(
* What is id of monitor on target node?
* Look it up if we don't know it yet.
*/
server_id = rtems_monitor_server_request_queue_ids[server_node];
if (server_id == 0)
{
@@ -59,7 +59,7 @@ rtems_monitor_server_request(
rtems_error(status, "ident of remote server failed");
goto done;
}
rtems_monitor_server_request_queue_ids[server_node] = server_id;
}
@@ -71,7 +71,7 @@ rtems_monitor_server_request(
rtems_error(status, "monitor server request send failed");
goto done;
}
/*
* Await response, if requested
*/
@@ -97,9 +97,9 @@ rtems_monitor_server_request(
{
status = RTEMS_INCORRECT_STATE;
goto done;
}
}
}
done:
return status;
}
@@ -134,13 +134,13 @@ rtems_monitor_server_task(
rtems_error(status, "monitor server msg queue receive error");
goto failed;
}
if (size != sizeof(request))
{
rtems_error(0, "monitor server bad size on receive");
goto failed;
}
switch (request.command)
{
case RTEMS_MONITOR_SERVER_CANONICAL:
@@ -162,7 +162,7 @@ rtems_monitor_server_task(
#define SERVER_OVERHEAD (RTEMS_offsetof(rtems_monitor_server_response_t, \
payload))
status = rtems_message_queue_send(request.return_id,
&response,
size + SERVER_OVERHEAD);
@@ -186,7 +186,7 @@ failed:
rtems_task_delete(RTEMS_SELF);
}
/*
* Kill off any old server
* Not sure if this is useful, but it doesn't help
@@ -219,12 +219,12 @@ rtems_monitor_server_init(
)
{
rtems_status_code status;
if (_System_state_Is_multiprocessing &&
(_Configuration_MP_table->maximum_nodes > 1))
{
uint32_t maximum_nodes = _Configuration_MP_table->maximum_nodes;
/*
* create the msg que our server will listen
* Since we only get msgs from other RTEMS monitors, we just
@@ -237,32 +237,32 @@ rtems_monitor_server_init(
sizeof(rtems_monitor_server_request_t),
RTEMS_GLOBAL,
&rtems_monitor_server_request_queue_id);
if (status != RTEMS_SUCCESSFUL)
{
rtems_error(status, "could not create monitor server message queue");
goto done;
}
/*
* create the msg que our responses will come on
* Since monitor just does one thing at a time, we only need 1 item
* message queue.
*/
status = rtems_message_queue_create(
RTEMS_MONITOR_RESPONSE_QUEUE_NAME,
1, /* depth */
sizeof(rtems_monitor_server_response_t),
RTEMS_GLOBAL,
&rtems_monitor_server_response_queue_id);
if (status != RTEMS_SUCCESSFUL)
{
rtems_error(status, "could not create monitor response message queue");
goto done;
}
/* need an id for queue of each other server we might talk to */
/* indexed by node, so add 1 to maximum_nodes */
rtems_monitor_server_request_queue_ids =
+5 -5
View File
@@ -245,7 +245,7 @@ rtems_symbol_value_lookup_exact(
if (table == 0)
return NULL;
}
if (table->sorted)
{
sp = rtems_symbol_value_lookup(table, value);
@@ -254,7 +254,7 @@ rtems_symbol_value_lookup_exact(
else
return NULL; /* not an exact match */
}
for (s = 0, sp = table->addresses; s < table->next; s++, sp++)
{
if ( sp->value == value )
@@ -285,7 +285,7 @@ rtems_symbol_name_lookup(
if (table == 0)
return NULL;
}
for (s = 0, sp = table->addresses; s < table->next; s++, sp++)
{
if ( strcasecmp(sp->name, name) == 0 )
@@ -313,7 +313,7 @@ rtems_monitor_symbol_next(
goto failed;
/* NOTE: symbols do not have id and name fields */
if (table->sorted == 0)
rtems_symbol_sort(table);
@@ -380,7 +380,7 @@ rtems_monitor_symbol_canonical_by_value(
}
uint32_t
uint32_t
rtems_monitor_symbol_dump(
rtems_monitor_symbol_t *canonical_symbol,
boolean verbose
+2 -2
View File
@@ -24,7 +24,7 @@ rtems_monitor_task_canonical(
RTEMS_API_Control *api;
api = rtems_thread->API_Extensions[ THREAD_API_RTEMS ];
canonical_task->entry = rtems_thread->Start.entry_point;
canonical_task->argument = rtems_thread->Start.numeric_argument;
canonical_task->stack = rtems_thread->Start.Initial_stack.area;
@@ -56,7 +56,7 @@ rtems_monitor_task_dump_header(
ID NAME PRIO STAT MODES EVENTS WAITID WAITARG NOTES\n");
/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
0 1 2 3 4 5 6 7 */
rtems_monitor_separator();
}
+5 -5
View File
@@ -38,7 +38,7 @@ typedef enum {
/* following monitor objects are not known to RTEMS, but
* we like to have "types" for them anyway */
RTEMS_MONITOR_OBJECT_DRIVER = OBJECTS_RTEMS_CLASSES_LAST+1,
RTEMS_MONITOR_OBJECT_DNAME,
RTEMS_MONITOR_OBJECT_CONFIG,
@@ -71,19 +71,19 @@ typedef enum {
/*
* Type of a pointer that may be a symbol
*/
#define MONITOR_SYMBOL_LEN 20
typedef struct {
char name[MONITOR_SYMBOL_LEN];
uint32_t value;
uint32_t offset;
} rtems_monitor_symbol_t;
} rtems_monitor_symbol_t;
typedef struct {
rtems_id id;
rtems_name name;
/* end of common portion */
} rtems_monitor_generic_t;
} rtems_monitor_generic_t;
/*
* Task
@@ -347,7 +347,7 @@ void rtems_monitor_server_kill(void);
rtems_status_code rtems_monitor_server_request(uint32_t , rtems_monitor_server_request_t *, rtems_monitor_server_response_t *);
void rtems_monitor_server_task(rtems_task_argument);
void rtems_monitor_server_init(uint32_t );
/* command.c */
int rtems_monitor_make_argv(char *, int *, char **);
int rtems_monitor_command_read(char *, int *, char **);
+27 -24
View File
@@ -3,17 +3,20 @@
// $Header$
//
// Copyright (c) 2000 - Rosimildo da Silva
//
// MODULE DESCRIPTION:
// Wrapper API around the ioctls calls for the Micro FrameBuffer
// interface for Embedded Systems
//
// All functions returns 0 on success. Any other value should be
// MODULE DESCRIPTION:
// Wrapper API around the ioctls calls for the Micro FrameBuffer
// interface for Embedded Systems
//
// All functions returns 0 on success. Any other value should be
// decoded as an error. A list of errors will be created over time.
//
// MODIFICATION/HISTORY:
//
// $Log$
// Revision 1.3 2004/04/15 13:24:46 ralf
// Remove stray white spaces.
//
// Revision 1.2 2003/07/08 08:38:48 ralf
// 2003-07-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
//
@@ -77,7 +80,7 @@
#include <rtems/mw_fb.h>
/*
/*
* This function returns the information regarding the display.
* It is called just after the driver be opened to get all needed
* information about the driver. No change in the mode of operation
@@ -90,8 +93,8 @@
/*
* Returns the mode of the graphics subsystem
/*
* Returns the mode of the graphics subsystem
*/
int ufb_get_mode( int fd, int *mode )
{
@@ -102,8 +105,8 @@
}
/*
* Returns the current collor pallete
/*
* Returns the current collor pallete
*/
int ufb_get_palette( int fd, struct fb_cmap *color )
{
@@ -111,17 +114,17 @@
}
/*
* Set the current collor pallete
/*
* Set the current collor pallete
*/
int ufb_set_palette( int fd, struct fb_cmap *color )
{
return ioctl( fd, FB_SETPALETTE, ( void *)color );
}
/*
* Does all necessary initialization to put the device in
* graphics mode
/*
* Does all necessary initialization to put the device in
* graphics mode
*/
int ufb_enter_graphics( int fd, int mode )
{
@@ -132,7 +135,7 @@
}
/*
/*
* Switch the device back to the default mode of operation.
* In most cases it put the device back to plain text mode.
*/
@@ -144,10 +147,10 @@
return ioctl( fd, FB_EXEC_FUNCTION , ( void *)&exec );
}
/*
* Tell the driver that the "virtual buffer" is dirty, and an update
* of it to the real device, maybe a serial/parallel LCD or whatever
* is required
/*
* Tell the driver that the "virtual buffer" is dirty, and an update
* of it to the real device, maybe a serial/parallel LCD or whatever
* is required
*/
int ufb_buffer_is_dirty( int fd )
{
@@ -159,7 +162,7 @@
/*
/*
* This function maps the physical ( kernel mode ) address of the framebuffer device
* and maps it to the user space address.
*/
@@ -167,13 +170,13 @@
{
#ifdef __rtems__
/* RTEMS runs in ring 0, and there is no distinction between
user space and kernel space, so we just return the same
user space and kernel space, so we just return the same
pointer to the caller.
*/
*fb_addr = physical_addr;
return 0;
#else
/* other kernels might want to map it to the user space,
/* other kernels might want to map it to the user space,
maybe using mmap()
*/
return 0;
@@ -182,7 +185,7 @@
}
/*
/*
* This function unmaps memory of the FB from the user's space
*/
int ufb_unmmap_from_user_space( int fd, void *addr )
+37 -20
View File
@@ -3,13 +3,30 @@
// $Header$
//
// Copyright (c) 2000 - Rosimildo da Silva
//
// MODULE DESCRIPTION:
//
// MODULE DESCRIPTION:
// Micro FrameBuffer interface for Embedded Systems.
//
// MODIFICATION/HISTORY:
//
// $Log$
// Revision 1.1 2000/08/30 08:21:24 joel
// 2000-08-26 Rosimildo da Silva <rdasilva@connecttel.com>
//
// * Added generic Micro FrameBuffer interface for MicroWindows.
// This interface allows MicroWindows to under RTEMS. A sample
// driver has been developed for the pc386 BSP. See
// pc386/fb_vga.c as a sample.
// * Added Uniform Input Device interface for MicroWindows.
// See PC386 bsp for sample drivers for mouse and keyboard (console).
// * mw-bf: New directory.
// * Makefile.am, configure.in, wrapup/Makefile.am: Account for mw-fb.
// * mw-fb/Makefile.am: New file.
// * mw-fb/mw_fb.c: New file.
// * mw-fb/mw_fb.h: New file.
// * mw-fb/mw_uid.c: New file.
// * mw-fb/mw_uid.h: New file.
//
//
/////////////////////////////////////////////////////////////////////////////
*/
@@ -77,7 +94,7 @@ struct fb_cmap {
#define FB_FUNC_IS_DIRTY 2
#define FB_FUNC_GET_MODE 3
struct fb_exec_function
struct fb_exec_function
{
int func_no;
void *param;
@@ -86,7 +103,7 @@ struct fb_exec_function
/* Micro Framebuffer API Wrapper */
/*
/*
* This function returns the information regarding the display.
* It is called just after the driver be opened to get all needed
* information about the driver. No change in the mode of operation
@@ -95,45 +112,45 @@ struct fb_exec_function
extern int ufb_get_screen_info( int fd, struct fb_screeninfo *info );
/*
* Returns the mode of the graphics subsystem
/*
* Returns the mode of the graphics subsystem
*/
extern int ufb_get_mode( int fd, int *mode );
/*
* Returns the current collor pallete
/*
* Returns the current collor pallete
*/
extern int ufb_get_palette( int fd, struct fb_cmap *color );
/*
* Set the current collor pallete
/*
* Set the current collor pallete
*/
extern int ufb_set_palette( int fd, struct fb_cmap *color );
/*
* Does all necessary initialization to put the device in
* graphics mode
/*
* Does all necessary initialization to put the device in
* graphics mode
*/
extern int ufb_enter_graphics( int fd, int mode );
/*
/*
* Switch the device back to the default mode of operation.
* In most cases it put the device back to plain text mode.
*/
extern int ufb_exit_graphics( int fd );
/*
* Tell the driver that the "virtual buffer" is dirty, and an update
* of it to the real device, maybe a serial/parallel LCD or whatever
* is required
/*
* Tell the driver that the "virtual buffer" is dirty, and an update
* of it to the real device, maybe a serial/parallel LCD or whatever
* is required
*/
extern int ufb_buffer_is_dirty( int fd );
/*
/*
* This function maps the physical ( kernel mode ) address of the framebuffer device
* and maps it to the user space address.
*/
@@ -141,7 +158,7 @@ extern int ufb_buffer_is_dirty( int fd );
/*
/*
* This function unmaps memory of the FB from the user's space
*/
int ufb_unmmap_from_user_space( int fd, void *addr );
+28 -9
View File
@@ -3,8 +3,8 @@
// $Header$
//
// Copyright (c) 2000 - Rosimildo da Silva
//
// MODULE DESCRIPTION:
//
// MODULE DESCRIPTION:
// This module implements the input devices interface used by MicroWindows
// in an embedded system environment.
// It uses the RTEMS message queue as the repository for the messages posted
@@ -13,6 +13,25 @@
// MODIFICATION/HISTORY:
//
// $Log$
// Revision 1.6 2004/03/26 06:59:18 ralf
// 2004-03-26 Ralf Corsepius <ralf_corsepius@rtems.org>
//
// * libmisc/capture/capture-cli.c, libmisc/capture/capture.c,
// libmisc/capture/capture.h, libmisc/cpuuse/cpuuse.c,
// libmisc/devnull/devnull.c, libmisc/fsmount/fsmount.h,
// libmisc/monitor/mon-config.c, libmisc/monitor/mon-dname.c,
// libmisc/monitor/mon-driver.c, libmisc/monitor/mon-extension.c,
// libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c,
// libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c,
// libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-queue.c,
// libmisc/monitor/mon-server.c, libmisc/monitor/mon-symbols.c,
// libmisc/monitor/monitor.h, libmisc/monitor/symbols.h,
// libmisc/mw-fb/mw_uid.c, libmisc/rtmonuse/rtmonuse.c,
// libmisc/serdbg/serdbg.h, libmisc/serdbg/serdbgio.c,
// libmisc/serdbg/termios_printk.c, libmisc/serdbg/termios_printk.h,
// libmisc/shell/shell.c, libmisc/shell/shell.h, libmisc/stackchk/check.c,
// libmisc/stackchk/internal.h: Convert to using c99 fixed size types.
//
// Revision 1.5 2003/07/08 08:38:48 ralf
// 2003-07-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
//
@@ -137,7 +156,7 @@ int uid_open_queue( const char *q_name, int flags, size_t max_msgs )
#ifdef MW_DEBUG_ON
printk( "UID_Queue: id=%X\n", queue_id );
#endif
}
}
open_count++;
return 0;
}
@@ -186,7 +205,7 @@ int uid_read_message( struct MW_UID_MESSAGE *m, unsigned long timeout )
}
/*
/*
* add a message to the queue of events. This method cna be used to
* simulate hardware events, and it can be very handy during development
* a new interface.
@@ -194,14 +213,14 @@ int uid_read_message( struct MW_UID_MESSAGE *m, unsigned long timeout )
int uid_send_message( struct MW_UID_MESSAGE *m )
{
rtems_status_code status;
status = rtems_message_queue_send( queue_id, ( void * )m,
status = rtems_message_queue_send( queue_id, ( void * )m,
sizeof( struct MW_UID_MESSAGE ) );
return status == RTEMS_SUCCESSFUL ? 0 : -1;
}
/*
/*
* register the device to insert events to the message
* queue named as the value passed in q_name
* queue named as the value passed in q_name
*/
int uid_register_device( int fd, const char *q_name )
{
@@ -217,11 +236,11 @@ int uid_unregister_device( int fd )
/* set the keyboard */
int uid_set_kbd_mode( int fd, int mode, int *old_mode )
{
if (ioctl( fd, MV_KDGKBMODE, old_mode) < 0)
if (ioctl( fd, MV_KDGKBMODE, old_mode) < 0)
{
return -1;
}
if (ioctl(fd, MV_KDSKBMODE, mode ) < 0 )
if (ioctl(fd, MV_KDSKBMODE, mode ) < 0 )
{
return -1;
}
+26 -9
View File
@@ -3,14 +3,31 @@
// $Header$
//
// Copyright (c) 2000 - Rosimildo da Silva
//
// MODULE DESCRIPTION:
//
// MODULE DESCRIPTION:
// This module defines the interface for input devices used by MicroWindows
// in an embedded system environment.
//
// MODIFICATION/HISTORY:
//
// $Log$
// Revision 1.1 2000/08/30 08:21:24 joel
// 2000-08-26 Rosimildo da Silva <rdasilva@connecttel.com>
//
// * Added generic Micro FrameBuffer interface for MicroWindows.
// This interface allows MicroWindows to under RTEMS. A sample
// driver has been developed for the pc386 BSP. See
// pc386/fb_vga.c as a sample.
// * Added Uniform Input Device interface for MicroWindows.
// See PC386 bsp for sample drivers for mouse and keyboard (console).
// * mw-bf: New directory.
// * Makefile.am, configure.in, wrapup/Makefile.am: Account for mw-fb.
// * mw-fb/Makefile.am: New file.
// * mw-fb/mw_fb.c: New file.
// * mw-fb/mw_fb.h: New file.
// * mw-fb/mw_uid.c: New file.
// * mw-fb/mw_uid.h: New file.
//
//
/////////////////////////////////////////////////////////////////////////////
*/
@@ -21,13 +38,13 @@
extern "C" {
#endif
/* 0x41XX -- IOCLT functions for the Micro Input Devices commands */
/* 0x41XX -- IOCLT functions for the Micro Input Devices commands */
#define MW_UID_REGISTER_DEVICE 0x4100
#define MW_UID_UNREGISTER_DEVICE 0x4101
/* devices supported by MicroWindows */
enum MW_INPUT_DEVICE_TYPE
enum MW_INPUT_DEVICE_TYPE
{
MV_UID_INVALID = 0,
MV_UID_REL_POS = 1, /* mouse */
@@ -53,7 +70,7 @@ enum MW_INPUT_DEVICE_TYPE
/* keyboard modes -- default ASCII */
#define MV_KEY_MODE_ASCII 0x01
/*
/*
* This mode one event is sent when a key is pressed,
* and another one is send when a key is released.
*/
@@ -68,7 +85,7 @@ enum MW_INPUT_DEVICE_TYPE
#define MV_KDSKBMODE 0x4B45 /* sets current keyboard mode */
/*
* Message generated by input devices controlled by MicroWindows.
* Message generated by input devices controlled by MicroWindows.
*/
struct MW_UID_MESSAGE
{
@@ -102,7 +119,7 @@ struct MW_UID_MESSAGE
/*
* API for creating/closing/accessing the message queue used by the micro
* input device interface. All functions in this interface returns a
* input device interface. All functions in this interface returns a
* zero ( 0 ) on success. One exception for that is the "read" routine
* that returns the number of bytes read. Negaive numbers indicate errors
*
@@ -117,8 +134,8 @@ extern int uid_open_queue( const char *q_name, int flags, size_t max_msgs );
/* closes message queue */
extern int uid_close_queue( void );
/*
* reads a message from the queue. It waits up to the specified
/*
* reads a message from the queue. It waits up to the specified
* timeout in mili-seconds.
*/
extern int uid_read_message( struct MW_UID_MESSAGE *m, unsigned long timeout );
+6 -6
View File
@@ -38,7 +38,7 @@ void Period_usage_Initialize( void )
int maximum;
maximum = _Configuration_Table->RTEMS_api_configuration->maximum_periods;
Period_usage_Information = malloc( sizeof(Period_usage_t) * (maximum+1) );
Period_usage_Reset();
@@ -58,7 +58,7 @@ void Period_usage_Reset( void )
i<_Configuration_Table->RTEMS_api_configuration->maximum_periods ;
i++ ) {
the_usage = &Period_usage_Information[ i ];
the_usage->count = 0;
the_usage->missed_count = 0;
the_usage->min_cpu_time = 0xFFFFFFFF;
@@ -67,7 +67,7 @@ void Period_usage_Reset( void )
the_usage->min_wall_time = 0xFFFFFFFF;
the_usage->max_wall_time = 0;
the_usage->total_wall_time = 0;
}
}
@@ -76,7 +76,7 @@ void Period_usage_Reset( void )
* Period_usage_Update
*/
void Period_usage_Update(
void Period_usage_Update(
rtems_id id
)
{
@@ -135,13 +135,13 @@ void Period_usage_Dump( void )
char name[5];
uint32_t api_index;
Objects_Information *information;
if ( !Period_usage_Information ) {
printf( "Period statistics library is not initialized\n" );
return;
}
printf( "Period information by period\n" );
printf( "Period information by period\n" );
printf( " ID OWNER PERIODS MISSED CPU TIME WALL TIME\n" );
/*
+1 -1
View File
@@ -9,7 +9,7 @@ void Period_usage_Initialize( void );
void Period_usage_Reset( void );
void Period_usage_Update(
void Period_usage_Update(
rtems_id id
);
+4 -4
View File
@@ -16,7 +16,7 @@
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 04.04.02 creation doe |
\*===============================================================*/
/*
/*
* $Id$
*/
@@ -60,11 +60,11 @@ int serdbg_init_dbg
return RTEMS_SUCCESSFUL;
}
is_initialized = TRUE;
/*
/*
* try to open serial device
*/
if (rc == RTEMS_SUCCESSFUL) {
if ((serdbg_conf.open_io != NULL) &&
if ((serdbg_conf.open_io != NULL) &&
(0 > serdbg_conf.open_io(serdbg_conf.devname,serdbg_conf.baudrate))) {
fprintf(stderr,
"remote_gdb_init: cannot open device %s "
@@ -81,7 +81,7 @@ int serdbg_init_dbg
/*
* now activate gdb stub
*/
if ((rc == RTEMS_SUCCESSFUL) &&
if ((rc == RTEMS_SUCCESSFUL) &&
!serdbg_conf.skip_init_bkpt) {
breakpoint();
}
+2 -2
View File
@@ -16,8 +16,8 @@
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 04.04.02 creation doe |
\*===============================================================*/
/*
* $Id$
/*
* $Id$
*/
#ifndef _SERDBG_H
#define _SERDBG_H
+2 -2
View File
@@ -16,7 +16,7 @@
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 13.05.02 creation doe |
\*===============================================================*/
/*
/*
* $Id$
*/
#ifndef _SERDBGCNF_H
@@ -59,7 +59,7 @@ serdbg_conf_t serdbg_conf = {
#endif
CONFIGURE_SERDBG_DEVNAME,
#ifdef CONFIGURE_SERDBG_SKIP_INIT_BKPT
TRUE,
#else
+13 -13
View File
@@ -106,7 +106,7 @@ int serdbg_open
* open device for serdbg operation
* skip any fds that are between 0..2, because they are
* reserved for stdin/out/err
*/
*/
if (!err_occurred &&
(dev_name != NULL) &&
(dev_name[0] != '\0')) {
@@ -125,7 +125,7 @@ int serdbg_open
}
}
}
} while (!err_occurred &&
} while (!err_occurred &&
(serdbg_fd < 3));
}
/*
@@ -137,14 +137,14 @@ int serdbg_open
}
/*
* capture tty structure
* capture tty structure
*/
if (!err_occurred) {
iop = &rtems_libio_iops[serdbg_fd];
serdbg_tty = iop->data1;
}
/*
* set device baudrate
* set device baudrate
* (and transp mode, this is not really needed)
* ...
*/
@@ -156,12 +156,12 @@ int serdbg_open
err_occurred = TRUE;
}
if (!err_occurred) {
act_termios.c_iflag
act_termios.c_iflag
&= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
act_termios.c_oflag
act_termios.c_oflag
&= ~OPOST;
act_termios.c_lflag
&= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
@@ -172,8 +172,8 @@ int serdbg_open
err_occurred = TRUE;
}
}
return (err_occurred
? -1
return (err_occurred
? -1
: 0);
}
@@ -197,7 +197,7 @@ void putDebugChar
\*=========================================================================*/
{
/*
* call serdbg polling callout, if available
* call serdbg polling callout, if available
*/
if (serdbg_conf.callout != NULL) {
serdbg_conf.callout();
@@ -205,7 +205,7 @@ void putDebugChar
/*
* check, whether debug serial port is available
*/
if ((serdbg_tty != NULL) &&
if ((serdbg_tty != NULL) &&
(serdbg_tty->device.write != NULL)) {
/*
* send character to debug serial port
@@ -237,11 +237,11 @@ int getDebugChar
/*
* check, whether debug serial port is available
*/
if ((serdbg_tty != NULL) &&
if ((serdbg_tty != NULL) &&
(serdbg_tty->device.pollRead != NULL)) {
do {
/*
* call serdbg polling callout, if available
* call serdbg polling callout, if available
*/
if (serdbg_conf.callout != NULL) {
serdbg_conf.callout();
+11 -11
View File
@@ -73,10 +73,10 @@ void termios_printk_outputchar
* check, whether printk serial port is available
*/
if ((termios_printk_tty != NULL) &&
if ((termios_printk_tty != NULL) &&
(termios_printk_tty->device.write != NULL)) {
/*
* call termios_printk polling callout, if available
* call termios_printk polling callout, if available
*/
if (termios_printk_conf.callout != NULL) {
termios_printk_conf.callout();
@@ -84,7 +84,7 @@ void termios_printk_outputchar
/*
* send character to debug serial port
*/
if (c == '\n') {
if (c == '\n') {
termios_printk_tty->device.write(termios_printk_tty->minor,&cr,1);
}
termios_printk_tty->device.write(termios_printk_tty->minor,&c,1);
@@ -113,11 +113,11 @@ char termios_printk_inputchar
/*
* check, whether debug serial port is available
*/
if ((termios_printk_tty != NULL) &&
if ((termios_printk_tty != NULL) &&
(termios_printk_tty->device.pollRead != NULL)) {
do {
/*
* call termios_printk polling callout, if available
* call termios_printk polling callout, if available
*/
if (termios_printk_conf.callout != NULL) {
termios_printk_conf.callout();
@@ -156,7 +156,7 @@ int termios_printk_open
rtems_libio_t *iop = NULL;
struct termios act_termios;
tcflag_t baudcode = B0;
if (termios_printk_fd >= 0) {
/*
* already initialized
@@ -190,7 +190,7 @@ int termios_printk_open
}
/*
* open device for serdbg operation
*/
*/
if (!err_occurred &&
(dev_name != NULL) &&
(dev_name[0] != '\0')) {
@@ -200,14 +200,14 @@ int termios_printk_open
}
}
/*
* capture tty structure
* capture tty structure
*/
if (!err_occurred) {
iop = &rtems_libio_iops[termios_printk_fd];
termios_printk_tty = iop->data1;
}
/*
* set device baudrate
* set device baudrate
* (and transp mode, this is not really needed)
* ...
*/
@@ -231,7 +231,7 @@ int termios_printk_open
BSP_output_char = termios_printk_outputchar;
BSP_poll_char = termios_printk_inputchar;
}
return (err_occurred
? -1
return (err_occurred
? -1
: 0);
}
+1 -1
View File
@@ -16,7 +16,7 @@
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 13.04.02 creation doe |
\*===============================================================*/
/*
/*
* $Id$
*/
#ifndef _TERMIOS_PRINTK_H
+2 -2
View File
@@ -16,7 +16,7 @@
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 13.05.02 creation doe |
\*===============================================================*/
/*
/*
* $Id$
*/
#ifndef _TERMIOS_PRINTK_CNF_H
@@ -52,7 +52,7 @@ termios_printk_conf_t termios_printk_conf = {
#else
NULL,
#endif
CONFIGURE_TERMIOS_PRINTK_DEVNAME,
CONFIGURE_TERMIOS_PRINTK_DEVNAME,
};
#endif
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+12 -12
View File
@@ -2,9 +2,9 @@
*
* Instantatiate a new terminal shell.
*
* Author:
* Author:
*
* WORK: fernando.ruiz@ctv.es
* WORK: fernando.ruiz@ctv.es
* HOME: correo@fernando-ruiz.com
*
* Thanks at:
@@ -18,11 +18,11 @@
#ifdef __cplusplus
extern "C" {
#endif
#endif
#include <rtems.h>
#include <stdio.h>
#include <termios.h>
#include <rtems.h>
#include <stdio.h>
#include <termios.h>
typedef int (*shell_command_t)(int argc,char * argv[]);
@@ -51,7 +51,7 @@ int shell_make_args(char * cmd,
char * argv[]);
typedef struct {
rtems_name magic; /* 'S','E','N','V': Shell Environment */
rtems_name magic; /* 'S','E','N','V': Shell Environment */
char * devname;
char * taskname;
tcflag_t tcflag;
@@ -65,24 +65,24 @@ typedef struct {
int shell_scanline(char * line,int size,FILE * in,FILE * out) ;
void cat_file(FILE * out,char *name);
void write_file(char *name,char * content);
rtems_status_code shell_init(char * task_name ,
uint32_t task_stacksize,/*0 default*/
rtems_task_priority task_priority ,
char * devname ,
tcflag_t tcflag ,
int forever );
int forever );
extern shell_env_t global_shell_env,
* current_shell_env;
/*--------*/
/* cmds.c */
/* cmds.c */
/*--------*/
int str2int(char * s);
void register_cmds(void);
#ifdef __cplusplus
}
#endif
#endif
#endif
+2 -2
View File
@@ -529,8 +529,8 @@ void Stack_check_Dump_usage( void )
" ID NAME LOW HIGH AVAILABLE USED\n"
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
+3 -3
View File
@@ -47,7 +47,7 @@
* 345 167 bytes Padding
* 512 (s+p)bytes File contents (s+p) := (((s) + 511) & ~511),
* round up to 512 bytes
*
*
* Checksum:
* int i, sum;
* char* header = tar_header_pointer;
@@ -165,7 +165,7 @@ Untar_FromMemory(unsigned char *tar_buf, unsigned long size)
file_size = octal2ulong(&bufr[124], 12);
/******************************************************************
* Compute the TAR checksum and check with the value in
* Compute the TAR checksum and check with the value in
* the archive. The checksum is computed over the entire
* header, but the checksum field is substituted with blanks.
******************************************************************/
@@ -312,7 +312,7 @@ Untar_FromFile(char *tar_name)
size = octal2ulong(&bufr[124], 12);
/******************************************************************
* Compute the TAR checksum and check with the value in
* Compute the TAR checksum and check with the value in
* the archive. The checksum is computed over the entire
* header, but the checksum field is substituted with blanks.
******************************************************************/