Remove unnecessary white spaces.

This commit is contained in:
Ralf Corsepius
2004-04-15 04:00:25 +00:00
parent d9ac411f32
commit 7ded4e37a3
76 changed files with 167 additions and 252 deletions

View File

@@ -49,4 +49,3 @@ extern "C" {
#endif
/* end of include file */

View File

@@ -39,7 +39,7 @@ typedef struct t_cflg {
/*
* wfmode
*/
#define TWF_ANDW 0x00 /* AND wait */
#define TWF_ORW 0x02 /* OR wait */
#define TWF_CLR 0x01 /* clear specification */
@@ -143,4 +143,3 @@ ER ref_flg(
#endif
/* end of include file */

View File

@@ -122,4 +122,3 @@ ER ref_mpf(
#endif
/* end of include file */

View File

@@ -74,7 +74,7 @@ ER dis_int(
);
/*
* ena_int - Enable Interrupt
* ena_int - Enable Interrupt
*/
ER ena_int(
@@ -103,4 +103,3 @@ ER ref_iXX(
#endif
/* end of include file */

View File

@@ -92,7 +92,7 @@ ER snd_msg(
);
/*
* rcv_msg - Receive Message from Mailbox
* rcv_msg - Receive Message from Mailbox
*/
ER rcv_msg(
@@ -135,4 +135,3 @@ ER ref_mbx(
#endif
/* end of include file */

View File

@@ -157,4 +157,3 @@ ER ref_mbf(
#endif
/* end of include file */

View File

@@ -75,4 +75,3 @@ ER nget_ver(
#endif
/* end of include file */

View File

@@ -74,7 +74,7 @@ ER del_por(
);
/*
* cal_por - Call Port for Rendezvous Poll
* cal_por - Call Port for Rendezvous Poll
*/
ER cal_por(
@@ -187,4 +187,3 @@ ER ref_por(
#endif
/* end of include file */

View File

@@ -79,7 +79,7 @@ ER sig_sem(
);
/*
* wai_sem - Wait on Semaphore
* wai_sem - Wait on Semaphore
*/
ER wai_sem(
@@ -118,4 +118,3 @@ ER ref_sem(
#endif
/* end of include file */

View File

@@ -67,4 +67,3 @@ extern "C" {
#endif
/* end of include file */

View File

@@ -87,19 +87,19 @@ typedef struct t_ver {
* When using the format given in Figure 47(2) the code used for MAKER1 is
* assigned by using the lower 8 bits of MAKER described in the previous
* subsection. The code assignment of CPU2 is left up to each maker.
*
*
*
*
*
*
* +---------------+---------------+---------------+---------------+
* (1) | 0 0 0 0 0 0 0 0 | CPU1 |
* +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
* +---------------+---------------+---------------+---------------+
* (2) | MAKER1 | CPU2 |
* +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
*
*
* Figure 47 Format of cpu Returned by get_ver
*
*
*
*
* Specific CPU codes established as of March, 1993 are as follows.
*/
@@ -179,32 +179,32 @@ typedef struct t_ver {
*
* The version numbers of ITRON and uITRON specifications take the following
* form.
*
*
* Ver X.YY.ZZ[.WW]
*
*
* where "X" represents major version number of the ITRON specification to
* distinguish ITRON1, ITRON2 and uITRON 3.0 specifications. Specific
* assignment is as follows.
*
*
* "X" = 1 ITRON1 specification
* = 2 ITRON2 or uITRON 2.0 specification
* = 3 uITRON 3.0 specification
*
*
* "YY" is a number used to distinguish versions according to changes and
* additions made to the specification. After the specification is published,
* this number is incremented in order "YY" = 00, 01, 02... according to
* version upgrades. The first digit of "YY" is 'A', 'B' or 'C' for draft
* standard versions and test versions within the TRON Association before the
* specification have been published.
*
*
* The "X.YY" part of the specification version numbers is returned by spver
* to get_ver system call. The corresponding hexadecimal value is used when
* "YY" includes 'A', 'B' or 'C'.
*
*
* "ZZ" represents a number used to distinguish versions related to the written
* style of a specification. This number is incremented in order
* "ZZ" = 00, 01, 02... when there have been changes in specification
* configuration, reordering of chapters or corrections of misprints.
* configuration, reordering of chapters or corrections of misprints.
* When a further distinction of the written style of specifications is
* desired, ".WW" may be added optionally after "ZZ". WW will be assumed
* to be zero if ".WW" is omitted.
@@ -316,4 +316,3 @@ ER def_exc(
#endif
/* end of include file */

View File

@@ -295,4 +295,3 @@ ER can_wup(
#endif
/* end of include file */

View File

@@ -182,4 +182,3 @@ void ret_tmr( void );
#endif
/* end of include file */

View File

@@ -17,8 +17,8 @@ extern "C" {
#endif
/* XXX some of these may need to be moved */
/*
* XXX: These names are too short and conflict with numerous
/*
* XXX: These names are too short and conflict with numerous
* off the shell programs including paranoia.
*/
@@ -46,10 +46,10 @@ typedef void (*FP)(); /* program start address */
*/
/*
* Data Types Dependent on ITRON Specification
* Data Types Dependent on ITRON Specification
*
* In order to clarify the meanings of certain parameters, the
* following names are used for data types which appear frequently
* following names are used for data types which appear frequently
* and/or have special meanings.
*/
@@ -118,4 +118,3 @@ typedef int32_t TMO; /* Timeout value. A signed integer. */
#endif
/* end of include file */

View File

@@ -129,4 +129,3 @@ ER ref_mpl(
#endif
/* end of include file */

View File

@@ -58,4 +58,3 @@ void _ITRON_Eventflags_Manager_initialization(
#endif
/* end of include file */

View File

@@ -19,7 +19,7 @@ extern "C" {
#include <rtems/itron/object.h>
/*
* The following defines the control block used to manage each
* The following defines the control block used to manage each
* fixed memory pool.
*/
@@ -59,4 +59,3 @@ void _ITRON_Fixed_memory_pool_Manager_initialization(
#endif
/* end of include file */

View File

@@ -28,4 +28,3 @@ extern "C" {
#endif
/* end of include file */

View File

@@ -10,10 +10,10 @@
*
* $Id$
*/
#ifndef __ITRON_API_h
#define __ITRON_API_h
#include <rtems/config.h>
/*
@@ -21,7 +21,7 @@
*
* Initialize the ITRON API.
*/
void _ITRON_API_Initialize(
rtems_configuration_table *configuration_table
);

View File

@@ -70,4 +70,3 @@ ER _ITRON_Mailbox_Translate_core_message_queue_return_code(
#endif
/* end of include file */

View File

@@ -15,12 +15,12 @@
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems/itron/object.h>
#include <rtems/score/coremsg.h>
/*
* The following defines the control block used to manage each
* The following defines the control block used to manage each
* message buffer.
*/
@@ -55,8 +55,8 @@ void _ITRON_Message_buffer_Manager_initialization(
* DESCRIPTION:
*
* This routine translates a core message buffer object status
* into the appropriate ITRON status code.
*/
* into the appropriate ITRON status code.
*/
ER _ITRON_Message_buffer_Translate_core_message_buffer_return_code(
CORE_message_queue_Status status

View File

@@ -28,4 +28,3 @@ extern "C" {
#endif
/* end of include file */

View File

@@ -79,7 +79,7 @@ typedef Objects_Control ITRON_Objects_Control;
* This function is invoked when an object get ID error
* occurs to determine the specific ITRON error code to return.
*/
#define _ITRON_Objects_Clarify_get_id_error( _the_information, _id ) \
(((_id) < -4) ? E_OACV : /* attempt to access a "system object" */ \
((_id) <= 0) ? E_ID : /* bogus index of 0 - -3 */ \
@@ -117,4 +117,3 @@ typedef Objects_Control ITRON_Objects_Control;
#endif
/* end of include file */

View File

@@ -58,4 +58,3 @@ void _ITRON_Port_Manager_initialization(
#endif
/* end of include file */

View File

@@ -56,4 +56,3 @@ void _ITRON_Semaphore_Manager_initialization(
#endif
/* end of include file */

View File

@@ -28,4 +28,3 @@ extern "C" {
#endif
/* end of include file */

View File

@@ -22,7 +22,7 @@ extern "C" {
/*
* This macro evaluates to TRUE if there should be a "context error."
* This is defined as a blocking directive being issed from
* This is defined as a blocking directive being issed from
* task-independent portions or a task in dispatch disabled state.
*
* NOTE: Dispatching is disabled in interrupts so this should cover
@@ -31,7 +31,7 @@ extern "C" {
#define _ITRON_Is_in_non_task_state() \
(_Thread_Dispatch_disable_level != 0)
/*
* This is the API specific information required by each thread for
* the ITRON API to function correctly.
@@ -40,7 +40,7 @@ extern "C" {
typedef struct {
uint32_t unused; /* no use for the API extension */
/* structure for ITRON identified yet */
/* structure for ITRON identified yet */
} ITRON_API_Control;
/*
@@ -99,4 +99,3 @@ do { \
#endif
/* end of include file */

View File

@@ -28,4 +28,3 @@ extern "C" {
#endif
/* end of include file */

View File

@@ -59,4 +59,3 @@ void _ITRON_Variable_memory_pool_Manager_initialization(
#endif
/* end of include file */

View File

@@ -50,4 +50,3 @@ ER can_wup(
_ITRON_return_errorno( E_OK );
}

View File

@@ -34,13 +34,13 @@ ER chg_pri(
{
register Thread_Control *the_thread;
Objects_Locations location;
Priority_Control new_priority;
Priority_Control new_priority;
the_thread = _ITRON_Task_Get( tskid, &location );
switch ( location ) {
case OBJECTS_REMOTE:
case OBJECTS_ERROR:
return _ITRON_Task_Clarify_get_id_error( tskid );
return _ITRON_Task_Clarify_get_id_error( tskid );
case OBJECTS_LOCAL:
if (_States_Is_dormant( the_thread->current_state ))
@@ -66,5 +66,3 @@ ER chg_pri(
_ITRON_return_errorno( E_OK );
}

View File

@@ -48,7 +48,7 @@ ER cre_mbf(
if (pk_cmbf->bufsz < 0 || pk_cmbf->maxmsz < 0)
return E_PAR;
if (pk_cmbf->bufsz < pk_cmbf->maxmsz)
return E_PAR;
@@ -74,7 +74,7 @@ ER cre_mbf(
_ITRON_Objects_Open( &_ITRON_Message_buffer_Information,
&the_message_buffer->Object );
/*
* If multiprocessing were supported, this is where we would announce
* the existence of the semaphore to the rest of the system.

View File

@@ -22,7 +22,7 @@
/*
* cre_mbx - Create Mailbox
*
*
* Creates a Mailbox according to the following spec:
*
* ------Parameters-------------------------

View File

@@ -35,12 +35,12 @@ ER cre_tsk(
{
register Thread_Control *the_thread;
boolean status;
Priority_Control core_priority;
Priority_Control core_priority;
/*
* Validate Parameters.
*/
if ( pk_ctsk == NULL )
return E_PAR;
@@ -62,11 +62,11 @@ ER cre_tsk(
return E_PAR;
if ( pk_ctsk->stksz < 0 )
return E_PAR;
/*
* Disable dispatching.
*/
_Thread_Disable_dispatch();
/*
@@ -84,7 +84,7 @@ ER cre_tsk(
core_priority = _ITRON_Task_Priority_to_Core( pk_ctsk->itskpri );
status = _Thread_Initialize(
&_ITRON_Task_Information,
the_thread,
the_thread,
NULL,
pk_ctsk->stksz,
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
@@ -118,7 +118,3 @@ ER cre_tsk(
_ITRON_return_errorno( E_OK );
}

View File

@@ -53,6 +53,6 @@ ER del_mbf(
_Thread_Enable_dispatch();
return E_OK;
}
return E_OK;
}

View File

@@ -31,13 +31,13 @@ ER del_sem(
{
ITRON_Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _ITRON_Semaphore_Get( semid, &location );
switch ( location ) {
case OBJECTS_REMOTE: /* Multiprocessing not supported */
case OBJECTS_ERROR:
return _ITRON_Semaphore_Clarify_get_id_error( semid );
case OBJECTS_LOCAL:
_CORE_semaphore_Flush(
&the_semaphore->semaphore,

View File

@@ -40,7 +40,7 @@ ER del_tsk(
switch ( location ) {
case OBJECTS_REMOTE:
case OBJECTS_ERROR:
return _ITRON_Task_Clarify_get_id_error( tskid );
return _ITRON_Task_Clarify_get_id_error( tskid );
case OBJECTS_LOCAL:
@@ -56,4 +56,3 @@ ER del_tsk(
_ITRON_return_errorno( result );
}

View File

@@ -32,11 +32,9 @@ ER dis_dsp( void )
{
/*
* Disable dispatch for protection
*/
*/
_Thread_Disable_dispatch();
return E_OK;
}

View File

@@ -34,4 +34,3 @@ ER ena_dsp( void )
return E_OK;
}

View File

@@ -17,9 +17,9 @@
#include <rtems/itron/eventflags.h>
/*
/*
* _ITRON_Eventflags_Manager_initialization
*
*
* This routine initializes all event flags manager related data structures.
*
* Input parameters:
@@ -30,14 +30,14 @@
void _ITRON_Eventflags_Manager_initialization(
uint32_t maximum_eventflags
)
)
{
_Objects_Initialize_information(
&_ITRON_Eventflags_Information, /* object information table */
OBJECTS_ITRON_API, /* object API */
OBJECTS_ITRON_EVENTFLAGS, /* object class */
maximum_eventflags, /* maximum objects of this class */
sizeof( ITRON_Eventflags_Control ),
sizeof( ITRON_Eventflags_Control ),
/* size of this object's control block */
FALSE, /* TRUE if names for this object are strings */
ITRON_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */
@@ -47,14 +47,14 @@ void _ITRON_Eventflags_Manager_initialization(
NULL /* Proxy extraction support callout */
#endif
);
/*
* Register the MP Process Packet routine.
*
* NOTE: No MP Support YET in RTEMS ITRON implementation.
*/
}
}
/*
* cre_flg - Create Eventflag
@@ -157,4 +157,3 @@ ER ref_flg(
{
return E_OK;
}

View File

@@ -41,7 +41,6 @@ void exd_tsk( void )
_Thread_Set_state( _Thread_Executing, STATES_DORMANT );
_ITRON_Delete_task( _Thread_Executing );
_Thread_Enable_dispatch();
}

View File

@@ -42,5 +42,5 @@ void ext_tsk( void )
_Thread_Set_state( _Thread_Executing, STATES_DORMANT );
_Thread_Reset( _Thread_Executing, NULL, 0 );
_Thread_Enable_dispatch();
_Thread_Enable_dispatch();
}

View File

@@ -17,9 +17,9 @@
#include <rtems/itron/fmempool.h>
/*
/*
* _ITRON_Fixed_memory_pool_Manager_initialization
*
*
* This routine initializes all fixed memory pool manager related
* data structures.
*
@@ -31,7 +31,7 @@
void _ITRON_Fixed_memory_pool_Manager_initialization(
uint32_t maximum_fixed_memory_pools
)
)
{
_Objects_Initialize_information(
&_ITRON_Fixed_memory_pool_Information, /* object information table */
@@ -48,14 +48,14 @@ void _ITRON_Fixed_memory_pool_Manager_initialization(
NULL /* Proxy extraction support callout */
#endif
);
/*
* Register the MP Process Packet routine.
*
* NOTE: No MP Support YET in RTEMS ITRON implementation.
*/
}
}
/*
* cre_mpf - Create Fixed-Size Memorypool
@@ -140,4 +140,3 @@ ER ref_mpf(
{
return E_OK;
}

View File

@@ -39,7 +39,7 @@ ER frsm_tsk(
switch ( location ) {
case OBJECTS_REMOTE:
case OBJECTS_ERROR:
return _ITRON_Task_Clarify_get_id_error( tskid );
return _ITRON_Task_Clarify_get_id_error( tskid );
case OBJECTS_LOCAL:
if ( _Thread_Is_executing( the_thread ) )
@@ -47,7 +47,7 @@ ER frsm_tsk(
if (_States_Is_dormant( the_thread->current_state ))
_ITRON_return_errorno( E_OBJ );
if ( ! _States_Is_suspended(the_thread->current_state) )
_ITRON_return_errorno( E_OK );
@@ -58,5 +58,3 @@ ER frsm_tsk(
_ITRON_return_errorno( E_OK );
}

View File

@@ -35,8 +35,7 @@ ER get_tid(
* This does not support multiprocessing. The id handling will have
* to be enhanced to support multiprocessing.
*/
*p_tskid = _Objects_Get_index( _Thread_Executing->Object.id );
return E_OK;
}

View File

@@ -77,7 +77,7 @@ ER dis_int(
}
/*
* ena_int - Enable Interrupt
* ena_int - Enable Interrupt
*/
ER ena_int(
@@ -108,4 +108,3 @@ ER ref_iXX(
{
return E_OK;
}

View File

@@ -58,4 +58,3 @@ void _ITRON_Semaphore_Manager_initialization(
*/
}

View File

@@ -36,7 +36,7 @@ void converTime(SYSTIME ms, TOD_Control *time)
millisecond = 0;
#endif
}
/*
* set_tim - Set System Clock
@@ -48,10 +48,10 @@ ER set_tim(
{
Watchdog_Interval temp; /* an integer in seconds after conversion from SYSTIME */
TOD_Control the_tod;
/* convert *pk_tim which is 48 bits integer in binary into an ordinary
integer in milliseconds */
/* XXX */ temp = 0;
if(temp > 0) {
_Thread_Disable_dispatch();
@@ -117,7 +117,7 @@ ER def_cyc(
#if 0
Watchdog_Interval timeInterval;
#endif
/* XXX */ object = 0;
if ( pk_dcyc->cycatr != TA_HLNG)
return E_RSATR;
@@ -131,7 +131,7 @@ ER def_cyc(
cycno,
pk_dcyc->exinf);
_Watchdog_Deactivate(object);
return E_OK;
}
@@ -145,7 +145,7 @@ ER act_cyc(
)
{
Watchdog_Control *object;
if(cycact != TCY_OFF || cycact != TCY_ON)
return E_PAR;
@@ -153,9 +153,9 @@ ER act_cyc(
if( object->Object_ID != cycno)
return E_NOEXS;
#endif
_Watchdog_Activate(object);
return E_OK;
}
@@ -176,8 +176,8 @@ ER ref_cyc(
Watchdog_Control *object;
#endif
/* XXX */ pk_dcyc = 0;
/* XXX */ pk_dcyc = 0;
/* XXX will to use a "get" routine to map from id to object pointer */
/* XXX and the object pointer should be of type specific to this manager */
#if 0
@@ -191,11 +191,11 @@ ER ref_cyc(
#if 0
pk_rcyc->lfttim = pk_dcyc->cyctim - timeElapse_since_actCyclic;
#endif
return E_OK;
}
else
return E_NOEXS;
return E_NOEXS;
}
/*
@@ -206,11 +206,11 @@ ER def_alm(
HNO almno,
T_DALM *pk_dalm
)
{
{
#if 0
Objects_Control *objectAlrm;
Watchdog_Interval timeInterval;
timeInterval = pk_dalm->almtim / 1000;
(void) _Watchdog_Remove(&objectAlrm);
_Watchdog_Initialize(
@@ -221,7 +221,7 @@ ER def_alm(
_Watchdong_Insert_seconds(objectAlrm,timeInterval);
_Thread_Enable_dispatch();
#endif
return E_OK;
}
@@ -234,7 +234,7 @@ ER ref_alm(
HNO almno
)
{
return E_OK;
}
@@ -245,4 +245,3 @@ ER ref_alm(
void ret_tmr( void )
{
}

View File

@@ -20,9 +20,9 @@
#include <rtems/itron/mbox.h>
#include <rtems/itron/task.h>
/*
/*
* _ITRON_Mailbox_Manager_initialization
*
*
* This routine initializes all mailboxes manager related data structures.
*
* Input parameters:
@@ -33,7 +33,7 @@
void _ITRON_Mailbox_Manager_initialization(
uint32_t maximum_mailboxes
)
)
{
_Objects_Initialize_information(
&_ITRON_Mailbox_Information, /* object information table */
@@ -49,11 +49,11 @@ void _ITRON_Mailbox_Manager_initialization(
NULL /* Proxy extraction support callout */
#endif
);
/*
* Register the MP Process Packet routine.
*
* NOTE: No MP Support YET in RTEMS ITRON implementation.
*/
}
}

View File

@@ -20,11 +20,11 @@
#include <rtems/itron/msgbuffer.h>
#include <rtems/itron/task.h>
/*
/*
* _ITRON_Message_buffer_Manager_initialization
*
*
* This routine initializes all message buffer manager related data
* structures.
* structures.
*
* Input parameters:
* maximum_message_buffers - maximum configured message buffers
@@ -34,7 +34,7 @@
void _ITRON_Message_buffer_Manager_initialization(
uint32_t maximum_message_buffers
)
)
{
_Objects_Initialize_information(
&_ITRON_Message_buffer_Information, /* object information table */
@@ -42,20 +42,19 @@ void _ITRON_Message_buffer_Manager_initialization(
OBJECTS_ITRON_MESSAGE_BUFFERS, /* object class */
maximum_message_buffers, /* maximum objects of this class */
sizeof( ITRON_Message_buffer_Control ),
/* size of this object's control block */
FALSE, /* TRUE if names for this object are strings */
ITRON_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */
/* size of this object's control block */
FALSE, /* TRUE if names for this object are strings */
ITRON_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */
#if defined(RTEMS_MULTIPROCESSING)
,
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
/*
* Register the MP Process Packet routine.
*
* NOTE: No MP Support YET in RTEMS ITRON implementation.
*/
}
}

View File

@@ -69,4 +69,3 @@ ER nget_ver(
{
return E_OK;
}

View File

@@ -17,9 +17,9 @@
#include <rtems/itron/port.h>
/*
/*
* _ITRON_Port_Manager_initialization
*
*
* This routine initializes all ports manager related data structures.
*
* Input parameters:
@@ -30,7 +30,7 @@
void _ITRON_Port_Manager_initialization(
uint32_t maximum_ports
)
)
{
_Objects_Initialize_information(
&_ITRON_Port_Information, /* object information table */
@@ -46,14 +46,14 @@ void _ITRON_Port_Manager_initialization(
NULL /* Proxy extraction support callout */
#endif
);
/*
* Register the MP Process Packet routine.
*
* NOTE: No MP Support YET in RTEMS ITRON implementation.
*/
}
}
/*
* cre_por - Create Port for Rendezvous
@@ -79,7 +79,7 @@ ER del_por(
}
/*
* cal_por - Call Port for Rendezvous Poll
* cal_por - Call Port for Rendezvous Poll
*/
ER cal_por(
@@ -209,4 +209,3 @@ ER ref_por(
{
return E_OK;
}

View File

@@ -28,6 +28,6 @@
ER preq_sem(
ID semid
)
{
{
return twai_sem( semid, TMO_POL );
}

View File

@@ -30,5 +30,5 @@ ER psnd_mbf(
INT msgsz
)
{
return tsnd_mbf( mbfid, msg, msgsz, TMO_POL );
return tsnd_mbf( mbfid, msg, msgsz, TMO_POL );
}

View File

@@ -21,7 +21,7 @@
#include <rtems/itron/task.h>
/*
* rcv_msg - Receive Message from Mailbox
* rcv_msg - Receive Message from Mailbox
*/
ER rcv_msg(

View File

@@ -32,16 +32,16 @@ ER ref_mbf(
ITRON_Message_buffer_Control *the_message_buffer;
Objects_Locations location;
CORE_message_queue_Control *the_core_msgq;
if ( !pk_rmbf )
return E_PAR; /* XXX check this error code */
the_message_buffer = _ITRON_Message_buffer_Get( mbfid, &location );
switch ( location ) {
switch ( location ) {
case OBJECTS_REMOTE: /* Multiprocessing not supported */
case OBJECTS_ERROR:
return _ITRON_Message_buffer_Clarify_get_id_error( mbfid );
case OBJECTS_LOCAL:
the_core_msgq = &the_message_buffer->message_queue;
@@ -55,13 +55,13 @@ ER ref_mbf(
pk_rmbf->msgsz = ((CORE_message_queue_Buffer_control *)
the_core_msgq->Pending_messages.first)->Contents.size;
}
/*
* Fill in the size of free buffer
*/
pk_rmbf->frbufsz =
(the_core_msgq->maximum_pending_messages -
(the_core_msgq->maximum_pending_messages -
the_core_msgq->number_of_pending_messages) *
the_core_msgq->maximum_message_size;
@@ -70,7 +70,7 @@ ER ref_mbf(
* Fill in whether or not there is a waiting task
*/
if ( !_Thread_queue_First(&the_core_msgq->Wait_queue ) )
if ( !_Thread_queue_First(&the_core_msgq->Wait_queue ) )
pk_rmbf->wtsk = FALSE;
else
pk_rmbf->wtsk = TRUE;
@@ -78,6 +78,6 @@ ER ref_mbf(
pk_rmbf->stsk = FALSE;
_Thread_Enable_dispatch();
return E_OK;
}
}
return E_OK;
}

View File

@@ -47,7 +47,7 @@ ER ref_mbx(
pending = &the_mailbox->message_queue.Pending_messages;
if ( _Chain_Is_empty( pending ) )
pk_rmbx->pk_msg = NULL;
else
else
pk_rmbx->pk_msg = (T_MSG *) pending->first;
/*
@@ -63,4 +63,3 @@ ER ref_mbx(
}
_ITRON_return_errorno( E_OK );
}

View File

@@ -32,16 +32,16 @@ ER ref_sem(
{
ITRON_Semaphore_Control *the_semaphore;
Objects_Locations location;
if ( !pk_rsem )
return E_PAR; /* XXX check this error code */
the_semaphore = _ITRON_Semaphore_Get( semid, &location );
switch ( location ) {
switch ( location ) {
case OBJECTS_REMOTE: /* Multiprocessing not supported */
case OBJECTS_ERROR:
return _ITRON_Semaphore_Clarify_get_id_error( semid );
case OBJECTS_LOCAL:
/*
* Fill in the current semaphore count
@@ -60,7 +60,6 @@ ER ref_sem(
_Thread_Enable_dispatch();
return E_OK;
}
}
return E_OK;
}

View File

@@ -35,7 +35,7 @@ ER ref_tsk(
{
register Thread_Control *the_thread;
Objects_Locations location;
Priority_Control core_priority;
Priority_Control core_priority;
if (!pk_rtsk)
return E_PAR;
@@ -45,7 +45,7 @@ ER ref_tsk(
case OBJECTS_REMOTE:
case OBJECTS_ERROR:
return _ITRON_Task_Clarify_get_id_error( tskid );
case OBJECTS_LOCAL:
if ( location != OBJECTS_LOCAL )
@@ -61,7 +61,7 @@ ER ref_tsk(
pk_rtsk->wupcnt = 0;
pk_rtsk->suscnt = the_thread->suspend_count;
pk_rtsk->tskatr = 0; /* XXX - Not correctly implemented */
pk_rtsk->task = (FP) the_thread->Start.entry_point;
pk_rtsk->task = (FP) the_thread->Start.entry_point;
core_priority = the_thread->Start.initial_priority;
pk_rtsk->itskpri = _ITRON_Task_Core_to_Priority( core_priority );
pk_rtsk->stksz = the_thread->Start.Initial_stack.size;
@@ -83,7 +83,7 @@ ER ref_tsk(
if ( the_thread == _Thread_Executing )
pk_rtsk->tskstat |= TTS_RUN;
if ( _States_Is_ready(the_thread->current_state) )
pk_rtsk->tskstat |= TTS_RDY;
pk_rtsk->tskstat |= TTS_RDY;
if ( _States_Is_dormant( the_thread->current_state) )
pk_rtsk->tskstat |= TTS_DMT;
if ( _States_Is_suspended(the_thread->current_state) )
@@ -97,7 +97,3 @@ ER ref_tsk(
_ITRON_return_errorno( E_OK );
}

View File

@@ -38,7 +38,7 @@ ER rel_wai(
switch ( location ) {
case OBJECTS_REMOTE:
case OBJECTS_ERROR:
return _ITRON_Task_Clarify_get_id_error( tskid );
return _ITRON_Task_Clarify_get_id_error( tskid );
case OBJECTS_LOCAL:
/*
@@ -48,8 +48,5 @@ ER rel_wai(
break;
}
_ITRON_return_errorno( E_OK );
_ITRON_return_errorno( E_OK );
}

View File

@@ -32,7 +32,7 @@ ER rot_rdq(
)
{
PRI priority;
if (( tskpri <= 0 ) || ( tskpri >= 256 ))
return E_PAR;
@@ -47,11 +47,9 @@ ER rot_rdq(
if ( priority == tskpri )
_Thread_Yield_processor();
else {
_Thread_Rotate_Ready_Queue( _ITRON_Task_Core_to_Priority( tskpri ) );
_Thread_Rotate_Ready_Queue( _ITRON_Task_Core_to_Priority( tskpri ) );
}
_Thread_Enable_dispatch();
return E_OK;
}

View File

@@ -39,7 +39,7 @@ ER rsm_tsk(
switch ( location ) {
case OBJECTS_REMOTE:
case OBJECTS_ERROR:
return _ITRON_Task_Clarify_get_id_error( tskid );
return _ITRON_Task_Clarify_get_id_error( tskid );
case OBJECTS_LOCAL:
@@ -56,6 +56,5 @@ ER rsm_tsk(
break;
}
_ITRON_return_errorno( E_OK );
_ITRON_return_errorno( E_OK );
}

View File

@@ -30,5 +30,5 @@ ER snd_mbf(
INT msgsz
)
{
return tsnd_mbf( mbfid, msg, msgsz, TMO_FEVR );
return tsnd_mbf( mbfid, msg, msgsz, TMO_FEVR );
}

View File

@@ -64,7 +64,7 @@ ER snd_msg(
break;
}
_ITRON_return_errorno(
_ITRON_return_errorno(
_ITRON_Mailbox_Translate_core_message_queue_return_code( msg_status )
);
}

View File

@@ -41,7 +41,7 @@ ER sta_tsk(
switch ( location ) {
case OBJECTS_REMOTE:
case OBJECTS_ERROR:
return _ITRON_Task_Clarify_get_id_error( tskid );
return _ITRON_Task_Clarify_get_id_error( tskid );
case OBJECTS_LOCAL:
@@ -56,18 +56,14 @@ ER sta_tsk(
0 /* unused */
);
/*
* This error can not happen entry_point is checked in create.
if ( !status )
/*
* This error can not happen entry_point is checked in create.
if ( !status )
_ITRON_return_errorno( E_OBJ );
*/
break;
}
_ITRON_return_errorno( E_OK );
_ITRON_return_errorno( E_OK );
}

View File

@@ -44,7 +44,7 @@ ER sus_tsk(
switch ( location ) {
case OBJECTS_REMOTE:
case OBJECTS_ERROR:
return _ITRON_Task_Clarify_get_id_error( tskid );
return _ITRON_Task_Clarify_get_id_error( tskid );
case OBJECTS_LOCAL:
@@ -58,12 +58,5 @@ ER sus_tsk(
break;
}
_ITRON_return_errorno( E_OK );
_ITRON_return_errorno( E_OK );
}

View File

@@ -73,4 +73,3 @@ ER def_exc(
{
return E_OK;
}

View File

@@ -66,7 +66,7 @@ User_extensions_routine _ITRON_Task_Delete_extension(
)
{
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_ITRON ] );
deleted->API_Extensions[ THREAD_API_ITRON ] = NULL;
}
@@ -95,7 +95,7 @@ void _ITRON_Task_Initialize_user_tasks( void )
return;
for ( index=0 ; index < maximum ; index++ ) {
return_value = cre_tsk(
user_tasks[ index ].id,
&user_tasks[ index ].attributes
@@ -136,8 +136,8 @@ ER _ITRON_Delete_task(
}
/*
* At this point in time, the ITRON API does not need any other
* extensions. See the POSIX and RTEMS API extensions for
* At this point in time, the ITRON API does not need any other
* extensions. See the POSIX and RTEMS API extensions for
* examples of how they can be used.
*/

View File

@@ -37,29 +37,22 @@ ER ter_tsk(
the_thread = _ITRON_Task_Get( tskid, &location );
switch ( location ) {
case OBJECTS_REMOTE:
case OBJECTS_REMOTE:
case OBJECTS_ERROR:
return _ITRON_Task_Clarify_get_id_error( tskid );
case OBJECTS_LOCAL:
if ( _Thread_Is_executing( the_thread ) )
_ITRON_return_errorno( E_OBJ );
if ( _States_Is_dormant( the_thread->current_state ) )
_ITRON_return_errorno( E_OBJ );
_Thread_Restart( the_thread, NULL, 0 );
_Thread_Set_state( the_thread, STATES_DORMANT );
break;
}
}
_ITRON_return_errorno( E_OK );
_ITRON_return_errorno( E_OK );
}

View File

@@ -42,16 +42,16 @@ ER trcv_mbf(
wait = FALSE;
} else {
wait = TRUE;
if (tmout != TMO_FEVR)
if (tmout != TMO_FEVR)
interval = TOD_MILLISECONDS_TO_TICKS(tmout);
}
if (wait && _ITRON_Is_in_non_task_state() )
if (wait && _ITRON_Is_in_non_task_state() )
return E_CTX;
if (!p_msgsz || !msg || tmout <= -2)
return E_PAR;
the_message_buffer = _ITRON_Message_buffer_Get(mbfid, &location);
switch (location) {
case OBJECTS_REMOTE:
@@ -68,7 +68,7 @@ ER trcv_mbf(
interval
);
_Thread_Enable_dispatch();
status = (CORE_message_queue_Status)_Thread_Executing->Wait.return_code;
status = (CORE_message_queue_Status)_Thread_Executing->Wait.return_code;
return
_ITRON_Message_buffer_Translate_core_message_buffer_return_code(status);
}

View File

@@ -65,12 +65,12 @@ ER trcv_msg(
ppk_msg,
&size,
wait,
interval
interval
);
break;
}
_ITRON_return_errorno(
_ITRON_return_errorno(
_ITRON_Mailbox_Translate_core_message_queue_return_code(
_Thread_Executing->Wait.return_code ) );
}

View File

@@ -34,5 +34,3 @@ ER tslp_tsk(
{
return E_OK;
}

View File

@@ -35,7 +35,7 @@ ER twai_sem(
Watchdog_Interval interval;
boolean wait;
CORE_semaphore_Status status;
interval = 0;
if ( tmout == TMO_POL ) {
wait = FALSE;
@@ -47,7 +47,7 @@ ER twai_sem(
if ( wait && _ITRON_Is_in_non_task_state() )
return E_CTX;
the_semaphore = _ITRON_Semaphore_Get( semid, &location );
switch ( location ) {
case OBJECTS_REMOTE: /* Multiprocessing not supported */

View File

@@ -19,7 +19,7 @@
/*
* _ITRON_Variable_memory_pool_Manager_initialization
*
*
* This routine initializes all variable memory pool manager related
* data structures.
*
@@ -31,7 +31,7 @@
void _ITRON_Variable_memory_pool_Manager_initialization(
uint32_t maximum_variable_memory_pools
)
)
{
_Objects_Initialize_information(
&_ITRON_Variable_memory_pool_Information, /* object information table */
@@ -47,15 +47,15 @@ void _ITRON_Variable_memory_pool_Manager_initialization(
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
);
/*
* Register the MP Process Packet routine.
*
* NOTE: No MP Support YET in RTEMS ITRON implementation.
*/
}
}
/*
* cre_mpl - Create Variable-Size Memorypool
@@ -143,4 +143,3 @@ ER ref_mpl(
{
return E_OK;
}

View File

@@ -20,7 +20,7 @@
#include <rtems/score/tod.h>
/*
* wai_sem - Wait on Semaphore
* wai_sem - Wait on Semaphore
*
* This function implements the ITRON 3.0 wai_sem() service.
*/

View File

@@ -34,4 +34,3 @@ ER wup_tsk(
{
return E_OK;
}