diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-08-25 17:15:44 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-08-25 17:15:44 +0000 |
commit | b602c298a90eaee590ab46d0b6fc4b298f6ce967 (patch) | |
tree | 2ad5d5edfc0d991c4ee94ec9262229ed12865d1b /cpukit/posix/src/ptimer1.c | |
parent | 2000-08-25 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-b602c298a90eaee590ab46d0b6fc4b298f6ce967.tar.bz2 |
2000-08-25 Joel Sherrill <joel.sherrill@OARcorp.com>
* inline/rtems/posix/timer.inl, include/rtems/posix/timer.h,
inline/rtems/posix/Makefile.am, src/ptimer1.c: Redid the
style of src/ptimer1.c. Continued effort to make the
POSIX Timer implementation match that of other managers.
Added data structures required to use SuperCore Object Handler.
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/src/ptimer1.c | 48 |
1 files changed, 5 insertions, 43 deletions
diff --git a/cpukit/posix/src/ptimer1.c b/cpukit/posix/src/ptimer1.c index 13eaa2b213..4e5f67b585 100644 --- a/cpukit/posix/src/ptimer1.c +++ b/cpukit/posix/src/ptimer1.c @@ -47,30 +47,11 @@ * Data for the signals */ -struct sigaction signal_inf[SIGRTMAX]; - /*********************************** * Definition of Internal Functions ***********************************/ /* *************************************************************************** - * PRINT_MSG_S - * - * Description: This function write a message in the display. - * It is used for debugging and all the calls must be deleted - * when the tests finish - * ***************************************************************************/ - -static void PRINT_MSG_S ( char *msg ) -{ - -#ifdef DEBUG_MESSAGES - printf("%s\n", msg); -#endif - -} - -/* *************************************************************************** * TIMER_INITIALIZE_S * * Description: Initialize the data of a timer @@ -215,8 +196,6 @@ rtems_timer_service_routine FIRE_TIMER_S (rtems_id timer, void *data) * expired timer will be stored in "timer_pos". In theory a timer can not * expire if it has not been created or has been deleted */ - PRINT_MSG_S ("FIRE_TIMER_S"); - timer_pos = TIMER_POSITION_F(timer); /* Increases the number of expiration of the timer in one unit. */ @@ -257,10 +236,8 @@ rtems_timer_service_routine FIRE_TIMER_S (rtems_id timer, void *data) if( pthread_kill ( timer_struct[timer_pos].thread_id , timer_struct[timer_pos].inf.sigev_signo ) ) { - PRINT_MSG_S ("ERROR_PTHREAD_KILL"); - } else { - PRINT_MSG_S ("SUCCESS_PTHREAD_KILL"); - } + /* XXX error handling */ + } /* * After the signal handler returns, the count of expirations of the @@ -313,8 +290,6 @@ int timer_create( switch (return_v) { case RTEMS_SUCCESSFUL : - PRINT_MSG_S("SUCCESS: rtems create timer RTEMS_SUCCESSFUL"); - /* * The timer has been created properly */ @@ -359,13 +334,11 @@ int timer_create( case RTEMS_INVALID_NAME : /* The assigned name is not valid */ - PRINT_MSG_S ("ERROR: rtems create timer RTEMS_INVALID_NAME"); set_errno_and_return_minus_one( EINVAL ); case RTEMS_TOO_MANY : /* There has been created too much timers for the same process */ - PRINT_MSG_S ("ERROR: rtems create timer RTEMS_TOO_MANY "); set_errno_and_return_minus_one( EAGAIN ); default : @@ -534,8 +507,6 @@ int timer_settime( switch ( return_v ) { case RTEMS_SUCCESSFUL: - PRINT_MSG_S ("SUCCESS: timer_settime RTEMS_SUCCESSFUL"); - /* The timer has been started and is running */ /* Actualizes the data of the structure and @@ -559,17 +530,17 @@ int timer_settime( case RTEMS_INVALID_ID: - PRINT_MSG_S ("ERROR: timer_settime RTEMS_INVALID_ID"); + /* XXX error handling */ break; case RTEMS_NOT_DEFINED: - PRINT_MSG_S ("ERROR: timer_settime RTEMS_NOT_DEFINED"); + /* XXX error handling */ break; case RTEMS_INVALID_CLOCK: - PRINT_MSG_S ("ERROR: timer_settime RTEMS_INVALID_CLOCK"); + /* XXX error handling */ break; default: @@ -608,8 +579,6 @@ int timer_settime( switch (return_v) { case RTEMS_SUCCESSFUL: - PRINT_MSG_S ( "SUCCESS: timer_settime RTEMS_SUCCESSFUL"); - /* The timer has been started and is running */ /* Actualizes the data of the structure and @@ -634,8 +603,6 @@ int timer_settime( case RTEMS_INVALID_ID: - PRINT_MSG_S ( "ERROR: timer_settime RTEMS_INVALID_ID"); - /* The timer identifier is not correct. In theory, this * situation can not occur, but the solution is easy */ @@ -645,8 +612,6 @@ int timer_settime( case RTEMS_INVALID_NUMBER: - PRINT_MSG_S ( "ERROR: timer_settime RTEMS_INVALID_NUMBER"); - /* In this case, RTEMS fails because the values of timing * are incorrect */ @@ -668,13 +633,10 @@ int timer_settime( /* It does nothing, although it will be probably necessary to * return an error */ - } /* To avoid problems */ - return 0; - } |