mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-28 23:40:15 +00:00
2004-03-23 Ralf Corsepius <ralf_corsepius@rtems.org>
* posix/include/rtems/posix/cond.h, posix/include/rtems/posix/intr.h, posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h, posix/include/rtems/posix/mutex.h, posix/include/rtems/posix/pthread.h, posix/include/rtems/posix/semaphore.h, posix/include/rtems/posix/threadsup.h, posix/include/rtems/posix/timer.h, posix/src/cond.c, posix/src/intr.c, posix/src/key.c, posix/src/keycreate.c, posix/src/keydelete.c, posix/src/keygetspecific.c, posix/src/keyrundestructors.c, posix/src/keysetspecific.c, posix/src/killinfo.c, posix/src/mqueue.c, posix/src/mqueuerecvsupp.c, posix/src/mqueuesendsupp.c, posix/src/mqueuetranslatereturncode.c, posix/src/mutex.c, posix/src/posixintervaltotimespec.c, posix/src/posixtimespecsubtract.c, posix/src/psignal.c, posix/src/pthread.c, posix/src/ptimer1.c, posix/src/semaphore.c, posix/src/sysconf.c: Convert to using c99 fixed size types.
This commit is contained in:
@@ -1,3 +1,24 @@
|
||||
2004-03-23 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* posix/include/rtems/posix/cond.h,
|
||||
posix/include/rtems/posix/intr.h, posix/include/rtems/posix/key.h,
|
||||
posix/include/rtems/posix/mqueue.h,
|
||||
posix/include/rtems/posix/mutex.h,
|
||||
posix/include/rtems/posix/pthread.h,
|
||||
posix/include/rtems/posix/semaphore.h,
|
||||
posix/include/rtems/posix/threadsup.h,
|
||||
posix/include/rtems/posix/timer.h, posix/src/cond.c,
|
||||
posix/src/intr.c, posix/src/key.c, posix/src/keycreate.c,
|
||||
posix/src/keydelete.c, posix/src/keygetspecific.c,
|
||||
posix/src/keyrundestructors.c, posix/src/keysetspecific.c,
|
||||
posix/src/killinfo.c, posix/src/mqueue.c,
|
||||
posix/src/mqueuerecvsupp.c, posix/src/mqueuesendsupp.c,
|
||||
posix/src/mqueuetranslatereturncode.c, posix/src/mutex.c,
|
||||
posix/src/posixintervaltotimespec.c,
|
||||
posix/src/posixtimespecsubtract.c, posix/src/psignal.c,
|
||||
posix/src/pthread.c, posix/src/ptimer1.c, posix/src/semaphore.c,
|
||||
posix/src/sysconf.c: Convert to using c99 fixed size types.
|
||||
|
||||
2004-03-23 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* score/include/rtems/system.h: include <stdint.h>.
|
||||
|
||||
@@ -63,7 +63,7 @@ extern const pthread_condattr_t _POSIX_Condition_variables_Default_attributes;
|
||||
*/
|
||||
|
||||
void _POSIX_Condition_variables_Manager_initialization(
|
||||
unsigned32 maximum_condition_variables
|
||||
uint32_t maximum_condition_variables
|
||||
);
|
||||
|
||||
/*
|
||||
|
||||
@@ -71,7 +71,7 @@ POSIX_EXTERN POSIX_Interrupt_Control
|
||||
*/
|
||||
|
||||
void _POSIX_Interrupt_Manager_initialization(
|
||||
unsigned32 maximum_interrupt_handlers
|
||||
uint32_t maximum_interrupt_handlers
|
||||
);
|
||||
|
||||
/*
|
||||
|
||||
@@ -50,7 +50,7 @@ POSIX_EXTERN Objects_Information _POSIX_Keys_Information;
|
||||
*/
|
||||
|
||||
void _POSIX_Key_Manager_initialization(
|
||||
unsigned32 maximum_keys
|
||||
uint32_t maximum_keys
|
||||
);
|
||||
|
||||
/*
|
||||
|
||||
@@ -34,7 +34,7 @@ typedef struct {
|
||||
int process_shared;
|
||||
boolean named;
|
||||
boolean linked;
|
||||
unsigned32 open_count;
|
||||
uint32_t open_count;
|
||||
CORE_message_queue_Control Message_queue;
|
||||
struct sigevent notification;
|
||||
} POSIX_Message_queue_Control;
|
||||
@@ -63,7 +63,7 @@ POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information_fds;
|
||||
*/
|
||||
|
||||
void _POSIX_Message_queue_Manager_initialization(
|
||||
unsigned32 maximum_message_queues
|
||||
uint32_t maximum_message_queues
|
||||
);
|
||||
|
||||
/*
|
||||
@@ -123,8 +123,8 @@ ssize_t _POSIX_Message_queue_Receive_support(
|
||||
int _POSIX_Message_queue_Send_support(
|
||||
mqd_t mqdes,
|
||||
const char *msg_ptr,
|
||||
unsigned32 msg_len,
|
||||
unsigned32 msg_prio,
|
||||
uint32_t msg_len,
|
||||
uint32_t msg_prio,
|
||||
Watchdog_Interval timeout
|
||||
);
|
||||
|
||||
@@ -231,7 +231,7 @@ RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
|
||||
*/
|
||||
|
||||
int _POSIX_Message_queue_Translate_core_message_queue_return_code(
|
||||
unsigned32 the_message_queue_status
|
||||
uint32_t the_message_queue_status
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ extern const pthread_mutexattr_t _POSIX_Mutex_Default_attributes;
|
||||
*/
|
||||
|
||||
void _POSIX_Mutex_Manager_initialization(
|
||||
unsigned32 maximum_mutexes
|
||||
uint32_t maximum_mutexes
|
||||
);
|
||||
|
||||
/*
|
||||
|
||||
@@ -38,7 +38,7 @@ POSIX_EXTERN Objects_Information _POSIX_Threads_Information;
|
||||
|
||||
POSIX_EXTERN posix_initialization_threads_table
|
||||
*_POSIX_Threads_User_initialization_threads;
|
||||
POSIX_EXTERN unsigned32 _POSIX_Threads_Number_of_initialization_threads;
|
||||
POSIX_EXTERN uint32_t _POSIX_Threads_Number_of_initialization_threads;
|
||||
|
||||
extern const pthread_attr_t _POSIX_Threads_Default_attributes;
|
||||
|
||||
@@ -51,8 +51,8 @@ extern const pthread_attr_t _POSIX_Threads_Default_attributes;
|
||||
*/
|
||||
|
||||
void _POSIX_Threads_Manager_initialization(
|
||||
unsigned32 maximum_pthreads,
|
||||
unsigned32 number_of_initialization_threads,
|
||||
uint32_t maximum_pthreads,
|
||||
uint32_t number_of_initialization_threads,
|
||||
posix_initialization_threads_table *user_threads
|
||||
);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ typedef struct {
|
||||
int process_shared;
|
||||
boolean named;
|
||||
boolean linked;
|
||||
unsigned32 open_count;
|
||||
uint32_t open_count;
|
||||
CORE_semaphore_Control Semaphore;
|
||||
} POSIX_Semaphore_Control;
|
||||
|
||||
@@ -54,7 +54,7 @@ POSIX_EXTERN Objects_Information _POSIX_Semaphore_Information;
|
||||
*/
|
||||
|
||||
void _POSIX_Semaphore_Manager_initialization(
|
||||
unsigned32 maximum_semaphorees
|
||||
uint32_t maximum_semaphorees
|
||||
);
|
||||
|
||||
/*
|
||||
|
||||
@@ -26,7 +26,7 @@ typedef struct {
|
||||
/*
|
||||
* POSIX Interrupts
|
||||
*/
|
||||
unsigned32 interrupts_installed;
|
||||
uint32_t interrupts_installed;
|
||||
CORE_semaphore_Control Interrupt_Semaphore;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -14,22 +14,22 @@
|
||||
#define STATE_CREATE_RUN_C 0x03 /* Created timer and running */
|
||||
#define STATE_CREATE_STOP_C 0x04 /* Created, ran and stopped timer */
|
||||
/* Maximum number of nsec allowed */
|
||||
#define MAX_NSEC_C (unsigned32)1000000000
|
||||
#define MAX_NSEC_C (uint32_t )1000000000
|
||||
#define MIN_NSEC_C 0 /* Minimum number of nsec allowew */
|
||||
#define TIMER_RELATIVE_C 0 /* Indicates that the fire time is
|
||||
* relative to the current one */
|
||||
#define SEC_TO_TICKS_C _TOD_Ticks_per_second /* Number of ticks in a second*/
|
||||
/* Nanoseconds in a second */
|
||||
#define NSEC_PER_SEC_C (unsigned32)1000000000
|
||||
#define NSEC_PER_SEC_C (uint32_t )1000000000
|
||||
|
||||
#define NO_MORE_TIMERS_C 11 /* There is not available timers */
|
||||
#define BAD_TIMER_C 11 /* The timer does not exist in the table */
|
||||
|
||||
#define SECONDS_PER_YEAR_C (unsigned32)(360 * 24) * (unsigned32)(60 * 60)
|
||||
#define SECONDS_PER_MONTH_C (unsigned32)( 30 * 24) * (unsigned32)(60 * 60)
|
||||
#define SECONDS_PER_DAY_C (unsigned32)( 24 * 60) * (unsigned32)(60)
|
||||
#define SECONDS_PER_HOUR_C (unsigned32)( 60 * 60 )
|
||||
#define SECONDS_PER_MINUTE_C (unsigned32)( 60 )
|
||||
#define SECONDS_PER_YEAR_C (uint32_t )(360 * 24) * (uint32_t )(60 * 60)
|
||||
#define SECONDS_PER_MONTH_C (uint32_t )( 30 * 24) * (uint32_t )(60 * 60)
|
||||
#define SECONDS_PER_DAY_C (uint32_t )( 24 * 60) * (uint32_t )(60)
|
||||
#define SECONDS_PER_HOUR_C (uint32_t )( 60 * 60 )
|
||||
#define SECONDS_PER_MINUTE_C (uint32_t )( 60 )
|
||||
|
||||
|
||||
/*
|
||||
@@ -45,8 +45,8 @@ typedef struct {
|
||||
struct sigevent inf; /* Information associated to the timer */
|
||||
timer_t timer_id; /* Created timer identifier */
|
||||
struct itimerspec timer_data; /* Timing data of the timer */
|
||||
unsigned32 ticks; /* Number of ticks of the initialization */
|
||||
unsigned32 overrun; /* Number of expirations of the timer */
|
||||
uint32_t ticks; /* Number of ticks of the initialization */
|
||||
uint32_t overrun; /* Number of expirations of the timer */
|
||||
rtems_time_of_day time; /* Time in which the timer was started */
|
||||
} POSIX_Timer_Control;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
void _POSIX_Condition_variables_Manager_initialization(
|
||||
unsigned32 maximum_condition_variables
|
||||
uint32_t maximum_condition_variables
|
||||
)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
*/
|
||||
|
||||
void _POSIX_Interrupt_Manager_initialization(
|
||||
unsigned32 maximum_interrupt_handlers
|
||||
uint32_t maximum_interrupt_handlers
|
||||
)
|
||||
{
|
||||
unsigned32 index;
|
||||
uint32_t index;
|
||||
POSIX_Interrupt_Control *the_vector;
|
||||
|
||||
_Objects_Initialize_information(
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
void _POSIX_Key_Manager_initialization(
|
||||
unsigned32 maximum_keys
|
||||
uint32_t maximum_keys
|
||||
)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
|
||||
@@ -28,8 +28,8 @@ int pthread_key_create(
|
||||
{
|
||||
POSIX_Keys_Control *the_key;
|
||||
void *table;
|
||||
unsigned32 the_api;
|
||||
unsigned32 bytes_to_allocate;
|
||||
uint32_t the_api;
|
||||
uint32_t bytes_to_allocate;
|
||||
|
||||
|
||||
_Thread_Disable_dispatch();
|
||||
|
||||
@@ -27,7 +27,7 @@ int pthread_key_delete(
|
||||
{
|
||||
register POSIX_Keys_Control *the_key;
|
||||
Objects_Locations location;
|
||||
unsigned32 the_api;
|
||||
uint32_t the_api;
|
||||
|
||||
the_key = _POSIX_Keys_Get( key, &location );
|
||||
switch ( location ) {
|
||||
|
||||
@@ -26,8 +26,8 @@ void *pthread_getspecific(
|
||||
)
|
||||
{
|
||||
register POSIX_Keys_Control *the_key;
|
||||
unsigned32 index;
|
||||
unsigned32 class;
|
||||
uint32_t index;
|
||||
uint32_t class;
|
||||
Objects_Locations location;
|
||||
void *key_data;
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ void _POSIX_Keys_Run_destructors(
|
||||
Thread_Control *thread
|
||||
)
|
||||
{
|
||||
unsigned32 index;
|
||||
unsigned32 pthread_index;
|
||||
unsigned32 pthread_class;
|
||||
unsigned32 iterations;
|
||||
uint32_t index;
|
||||
uint32_t pthread_index;
|
||||
uint32_t pthread_class;
|
||||
uint32_t iterations;
|
||||
boolean are_all_null;
|
||||
POSIX_Keys_Control *the_key;
|
||||
void *value;
|
||||
|
||||
@@ -27,8 +27,8 @@ int pthread_setspecific(
|
||||
)
|
||||
{
|
||||
register POSIX_Keys_Control *the_key;
|
||||
unsigned32 index;
|
||||
unsigned32 class;
|
||||
uint32_t index;
|
||||
uint32_t class;
|
||||
Objects_Locations location;
|
||||
|
||||
the_key = _POSIX_Keys_Get( key, &location );
|
||||
|
||||
@@ -44,9 +44,9 @@ int killinfo(
|
||||
{
|
||||
sigset_t mask;
|
||||
POSIX_API_Control *api;
|
||||
unsigned32 the_api;
|
||||
unsigned32 index;
|
||||
unsigned32 maximum;
|
||||
uint32_t the_api;
|
||||
uint32_t index;
|
||||
uint32_t maximum;
|
||||
Objects_Information *the_info;
|
||||
Objects_Control **object_table;
|
||||
Thread_Control *the_thread;
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
*/
|
||||
|
||||
void _POSIX_Message_queue_Manager_initialization(
|
||||
unsigned32 maximum_message_queues
|
||||
uint32_t maximum_message_queues
|
||||
)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
|
||||
@@ -51,7 +51,7 @@ ssize_t _POSIX_Message_queue_Receive_support(
|
||||
POSIX_Message_queue_Control *the_mq;
|
||||
POSIX_Message_queue_Control_fd *the_mq_fd;
|
||||
Objects_Locations location;
|
||||
unsigned32 length_out;
|
||||
uint32_t length_out;
|
||||
|
||||
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
|
||||
switch ( location ) {
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
int _POSIX_Message_queue_Send_support(
|
||||
mqd_t mqdes,
|
||||
const char *msg_ptr,
|
||||
unsigned32 msg_len,
|
||||
unsigned32 msg_prio,
|
||||
uint32_t msg_len,
|
||||
uint32_t msg_prio,
|
||||
Watchdog_Interval timeout
|
||||
)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
*/
|
||||
|
||||
int _POSIX_Message_queue_Translate_core_message_queue_return_code(
|
||||
unsigned32 the_message_queue_status
|
||||
uint32_t the_message_queue_status
|
||||
)
|
||||
{
|
||||
switch ( the_message_queue_status ) {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
void _POSIX_Mutex_Manager_initialization(
|
||||
unsigned32 maximum_mutexes
|
||||
uint32_t maximum_mutexes
|
||||
)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
|
||||
@@ -28,7 +28,7 @@ void _POSIX_Interval_to_timespec(
|
||||
struct timespec *time
|
||||
)
|
||||
{
|
||||
unsigned32 usecs;
|
||||
uint32_t usecs;
|
||||
|
||||
usecs = ticks * _TOD_Microseconds_per_tick;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ void _POSIX_Timespec_subtract(
|
||||
{
|
||||
struct timespec start_struct = *the_start;
|
||||
struct timespec *start = &start_struct;
|
||||
unsigned32 nsecs_per_sec = TOD_NANOSECONDS_PER_SECOND;
|
||||
uint32_t nsecs_per_sec = TOD_NANOSECONDS_PER_SECOND;
|
||||
|
||||
if (end->tv_nsec < start->tv_nsec) {
|
||||
int seconds = (start->tv_nsec - end->tv_nsec) / nsecs_per_sec + 1;
|
||||
|
||||
@@ -153,7 +153,7 @@ void _POSIX_signals_Manager_Initialization(
|
||||
int maximum_queued_signals
|
||||
)
|
||||
{
|
||||
unsigned32 signo;
|
||||
uint32_t signo;
|
||||
|
||||
/*
|
||||
* Ensure we have the same number of vectors and default vector entries
|
||||
|
||||
@@ -61,8 +61,8 @@ void _POSIX_Threads_Sporadic_budget_TSR(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
unsigned32 ticks;
|
||||
unsigned32 new_priority;
|
||||
uint32_t ticks;
|
||||
uint32_t new_priority;
|
||||
Thread_Control *the_thread;
|
||||
POSIX_API_Control *api;
|
||||
|
||||
@@ -102,7 +102,7 @@ void _POSIX_Threads_Sporadic_budget_callout(
|
||||
)
|
||||
{
|
||||
POSIX_API_Control *api;
|
||||
unsigned32 new_priority;
|
||||
uint32_t new_priority;
|
||||
|
||||
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
|
||||
|
||||
@@ -257,8 +257,8 @@ User_extensions_routine _POSIX_Threads_Exitted_extension(
|
||||
void _POSIX_Threads_Initialize_user_threads( void )
|
||||
{
|
||||
int status;
|
||||
unsigned32 index;
|
||||
unsigned32 maximum;
|
||||
uint32_t index;
|
||||
uint32_t maximum;
|
||||
posix_initialization_threads_table *user_threads;
|
||||
pthread_t thread_id;
|
||||
pthread_attr_t attr;
|
||||
@@ -335,8 +335,8 @@ User_extensions_Control _POSIX_Threads_User_extensions = {
|
||||
*/
|
||||
|
||||
void _POSIX_Threads_Manager_initialization(
|
||||
unsigned32 maximum_pthreads,
|
||||
unsigned32 number_of_initialization_threads,
|
||||
uint32_t maximum_pthreads,
|
||||
uint32_t number_of_initialization_threads,
|
||||
posix_initialization_threads_table *user_threads
|
||||
|
||||
)
|
||||
|
||||
@@ -672,11 +672,11 @@ int timer_gettime(
|
||||
|
||||
rtems_time_of_day current_time;
|
||||
int timer_pos;
|
||||
unsigned32 hours;
|
||||
unsigned32 minutes;
|
||||
unsigned32 seconds;
|
||||
unsigned32 ticks;
|
||||
unsigned32 nanosec;
|
||||
uint32_t hours;
|
||||
uint32_t minutes;
|
||||
uint32_t seconds;
|
||||
uint32_t ticks;
|
||||
uint32_t nanosec;
|
||||
|
||||
|
||||
/* Reads the current time */
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
void _POSIX_Semaphore_Manager_initialization(
|
||||
unsigned32 maximum_semaphores
|
||||
uint32_t maximum_semaphores
|
||||
)
|
||||
{
|
||||
_Objects_Initialize_information(
|
||||
|
||||
@@ -28,7 +28,7 @@ long sysconf(
|
||||
return _TOD_Ticks_per_second;
|
||||
|
||||
case _SC_OPEN_MAX: {
|
||||
extern unsigned32 rtems_libio_number_iops;
|
||||
extern uint32_t rtems_libio_number_iops;
|
||||
return rtems_libio_number_iops;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user