2006-12-13 Joel Sherrill <joel@OARcorp.com>

* librtems++/include/rtems++/rtemsEvent.h,
	librtems++/include/rtems++/rtemsMessageQueue.h,
	librtems++/include/rtems++/rtemsSemaphore.h,
	librtems++/include/rtems++/rtemsTask.h, librtems++/src/rtemsEvent.cc,
	librtems++/src/rtemsMessageQueue.cc,
	librtems++/src/rtemsSemaphore.cc, librtems++/src/rtemsTask.cc: Change
	rtems_unsigned32 to uint32_t.
This commit is contained in:
Joel Sherrill
2006-12-13 15:52:00 +00:00
parent 5e11c97dcf
commit 600a241e3b
9 changed files with 64 additions and 54 deletions

View File

@@ -1,3 +1,13 @@
2006-12-13 Joel Sherrill <joel@OARcorp.com>
* librtems++/include/rtems++/rtemsEvent.h,
librtems++/include/rtems++/rtemsMessageQueue.h,
librtems++/include/rtems++/rtemsSemaphore.h,
librtems++/include/rtems++/rtemsTask.h, librtems++/src/rtemsEvent.cc,
librtems++/src/rtemsMessageQueue.cc,
librtems++/src/rtemsSemaphore.cc, librtems++/src/rtemsTask.cc: Change
rtems_unsigned32 to uint32_t.
2006-12-13 Joel Sherrill <joel@OARcorp.com> 2006-12-13 Joel Sherrill <joel@OARcorp.com>
PR 1181/bsps PR 1181/bsps

View File

@@ -43,7 +43,7 @@ public:
// only the first 4 characters of the name are taken // only the first 4 characters of the name are taken
// connect to a task // connect to a task
rtemsEvent(const char* name, rtems_unsigned32 node = RTEMS_SEARCH_ALL_NODES); rtemsEvent(const char* name, uint32_t node = RTEMS_SEARCH_ALL_NODES);
// copy and default constructors // copy and default constructors
rtemsEvent(const rtemsEvent& event); rtemsEvent(const rtemsEvent& event);
@@ -54,7 +54,7 @@ public:
// connect to an existing task object, will not be the owner // connect to an existing task object, will not be the owner
const rtemsEvent& operator=(const rtemsEvent& event); const rtemsEvent& operator=(const rtemsEvent& event);
virtual const rtems_status_code connect(const char *name, virtual const rtems_status_code connect(const char *name,
const rtems_unsigned32 node = RTEMS_SEARCH_ALL_NODES); const uint32_t node = RTEMS_SEARCH_ALL_NODES);
// send an event // send an event
inline const rtems_status_code send(const rtems_id task, inline const rtems_status_code send(const rtems_id task,

View File

@@ -59,13 +59,13 @@ public:
// creates a message queue // creates a message queue
rtemsMessageQueue(const char* name, rtemsMessageQueue(const char* name,
const rtems_unsigned32 count, const uint32_t count,
const rtems_unsigned32 max_message_size, const uint32_t max_message_size,
const WaitMode wait_mode = wait_by_fifo, const WaitMode wait_mode = wait_by_fifo,
const Scope scope = local); const Scope scope = local);
// connects to a message queue // connects to a message queue
rtemsMessageQueue(const char *name, const rtems_unsigned32 node = RTEMS_SEARCH_ALL_NODES); rtemsMessageQueue(const char *name, const uint32_t node = RTEMS_SEARCH_ALL_NODES);
// copy and default constructors // copy and default constructors
rtemsMessageQueue(const rtemsMessageQueue& message_queue); rtemsMessageQueue(const rtemsMessageQueue& message_queue);
@@ -76,8 +76,8 @@ public:
// create or destroy (delete) the message queue // create or destroy (delete) the message queue
virtual const rtems_status_code create(const char* name, virtual const rtems_status_code create(const char* name,
const rtems_unsigned32 count, const uint32_t count,
const rtems_unsigned32 max_message_size, const uint32_t max_message_size,
const WaitMode wait_mode = wait_by_fifo, const WaitMode wait_mode = wait_by_fifo,
const Scope scope = local); const Scope scope = local);
virtual const rtems_status_code destroy(); virtual const rtems_status_code destroy();
@@ -85,25 +85,25 @@ public:
// connect to an existing message queue object, will not be the owner // connect to an existing message queue object, will not be the owner
const rtemsMessageQueue& operator=(const rtemsMessageQueue& message_queue); const rtemsMessageQueue& operator=(const rtemsMessageQueue& message_queue);
virtual const rtems_status_code connect(const char *name, virtual const rtems_status_code connect(const char *name,
const rtems_unsigned32 node = RTEMS_SEARCH_ALL_NODES); const uint32_t node = RTEMS_SEARCH_ALL_NODES);
// send a message of size from the buffer // send a message of size from the buffer
inline const rtems_status_code send(const void *buffer, inline const rtems_status_code send(const void *buffer,
const rtems_unsigned32 size); const uint32_t size);
inline const rtems_status_code urgent(const void *buffer, inline const rtems_status_code urgent(const void *buffer,
const rtems_unsigned32 size); const uint32_t size);
inline const rtems_status_code broadcast(const void *buffer, inline const rtems_status_code broadcast(const void *buffer,
const rtems_unsigned32 size, const uint32_t size,
rtems_unsigned32& count); uint32_t& count);
// receive a message of size, the timeout is in micro-secs // receive a message of size, the timeout is in micro-secs
inline const rtems_status_code receive(const void *buffer, inline const rtems_status_code receive(const void *buffer,
rtems_unsigned32& size, uint32_t& size,
rtems_interval micro_secs = RTEMS_NO_TIMEOUT, rtems_interval micro_secs = RTEMS_NO_TIMEOUT,
bool wait = true); bool wait = true);
// flush a message queue, returning the number of messages dropped // flush a message queue, returning the number of messages dropped
inline const rtems_status_code flush(rtems_unsigned32& size); inline const rtems_status_code flush(uint32_t& size);
// object id, and name // object id, and name
const rtems_id id_is() const { return id; } const rtems_id id_is() const { return id; }
@@ -128,20 +128,20 @@ private:
}; };
const rtems_status_code rtemsMessageQueue::send(const void *buffer, const rtems_status_code rtemsMessageQueue::send(const void *buffer,
const rtems_unsigned32 size) const uint32_t size)
{ {
return set_status_code(rtems_message_queue_send(id, (void*) buffer, size)); return set_status_code(rtems_message_queue_send(id, (void*) buffer, size));
} }
const rtems_status_code rtemsMessageQueue::urgent(const void *buffer, const rtems_status_code rtemsMessageQueue::urgent(const void *buffer,
const rtems_unsigned32 size) const uint32_t size)
{ {
return set_status_code(rtems_message_queue_urgent(id, (void*) buffer, size)); return set_status_code(rtems_message_queue_urgent(id, (void*) buffer, size));
} }
const rtems_status_code rtemsMessageQueue::broadcast(const void *buffer, const rtems_status_code rtemsMessageQueue::broadcast(const void *buffer,
const rtems_unsigned32 size, const uint32_t size,
rtems_unsigned32& count) uint32_t& count)
{ {
return set_status_code(rtems_message_queue_broadcast(id, return set_status_code(rtems_message_queue_broadcast(id,
(void*) buffer, (void*) buffer,
@@ -150,7 +150,7 @@ const rtems_status_code rtemsMessageQueue::broadcast(const void *buffer,
} }
const rtems_status_code rtemsMessageQueue::receive(const void *buffer, const rtems_status_code rtemsMessageQueue::receive(const void *buffer,
rtems_unsigned32& size, uint32_t& size,
rtems_interval micro_secs, rtems_interval micro_secs,
bool wait) bool wait)
{ {
@@ -164,7 +164,7 @@ const rtems_status_code rtemsMessageQueue::receive(const void *buffer,
TOD_MICROSECONDS_TO_TICKS(usecs))); TOD_MICROSECONDS_TO_TICKS(usecs)));
} }
const rtems_status_code rtemsMessageQueue::flush(rtems_unsigned32& count) const rtems_status_code rtemsMessageQueue::flush(uint32_t& count)
{ {
return set_status_code(rtems_message_queue_flush(id, &count)); return set_status_code(rtems_message_queue_flush(id, &count));
} }

View File

@@ -64,7 +64,7 @@ public:
// create a semaphore object // create a semaphore object
rtemsSemaphore(const char* name, rtemsSemaphore(const char* name,
const Scope scope = local, const Scope scope = local,
const rtems_unsigned32 counter = 1, const uint32_t counter = 1,
const WaitMode wait_mode = wait_by_fifo, const WaitMode wait_mode = wait_by_fifo,
const Type type = binary, const Type type = binary,
const Priority priority = no_priority_inherit, const Priority priority = no_priority_inherit,
@@ -72,7 +72,7 @@ public:
const rtems_task_priority priority_ceiling = 0); const rtems_task_priority priority_ceiling = 0);
// connect to an existing semaphore object by name // connect to an existing semaphore object by name
rtemsSemaphore(const char *name, const rtems_unsigned32 node); rtemsSemaphore(const char *name, const uint32_t node);
// attach this object to an other objects semaphore // attach this object to an other objects semaphore
rtemsSemaphore(const rtemsSemaphore& semaphore); rtemsSemaphore(const rtemsSemaphore& semaphore);
@@ -84,7 +84,7 @@ public:
// create or destroy (delete) a semaphore // create or destroy (delete) a semaphore
virtual const rtems_status_code create(const char* name, virtual const rtems_status_code create(const char* name,
const Scope scope = local, const Scope scope = local,
const rtems_unsigned32 counter = 1, const uint32_t counter = 1,
const WaitMode wait_mode = wait_by_fifo, const WaitMode wait_mode = wait_by_fifo,
const Type type = binary, const Type type = binary,
const Priority priority = no_priority_inherit, const Priority priority = no_priority_inherit,
@@ -94,11 +94,11 @@ public:
// connect to an existing semaphore object, will not be the owner // connect to an existing semaphore object, will not be the owner
const rtemsSemaphore& operator=(const rtemsSemaphore& semaphore); const rtemsSemaphore& operator=(const rtemsSemaphore& semaphore);
virtual const rtems_status_code connect(const char *name, rtems_unsigned32 node); virtual const rtems_status_code connect(const char *name, uint32_t node);
// obtain the semaphore, timeout is in micro-seconds // obtain the semaphore, timeout is in micro-seconds
inline const rtems_status_code obtain(bool wait = true, inline const rtems_status_code obtain(bool wait = true,
const rtems_unsigned32 micro_secs = RTEMS_NO_TIMEOUT); const uint32_t micro_secs = RTEMS_NO_TIMEOUT);
// release the semaphore, blocks threads eligble // release the semaphore, blocks threads eligble
inline const rtems_status_code release(); inline const rtems_status_code release();
@@ -126,7 +126,7 @@ private:
}; };
const rtems_status_code rtemsSemaphore::obtain(const bool wait, const rtems_status_code rtemsSemaphore::obtain(const bool wait,
const rtems_unsigned32 micro_secs) const uint32_t micro_secs)
{ {
rtems_interval usecs = rtems_interval usecs =
micro_secs && (micro_secs < _TOD_Microseconds_per_tick) ? micro_secs && (micro_secs < _TOD_Microseconds_per_tick) ?

View File

@@ -76,7 +76,7 @@ public:
// creates a task // creates a task
rtemsTask(const char* name, rtemsTask(const char* name,
const rtems_task_priority initial_priority, const rtems_task_priority initial_priority,
const rtems_unsigned32 stack_size, const uint32_t stack_size,
const rtems_mode preemption = RTEMS_NO_PREEMPT, const rtems_mode preemption = RTEMS_NO_PREEMPT,
const rtems_mode timeslice = RTEMS_NO_TIMESLICE, const rtems_mode timeslice = RTEMS_NO_TIMESLICE,
const rtems_mode asr = RTEMS_NO_ASR, const rtems_mode asr = RTEMS_NO_ASR,
@@ -85,7 +85,7 @@ public:
const Scope scope = local); const Scope scope = local);
// connects to a task // connects to a task
rtemsTask(const char *name, const rtems_unsigned32 node = RTEMS_SEARCH_ALL_NODES); rtemsTask(const char *name, const uint32_t node = RTEMS_SEARCH_ALL_NODES);
// copy and default constructors // copy and default constructors
rtemsTask(const rtemsTask& task); rtemsTask(const rtemsTask& task);
@@ -97,7 +97,7 @@ public:
// create or destroy (delete) the task // create or destroy (delete) the task
virtual const rtems_status_code create(const char* name, virtual const rtems_status_code create(const char* name,
const rtems_task_priority initial_priority, const rtems_task_priority initial_priority,
const rtems_unsigned32 stack_size, const uint32_t stack_size,
const rtems_mode preemption = RTEMS_NO_PREEMPT, const rtems_mode preemption = RTEMS_NO_PREEMPT,
const rtems_mode timeslice = RTEMS_NO_TIMESLICE, const rtems_mode timeslice = RTEMS_NO_TIMESLICE,
const rtems_mode asr = RTEMS_NO_ASR, const rtems_mode asr = RTEMS_NO_ASR,
@@ -109,7 +109,7 @@ public:
// connect to an existing task object, will not be the owner // connect to an existing task object, will not be the owner
const rtemsTask& operator=(const rtemsTask& task); const rtemsTask& operator=(const rtemsTask& task);
virtual const rtems_status_code connect(const char *name, virtual const rtems_status_code connect(const char *name,
const rtems_unsigned32 node = RTEMS_SEARCH_ALL_NODES); const uint32_t node = RTEMS_SEARCH_ALL_NODES);
// run control // run control
virtual const rtems_status_code start(const rtems_task_argument argument); virtual const rtems_status_code start(const rtems_task_argument argument);
@@ -128,10 +128,10 @@ public:
rtems_task_priority& old_priority); rtems_task_priority& old_priority);
// notepad control // notepad control
const rtems_status_code get_note(const rtems_unsigned32 notepad, const rtems_status_code get_note(const uint32_t notepad,
rtems_unsigned32& note); uint32_t& note);
const rtems_status_code set_note(const rtems_unsigned32 notepad, const rtems_status_code set_note(const uint32_t notepad,
const rtems_unsigned32 note); const uint32_t note);
// object id, and name // object id, and name
const rtems_id id_is() const { return id; } const rtems_id id_is() const { return id; }

View File

@@ -24,7 +24,7 @@
rtemsEvent rtemsEvent
*/ */
rtemsEvent::rtemsEvent(const char *name_str, rtems_unsigned32 node) rtemsEvent::rtemsEvent(const char *name_str, uint32_t node)
: name(rtems_build_name('S', 'E', 'L', 'F')), : name(rtems_build_name('S', 'E', 'L', 'F')),
id(RTEMS_SELF) id(RTEMS_SELF)
{ {
@@ -56,7 +56,7 @@ const rtemsEvent& rtemsEvent::operator=(const rtemsEvent& event)
} }
const rtems_status_code rtemsEvent::connect(const char *name_str, const rtems_status_code rtemsEvent::connect(const char *name_str,
const rtems_unsigned32 node) const uint32_t node)
{ {
name = rtems_build_name(name_str[0], name = rtems_build_name(name_str[0],
name_str[1], name_str[1],

View File

@@ -26,8 +26,8 @@
*/ */
rtemsMessageQueue::rtemsMessageQueue(const char* mqname, rtemsMessageQueue::rtemsMessageQueue(const char* mqname,
const rtems_unsigned32 count, const uint32_t count,
const rtems_unsigned32 max_message_size, const uint32_t max_message_size,
const WaitMode wait_mode, const WaitMode wait_mode,
const Scope scope) const Scope scope)
: name(0), : name(0),
@@ -39,7 +39,7 @@ rtemsMessageQueue::rtemsMessageQueue(const char* mqname,
} }
rtemsMessageQueue::rtemsMessageQueue(const char *mqname, rtemsMessageQueue::rtemsMessageQueue(const char *mqname,
const rtems_unsigned32 node) const uint32_t node)
: name(0), : name(0),
owner(false), owner(false),
id(0) id(0)
@@ -80,8 +80,8 @@ void rtemsMessageQueue::make_invalid()
} }
const rtems_status_code rtemsMessageQueue::create(const char* mqname, const rtems_status_code rtemsMessageQueue::create(const char* mqname,
const rtems_unsigned32 count, const uint32_t count,
const rtems_unsigned32 max_message_size, const uint32_t max_message_size,
const WaitMode wait_mode, const WaitMode wait_mode,
const Scope scope) const Scope scope)
{ {
@@ -138,7 +138,7 @@ const rtemsMessageQueue& rtemsMessageQueue::operator=(const rtemsMessageQueue& m
} }
const rtems_status_code rtemsMessageQueue::connect(const char *mqname, const rtems_status_code rtemsMessageQueue::connect(const char *mqname,
const rtems_unsigned32 node) const uint32_t node)
{ {
if (id && owner) if (id && owner)
return set_status_code(RTEMS_UNSATISFIED); return set_status_code(RTEMS_UNSATISFIED);

View File

@@ -27,7 +27,7 @@
rtemsSemaphore::rtemsSemaphore(const char* sname, rtemsSemaphore::rtemsSemaphore(const char* sname,
const Scope scope, const Scope scope,
const rtems_unsigned32 counter, const uint32_t counter,
const WaitMode wait_mode, const WaitMode wait_mode,
const Type type, const Type type,
const Priority priority, const Priority priority,
@@ -48,7 +48,7 @@ rtemsSemaphore::rtemsSemaphore(const char* sname,
priority_ceiling); priority_ceiling);
} }
rtemsSemaphore::rtemsSemaphore(const char *sname, const rtems_unsigned32 node) rtemsSemaphore::rtemsSemaphore(const char *sname, const uint32_t node)
: name(0), : name(0),
owner(false), owner(false),
id(0) id(0)
@@ -90,7 +90,7 @@ void rtemsSemaphore::make_invalid()
const rtems_status_code rtemsSemaphore::create(const char* sname, const rtems_status_code rtemsSemaphore::create(const char* sname,
const Scope scope, const Scope scope,
const rtems_unsigned32 counter, const uint32_t counter,
const WaitMode wait_mode, const WaitMode wait_mode,
const Type type, const Type type,
const Priority priority, const Priority priority,
@@ -148,7 +148,7 @@ const rtemsSemaphore& rtemsSemaphore::operator=(const rtemsSemaphore& semaphore)
} }
const rtems_status_code rtemsSemaphore::connect(const char *sname, const rtems_status_code rtemsSemaphore::connect(const char *sname,
const rtems_unsigned32 node) const uint32_t node)
{ {
if (id && owner) if (id && owner)
return set_status_code(RTEMS_UNSATISFIED); return set_status_code(RTEMS_UNSATISFIED);

View File

@@ -29,7 +29,7 @@
rtemsTask::rtemsTask(const char* tname, rtemsTask::rtemsTask(const char* tname,
const rtems_task_priority initial_priority, const rtems_task_priority initial_priority,
const rtems_unsigned32 stack_size, const uint32_t stack_size,
const rtems_mode preemption, const rtems_mode preemption,
const rtems_mode timeslice, const rtems_mode timeslice,
const rtems_mode asr, const rtems_mode asr,
@@ -53,7 +53,7 @@ rtemsTask::rtemsTask(const char* tname,
scope); scope);
} }
rtemsTask::rtemsTask(const char *tname, rtems_unsigned32 node) rtemsTask::rtemsTask(const char *tname, uint32_t node)
: name(rtems_build_name('S', 'E', 'L', 'F')), : name(rtems_build_name('S', 'E', 'L', 'F')),
owner(false), owner(false),
id(RTEMS_SELF), id(RTEMS_SELF),
@@ -99,7 +99,7 @@ void rtemsTask::make_self()
const rtems_status_code rtemsTask::create(const char* tname, const rtems_status_code rtemsTask::create(const char* tname,
const rtems_task_priority initial_priority, const rtems_task_priority initial_priority,
const rtems_unsigned32 stack_size, const uint32_t stack_size,
const rtems_mode preemption, const rtems_mode preemption,
const rtems_mode timeslice, const rtems_mode timeslice,
const rtems_mode asr, const rtems_mode asr,
@@ -165,7 +165,7 @@ const rtemsTask& rtemsTask::operator=(const rtemsTask& task)
} }
const rtems_status_code rtemsTask::connect(const char *sname, const rtems_status_code rtemsTask::connect(const char *sname,
const rtems_unsigned32 node) const uint32_t node)
{ {
if (id && owner) if (id && owner)
return set_status_code(RTEMS_UNSATISFIED); return set_status_code(RTEMS_UNSATISFIED);
@@ -265,14 +265,14 @@ const rtems_status_code rtemsTask::set_priority(const rtems_task_priority priori
&old_priority)); &old_priority));
} }
const rtems_status_code rtemsTask::get_note(const rtems_unsigned32 notepad, const rtems_status_code rtemsTask::get_note(const uint32_t notepad,
rtems_unsigned32& note) uint32_t& note)
{ {
return set_status_code(rtems_task_get_note(id, notepad, &note)); return set_status_code(rtems_task_get_note(id, notepad, &note));
} }
const rtems_status_code rtemsTask::set_note(const rtems_unsigned32 notepad, const rtems_status_code rtemsTask::set_note(const uint32_t notepad,
const rtems_unsigned32 note) const uint32_t note)
{ {
return set_status_code(rtems_task_set_note(id, notepad, note)); return set_status_code(rtems_task_set_note(id, notepad, note));
} }