Whitespace removal.

This commit is contained in:
Ralf Corsepius
2009-11-30 15:49:52 +00:00
parent 524ff1cf45
commit 1de949a8bd
44 changed files with 92 additions and 92 deletions

View File

@@ -13,7 +13,7 @@ rtems_id __gnat_binary_semaphore_create(void)
0, 0,
&semaphore &semaphore
); );
if ( status != RTEMS_SUCCESSFUL ) if ( status != RTEMS_SUCCESSFUL )
printk( "__gnat_binary_semaphore_create failed %d\n", status ); printk( "__gnat_binary_semaphore_create failed %d\n", status );
#if defined(GNAT_DEBUG) #if defined(GNAT_DEBUG)
@@ -33,7 +33,7 @@ int __gnat_binary_semaphore_delete(
#endif #endif
status = rtems_semaphore_delete( semaphore ); status = rtems_semaphore_delete( semaphore );
if ( status != RTEMS_SUCCESSFUL ) if ( status != RTEMS_SUCCESSFUL )
printk( "__gnat_binary_semaphore_delete failed %d\n", status ); printk( "__gnat_binary_semaphore_delete failed %d\n", status );
return 0; return 0;
@@ -50,7 +50,7 @@ int __gnat_binary_semaphore_obtain(
#endif #endif
status = rtems_semaphore_obtain( semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); status = rtems_semaphore_obtain( semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
if ( status != RTEMS_SUCCESSFUL ) if ( status != RTEMS_SUCCESSFUL )
printk( "__gnat_binary_semaphore_obtain failed %d\n", status ); printk( "__gnat_binary_semaphore_obtain failed %d\n", status );
return 0; return 0;
@@ -67,7 +67,7 @@ int __gnat_binary_semaphore_release(
#endif #endif
status = rtems_semaphore_release( semaphore ); status = rtems_semaphore_release( semaphore );
if ( status != RTEMS_SUCCESSFUL ) if ( status != RTEMS_SUCCESSFUL )
printk( "__gnat_binary_semaphore_release failed %d\n", status ); printk( "__gnat_binary_semaphore_release failed %d\n", status );
return 0; return 0;
@@ -82,7 +82,7 @@ int __gnat_binary_semaphore_flush(
printk( "__gnat_binary_semaphore_flush\n" ); printk( "__gnat_binary_semaphore_flush\n" );
status = rtems_semaphore_flush( semaphore ); status = rtems_semaphore_flush( semaphore );
if ( status != RTEMS_SUCCESSFUL ) if ( status != RTEMS_SUCCESSFUL )
printk( "__gnat_binary_semaphore_flush failed %d\n", status ); printk( "__gnat_binary_semaphore_flush failed %d\n", status );
return 0; return 0;

View File

@@ -200,7 +200,7 @@ static int rtems_tftp_mount_me(
* These need to be looked at for full POSIX semantics. * These need to be looked at for full POSIX semantics.
*/ */
temp_mt_entry->pathconf_limits_and_options = rtems_tftp_limits_and_options; temp_mt_entry->pathconf_limits_and_options = rtems_tftp_limits_and_options;
/* /*
@@ -208,7 +208,7 @@ static int rtems_tftp_mount_me(
* *
* NOTE: This could be in an fsinfo for this filesystem type. * NOTE: This could be in an fsinfo for this filesystem type.
*/ */
sc = rtems_semaphore_create ( sc = rtems_semaphore_create (
rtems_build_name('T', 'F', 'T', 'P'), rtems_build_name('T', 'F', 'T', 'P'),
1, 1,
@@ -222,7 +222,7 @@ static int rtems_tftp_mount_me(
); );
if (sc != RTEMS_SUCCESSFUL) if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one( ENOMEM ); rtems_set_errno_and_return_minus_one( ENOMEM );
return 0; return 0;
} }
@@ -231,16 +231,16 @@ static int rtems_tftp_mount_me(
* Initialize the TFTP driver * Initialize the TFTP driver
*/ */
int rtems_bsdnet_initialize_tftp_filesystem (void) int rtems_bsdnet_initialize_tftp_filesystem (void)
{ {
int status; int status;
rtems_filesystem_mount_table_entry_t *entry; rtems_filesystem_mount_table_entry_t *entry;
status = mkdir( TFTP_PATHNAME_PREFIX, S_IRWXU | S_IRWXG | S_IRWXO ); status = mkdir( TFTP_PATHNAME_PREFIX, S_IRWXU | S_IRWXG | S_IRWXO );
if ( status == -1 ) if ( status == -1 )
return status; return status;
status = mount( status = mount(
&entry, &entry,
&rtems_tftp_ops, &rtems_tftp_ops,
RTEMS_FILESYSTEM_READ_WRITE, RTEMS_FILESYSTEM_READ_WRITE,
@@ -298,7 +298,7 @@ sendStifle (struct tftpStream *tp, struct sockaddr_in *to)
msg.opcode = htons (TFTP_OPCODE_ERROR); msg.opcode = htons (TFTP_OPCODE_ERROR);
msg.errorCode = htons (5); msg.errorCode = htons (5);
len = sizeof msg.opcode + sizeof msg.errorCode + 1; len = sizeof msg.opcode + sizeof msg.errorCode + 1;
len += sprintf (msg.errorMessage, "GO AWAY"); len += sprintf (msg.errorMessage, "GO AWAY");
/* /*
* Send it * Send it
@@ -340,7 +340,7 @@ getPacket (struct tftpStream *tp, int retryCount)
tp->firstReply = 0; tp->firstReply = 0;
tp->farAddress.sin_port = from.i.sin_port; tp->farAddress.sin_port = from.i.sin_port;
} }
if (tp->farAddress.sin_port == from.i.sin_port) if (tp->farAddress.sin_port == from.i.sin_port)
break; break;
} }
@@ -423,9 +423,9 @@ static int rtems_tftp_evaluate_for_make(
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name __attribute__((unused)) /* OUT */ const char **name __attribute__((unused)) /* OUT */
) )
{ {
pathloc->node_access = NULL; pathloc->node_access = NULL;
rtems_set_errno_and_return_minus_one( EIO ); rtems_set_errno_and_return_minus_one( EIO );
} }
/* /*
@@ -482,7 +482,7 @@ fixPath (char *path)
return; return;
} }
static int rtems_tftp_eval_path( static int rtems_tftp_eval_path(
const char *pathname, /* IN */ const char *pathname, /* IN */
int pathnamelen, /* IN */ int pathnamelen, /* IN */
int flags, /* IN */ int flags, /* IN */
@@ -498,7 +498,7 @@ static int rtems_tftp_eval_path(
if (pathname[strlen(pathname)-1] == '/') { if (pathname[strlen(pathname)-1] == '/') {
int isRelative = (pathloc->node_access != ROOT_NODE_ACCESS); int isRelative = (pathloc->node_access != ROOT_NODE_ACCESS);
char *cp; char *cp;
/* /*
* Reject attempts to open() directories * Reject attempts to open() directories
*/ */
@@ -581,18 +581,18 @@ static int rtems_tftp_open_worker(
/* /*
* Extract file pathname component * Extract file pathname component
*/ */
while (*cp2 == '/') while (*cp2 == '/')
cp2++; cp2++;
if (strcmp (cp2, "BOOTP_FILE") == 0) { if (strcmp (cp2, "BOOTP_FILE") == 0) {
cp2 = rtems_bsdnet_bootp_boot_file_name; cp2 = rtems_bsdnet_bootp_boot_file_name;
while (*cp2 == '/') while (*cp2 == '/')
cp2++; cp2++;
} }
if (*cp2 == '\0') if (*cp2 == '\0')
return ENOENT; return ENOENT;
remoteFilename = cp2; remoteFilename = cp2;
if (strlen (remoteFilename) > (TFTP_BUFSIZE - 10)) if (strlen (remoteFilename) > (TFTP_BUFSIZE - 10))
return ENOENT; return ENOENT;
/* /*
* Find a free stream * Find a free stream
@@ -690,7 +690,7 @@ static int rtems_tftp_open_worker(
/* /*
* Send the request * Send the request
*/ */
if (sendto (tp->socket, (char *)&tp->pkbuf, len, 0, if (sendto (tp->socket, (char *)&tp->pkbuf, len, 0,
(struct sockaddr *)&tp->farAddress, (struct sockaddr *)&tp->farAddress,
sizeof tp->farAddress) < 0) { sizeof tp->farAddress) < 0) {
close (tp->socket); close (tp->socket);
@@ -876,7 +876,7 @@ static int rtems_tftp_flush ( struct tftpStream *tp )
if (rtems_tftp_driver_debug) if (rtems_tftp_driver_debug)
printf ("TFTP: SEND %d (%d)\n", tp->blocknum, tp->nused); printf ("TFTP: SEND %d (%d)\n", tp->blocknum, tp->nused);
#endif #endif
if (sendto (tp->socket, (char *)&tp->pkbuf, wlen, 0, if (sendto (tp->socket, (char *)&tp->pkbuf, wlen, 0,
(struct sockaddr *)&tp->farAddress, (struct sockaddr *)&tp->farAddress,
sizeof tp->farAddress) < 0) sizeof tp->farAddress) < 0)
return EIO; return EIO;
@@ -1029,19 +1029,19 @@ rtems_filesystem_operations_table rtems_tftp_ops = {
NULL, /* symlink */ NULL, /* symlink */
NULL, /* readlin */ NULL, /* readlin */
}; };
rtems_filesystem_file_handlers_r rtems_tftp_handlers = { rtems_filesystem_file_handlers_r rtems_tftp_handlers = {
rtems_tftp_open, /* open */ rtems_tftp_open, /* open */
rtems_tftp_close, /* close */ rtems_tftp_close, /* close */
rtems_tftp_read, /* read */ rtems_tftp_read, /* read */
rtems_tftp_write, /* write */ rtems_tftp_write, /* write */
NULL, /* ioctl */ NULL, /* ioctl */
NULL, /* lseek */ NULL, /* lseek */
NULL, /* fstat */ NULL, /* fstat */
NULL, /* fchmod */ NULL, /* fchmod */
rtems_tftp_ftruncate, /* ftruncate */ rtems_tftp_ftruncate, /* ftruncate */
NULL, /* fpathconf */ NULL, /* fpathconf */
NULL, /* fsync */ NULL, /* fsync */
NULL, /* fdatasync */ NULL, /* fdatasync */
NULL, /* fcntl */ NULL, /* fcntl */
NULL /* rmnod */ NULL /* rmnod */

View File

@@ -70,7 +70,7 @@ void _POSIX_Barrier_Manager_initialization(void);
* *
* @param[in] the_barrier_status is the SuperCore status. * @param[in] the_barrier_status is the SuperCore status.
* *
* @return the corresponding POSIX status * @return the corresponding POSIX status
*/ */
int _POSIX_Barrier_Translate_core_barrier_return_code( int _POSIX_Barrier_Translate_core_barrier_return_code(
CORE_barrier_Status the_barrier_status CORE_barrier_Status the_barrier_status

View File

@@ -49,7 +49,7 @@ void _POSIX_Threads_cancel_run(
/** /**
* @brief _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch * @brief _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch
* *
* This routine separates a piece of code that existed as part of * This routine separates a piece of code that existed as part of
* another routine, but had to be separated to improve coverage. * another routine, but had to be separated to improve coverage.
* *
* @param[in] the_thread is the thread to evaluate canceling * @param[in] the_thread is the thread to evaluate canceling

View File

@@ -4,7 +4,7 @@
* This include file contains all the private support information for * This include file contains all the private support information for
* POSIX Message Queues. * POSIX Message Queues.
*/ */
/* /*
* COPYRIGHT (c) 1989-2008. * COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR). * On-Line Applications Research Corporation (OAR).

View File

@@ -67,7 +67,7 @@ bool _POSIX_Priority_Is_valid(
* @param[in] priority is the POSIX API priority. * @param[in] priority is the POSIX API priority.
* *
* @return This method returns the corresponding SuperCore priority. * @return This method returns the corresponding SuperCore priority.
*/ */
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority int priority
); );
@@ -81,7 +81,7 @@ RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
* @param[in] priority is the POSIX API priority. * @param[in] priority is the POSIX API priority.
* *
* @return This method returns the corresponding POSIX priority. * @return This method returns the corresponding POSIX priority.
*/ */
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core( RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority Priority_Control priority
); );

View File

@@ -46,7 +46,7 @@ extern const pthread_attr_t _POSIX_Threads_Default_attributes;
/** /**
* When the user configures a set of POSIX API initialization threads, * When the user configures a set of POSIX API initialization threads,
* This variable will point to the method used to initialize them. * This variable will point to the method used to initialize them.
* *
* @note It is instantiated and initialized by confdefs.h based upon * @note It is instantiated and initialized by confdefs.h based upon
* application requirements. * application requirements.
*/ */
@@ -95,7 +95,7 @@ RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free(
* @param[in] id is the id to lookup * @param[in] id is the id to lookup
* @param[in] location points to the returned location value * @param[in] location points to the returned location value
* *
* @return This methods returns a pointer to the corresponding Thread_Control. * @return This methods returns a pointer to the corresponding Thread_Control.
*/ */
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get( RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get(
pthread_t id, pthread_t id,

View File

@@ -70,7 +70,7 @@ void _POSIX_RWLock_Manager_initialization(void);
* *
* @param[in] the_RWLock_status is the SuperCore status. * @param[in] the_RWLock_status is the SuperCore status.
* *
* @return the corresponding POSIX status * @return the corresponding POSIX status
*/ */
int _POSIX_RWLock_Translate_core_RWLock_return_code( int _POSIX_RWLock_Translate_core_RWLock_return_code(
CORE_RWLock_Status the_RWLock_status CORE_RWLock_Status the_RWLock_status

View File

@@ -70,7 +70,7 @@ void _POSIX_Spinlock_Manager_initialization(void);
* *
* @param[in] the_spinlock_status is the SuperCore status. * @param[in] the_spinlock_status is the SuperCore status.
* *
* @return the corresponding POSIX status * @return the corresponding POSIX status
*/ */
int _POSIX_Spinlock_Translate_core_spinlock_return_code( int _POSIX_Spinlock_Translate_core_spinlock_return_code(
CORE_spinlock_Status the_spinlock_status CORE_spinlock_Status the_spinlock_status

View File

@@ -48,7 +48,7 @@ typedef enum {
* *
* @return This method returns the number of ticks in @a ticks_out * @return This method returns the number of ticks in @a ticks_out
* and a status value indicating whether the absolute time * and a status value indicating whether the absolute time
* is valid, in the past, equal to the current time or in * is valid, in the past, equal to the current time or in
* the future as it should be. * the future as it should be.
*/ */
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(

View File

@@ -25,7 +25,7 @@ extern "C" {
/* Timer is free */ /* Timer is free */
#define POSIX_TIMER_STATE_FREE 0x01 #define POSIX_TIMER_STATE_FREE 0x01
/* Created timer but not running */ /* Created timer but not running */
#define POSIX_TIMER_STATE_CREATE_NEW 0x02 #define POSIX_TIMER_STATE_CREATE_NEW 0x02

View File

@@ -34,5 +34,5 @@ void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else } else
_Thread_Enable_dispatch(); _Thread_Enable_dispatch();
} }

View File

@@ -41,7 +41,7 @@ void pthread_cleanup_push(
/* /*
* The POSIX standard does not address what to do when the routine * The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot * is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens. * allocate memory or anything else bad happens.
*/ */
if ( !routine ) if ( !routine )

View File

@@ -53,7 +53,7 @@ int clock_getres(
if ( res ) { if ( res ) {
res->tv_sec = rtems_configuration_get_microseconds_per_tick() / res->tv_sec = rtems_configuration_get_microseconds_per_tick() /
TOD_MICROSECONDS_PER_SECOND; TOD_MICROSECONDS_PER_SECOND;
res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick(); res->tv_nsec = rtems_configuration_get_nanoseconds_per_tick();
} }
break; break;

View File

@@ -58,7 +58,7 @@ int clock_gettime(
if ( clock_id == CLOCK_THREAD_CPUTIME ) if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS ); rtems_set_errno_and_return_minus_one( ENOSYS );
#endif #endif
rtems_set_errno_and_return_minus_one( EINVAL ); rtems_set_errno_and_return_minus_one( EINVAL );
return 0; return 0;

View File

@@ -57,4 +57,4 @@ POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
location location
); );
} }

View File

@@ -72,7 +72,7 @@ int pthread_key_create(
true, true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
); );
#endif #endif
bytes_to_allocate = sizeof( void * ) * bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate ); table = _Workspace_Allocate( bytes_to_allocate );

View File

@@ -145,7 +145,7 @@ int killinfo(
api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api = the_thread->API_Extensions[ THREAD_API_POSIX ];
#if defined(DEBUG_SIGNAL_PROCESSING) #if defined(DEBUG_SIGNAL_PROCESSING)
printk( "Waiting Thread=%p option=0x%08x mask=0x%08x blocked=0x%08x\n", printk( "Waiting Thread=%p option=0x%08x mask=0x%08x blocked=0x%08x\n",
the_thread, the_thread->Wait.option, mask, api->signals_blocked); the_thread, the_thread->Wait.option, mask, api->signals_blocked);
#endif #endif
@@ -212,8 +212,8 @@ int killinfo(
#if defined(DEBUG_SIGNAL_PROCESSING) #if defined(DEBUG_SIGNAL_PROCESSING)
printk("\n 0x%08x/0x%08x %d/%d 0x%08x 1", printk("\n 0x%08x/0x%08x %d/%d 0x%08x 1",
the_thread->Object.id, the_thread->Object.id,
((interested) ? interested->Object.id : 0), ((interested) ? interested->Object.id : 0),
the_thread->current_priority, interested_priority, the_thread->current_priority, interested_priority,
the_thread->current_state the_thread->current_state
); );
@@ -273,7 +273,7 @@ int killinfo(
interested_priority = the_thread->current_priority; interested_priority = the_thread->current_priority;
continue; continue;
} }
DEBUG_STEP("6"); DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */ /* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {

View File

@@ -23,7 +23,7 @@
* gcc 2.8.1 plus gnat 3.13p and gcc 3.0.1 require it to be there and * gcc 2.8.1 plus gnat 3.13p and gcc 3.0.1 require it to be there and
* return 0. * return 0.
* *
* As of gcc 4.2.2, the gcc SPARC backend doesn't appear to have a * As of gcc 4.2.2, the gcc SPARC backend doesn't appear to have a
* way to call this for RTEMS anymore but it doesn't hurt to leave it. * way to call this for RTEMS anymore but it doesn't hurt to leave it.
*/ */

View File

@@ -69,7 +69,7 @@ ssize_t mq_timedreceive(
* then we do a polling operation and convert the UNSATISFIED * then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error. * status into the appropriate error.
* *
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait. * then we should not wait.
*/ */

View File

@@ -69,7 +69,7 @@ int mq_timedsend(
* then we do a polling operation and convert the UNSATISFIED * then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error. * status into the appropriate error.
* *
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait. * then we should not wait.
*/ */

View File

@@ -58,7 +58,7 @@
} \ } \
} \ } \
} while (0) } while (0)
POSIX_Mutex_Control *_POSIX_Mutex_Get ( POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex, pthread_mutex_t *mutex,
Objects_Locations *location Objects_Locations *location

View File

@@ -56,7 +56,7 @@ int pthread_mutex_timedlock(
* then we do a polling operation and convert the UNSATISFIED * then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error. * status into the appropriate error.
* *
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait. * then we should not wait.
*/ */
@@ -64,7 +64,7 @@ int pthread_mutex_timedlock(
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false; do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
/* /*
* This service only gives us the option to block. We used a polling * This service only gives us the option to block. We used a polling
* attempt to lock if the abstime was not in the future. If we did * attempt to lock if the abstime was not in the future. If we did

View File

@@ -42,7 +42,7 @@ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
struct timespec current_time; struct timespec current_time;
struct timespec difference; struct timespec difference;
/* /*
* Make sure there is always a value returned. * Make sure there is always a value returned.
*/ */

View File

@@ -40,7 +40,7 @@ int pthread_rwlock_rdlock(
{ {
POSIX_RWLock_Control *the_rwlock; POSIX_RWLock_Control *the_rwlock;
Objects_Locations location; Objects_Locations location;
if ( !rwlock ) if ( !rwlock )
return EINVAL; return EINVAL;

View File

@@ -45,7 +45,7 @@ int pthread_rwlock_timedrdlock(
Watchdog_Interval ticks; Watchdog_Interval ticks;
bool do_wait = true; bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status; POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock ) if ( !rwlock )
return EINVAL; return EINVAL;
@@ -58,7 +58,7 @@ int pthread_rwlock_timedrdlock(
* then we do a polling operation and convert the UNSATISFIED * then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error. * status into the appropriate error.
* *
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait. * then we should not wait.
*/ */

View File

@@ -45,7 +45,7 @@ int pthread_rwlock_timedwrlock(
Watchdog_Interval ticks; Watchdog_Interval ticks;
bool do_wait = true; bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status; POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock ) if ( !rwlock )
return EINVAL; return EINVAL;
@@ -58,7 +58,7 @@ int pthread_rwlock_timedwrlock(
* then we do a polling operation and convert the UNSATISFIED * then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error. * status into the appropriate error.
* *
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait. * then we should not wait.
*/ */

View File

@@ -40,7 +40,7 @@ int pthread_rwlock_tryrdlock(
{ {
POSIX_RWLock_Control *the_rwlock; POSIX_RWLock_Control *the_rwlock;
Objects_Locations location; Objects_Locations location;
if ( !rwlock ) if ( !rwlock )
return EINVAL; return EINVAL;

View File

@@ -40,7 +40,7 @@ int pthread_rwlock_trywrlock(
{ {
POSIX_RWLock_Control *the_rwlock; POSIX_RWLock_Control *the_rwlock;
Objects_Locations location; Objects_Locations location;
if ( !rwlock ) if ( !rwlock )
return EINVAL; return EINVAL;

View File

@@ -41,7 +41,7 @@ int pthread_rwlock_unlock(
POSIX_RWLock_Control *the_rwlock; POSIX_RWLock_Control *the_rwlock;
Objects_Locations location; Objects_Locations location;
CORE_RWLock_Status status; CORE_RWLock_Status status;
if ( !rwlock ) if ( !rwlock )
return EINVAL; return EINVAL;

View File

@@ -40,7 +40,7 @@ int pthread_rwlock_wrlock(
{ {
POSIX_RWLock_Control *the_rwlock; POSIX_RWLock_Control *the_rwlock;
Objects_Locations location; Objects_Locations location;
if ( !rwlock ) if ( !rwlock )
return EINVAL; return EINVAL;

View File

@@ -61,7 +61,7 @@ bool _POSIX_signals_Clear_signals(
else else
signals_blocked = SIGNAL_ALL_MASK; signals_blocked = SIGNAL_ALL_MASK;
/* XXX is this right for siginfo type signals? */ /* XXX is this right for siginfo type signals? */
/* XXX are we sure they can be cleared the same way? */ /* XXX are we sure they can be cleared the same way? */
_ISR_Disable( level ); _ISR_Disable( level );

View File

@@ -91,13 +91,13 @@ bool _POSIX_signals_Unblock_thread(
* + If it is blocked on an interruptible signal, THEN * + If it is blocked on an interruptible signal, THEN
* we unblock the thread. * we unblock the thread.
* + If it is in the ready state AND * + If it is in the ready state AND
* we are sending from an ISR AND * we are sending from an ISR AND
* it is the interrupted thread AND * it is the interrupted thread AND
* it is not blocked, THEN * it is not blocked, THEN
* we need to dispatch at the end of this ISR. * we need to dispatch at the end of this ISR.
* + Any other combination, do nothing. * + Any other combination, do nothing.
*/ */
the_thread->do_post_task_switch_extension = true; the_thread->do_post_task_switch_extension = true;
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {

View File

@@ -43,7 +43,7 @@ int pthread_spin_init(
{ {
POSIX_Spinlock_Control *the_spinlock; POSIX_Spinlock_Control *the_spinlock;
CORE_spinlock_Attributes attributes; CORE_spinlock_Attributes attributes;
if ( !spinlock ) if ( !spinlock )
return EINVAL; return EINVAL;

View File

@@ -63,7 +63,7 @@ int _POSIX_Thread_Translate_sched_param(
if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) )
return EINVAL; return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout; *budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0; return 0;

View File

@@ -212,7 +212,7 @@ int pthread_create(
#if defined(RTEMS_DEBUG) #if defined(RTEMS_DEBUG)
/* /*
* _Thread_Start only fails if the thread was in the incorrect state * _Thread_Start only fails if the thread was in the incorrect state
* *
* NOTE: This can only happen if someone slips in and touches the * NOTE: This can only happen if someone slips in and touches the
* thread while we are creating it. * thread while we are creating it.
*/ */

View File

@@ -35,17 +35,17 @@ void _POSIX_Thread_Exit(
the_information = _Objects_Get_information_id( the_thread->Object.id ); the_information = _Objects_Get_information_id( the_thread->Object.id );
/* /*
* The_information has to be non-NULL. Otherwise, we couldn't be * The_information has to be non-NULL. Otherwise, we couldn't be
* running in a thread of this API and class. * running in a thread of this API and class.
* *
* NOTE: Lock and unlock in different order so we do not throw a * NOTE: Lock and unlock in different order so we do not throw a
* fatal error when locking the allocator mutex. And after * fatal error when locking the allocator mutex. And after
* we unlock, we want to defer the context switch until we * we unlock, we want to defer the context switch until we
* are ready to be switched out. Otherwise, an ISR could * are ready to be switched out. Otherwise, an ISR could
* occur and preempt us out while we still hold the * occur and preempt us out while we still hold the
* allocator mutex. * allocator mutex.
*/ */
_RTEMS_Lock_allocator(); _RTEMS_Lock_allocator();
_Thread_Disable_dispatch(); _Thread_Disable_dispatch();

View File

@@ -53,7 +53,7 @@ int sem_timedwait(
* then we do a polling operation and convert the UNSATISFIED * then we do a polling operation and convert the UNSATISFIED
* status into the appropriate error. * status into the appropriate error.
* *
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait. * then we should not wait.
*/ */

View File

@@ -57,7 +57,7 @@ int pthread_setcanceltype(
thread_support->cancelability_type = type; thread_support->cancelability_type = type;
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
/* /*
* _Thread_Enable_dispatch is invoked by above call. * _Thread_Enable_dispatch is invoked by above call.
*/ */

View File

@@ -79,7 +79,7 @@ int sigtimedwait(
*/ */
if ( !set ) if ( !set )
rtems_set_errno_and_return_minus_one( EINVAL ); rtems_set_errno_and_return_minus_one( EINVAL );
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification. * in the Open Group specification.
*/ */

View File

@@ -42,7 +42,7 @@ long sysconf(
if ( name == _SC_GETPW_R_SIZE_MAX ) if ( name == _SC_GETPW_R_SIZE_MAX )
return 1024; return 1024;
if ( name == _SC_PAGESIZE ) if ( name == _SC_PAGESIZE )
return PAGE_SIZE; return PAGE_SIZE;

View File

@@ -36,10 +36,10 @@ int timer_create(
if ( clock_id != CLOCK_REALTIME ) if ( clock_id != CLOCK_REALTIME )
rtems_set_errno_and_return_minus_one( EINVAL ); rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid ) if ( !timerid )
rtems_set_errno_and_return_minus_one( EINVAL ); rtems_set_errno_and_return_minus_one( EINVAL );
/* /*
* The data of the structure evp are checked in order to verify if they * The data of the structure evp are checked in order to verify if they
* are coherent. * are coherent.

View File

@@ -50,7 +50,7 @@ int timer_settime(
/* The number of nanoseconds is not correct */ /* The number of nanoseconds is not correct */
rtems_set_errno_and_return_minus_one( EINVAL ); rtems_set_errno_and_return_minus_one( EINVAL );
} }
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL ); rtems_set_errno_and_return_minus_one( EINVAL );
} }
@@ -62,8 +62,8 @@ int timer_settime(
struct timespec now; struct timespec now;
_TOD_Get( &now ); _TOD_Get( &now );
/* Check for seconds in the past */ /* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
rtems_set_errno_and_return_minus_one( EINVAL ); rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
} }
@@ -95,8 +95,8 @@ int timer_settime(
/* Convert from seconds and nanoseconds to ticks */ /* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
initial_period = _Timespec_To_ticks( &normalize.it_value ); initial_period = _Timespec_To_ticks( &normalize.it_value );
activated = _POSIX_Timer_Insert_helper( activated = _POSIX_Timer_Insert_helper(
&ptimer->Timer, &ptimer->Timer,
initial_period, initial_period,

View File

@@ -40,10 +40,10 @@ void _POSIX_signals_Ualarm_TSR(
* It's OK, there isn't a way this should fail. * It's OK, there isn't a way this should fail.
*/ */
(void) kill( getpid(), SIGALRM ); (void) kill( getpid(), SIGALRM );
/* /*
* If the reset interval is non-zero, reschedule ourselves. * If the reset interval is non-zero, reschedule ourselves.
*/ */
_Watchdog_Reset( &_POSIX_signals_Ualarm_timer ); _Watchdog_Reset( &_POSIX_signals_Ualarm_timer );
} }
@@ -98,7 +98,7 @@ useconds_t ualarm(
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp ); ticks = _Timespec_To_ticks( &tp );
if ( ticks == 0 ) if ( ticks == 0 )
ticks = 1; ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
} }