summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-05 18:17:12 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-08-05 18:17:12 +0000
commitc85ab23ab7169b2c7a30f3d747b5f6339bc4a6e9 (patch)
tree3d2d2e54047e6998e8d5bab5c647aedc53807644 /cpukit
parent2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-c85ab23ab7169b2c7a30f3d747b5f6339bc4a6e9.tar.bz2
2009-08-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/include/rtems/libio_.h, libcsupport/src/fs_null_handlers.c: Null handlers are now const. * libi2c/libi2c.c, libi2c/libi2c.h: Documentation. Do not create semaphores on the fly. * cpukit/libblock/src/bdpart.c: Fixed format specifier. * cpukit/libblock/include/rtems/bdbuf.h, rtems/include/rtems.h, rtems/include/rtems/rtems/asr.h, rtems/include/rtems/rtems/attr.h, rtems/include/rtems/rtems/barrier.h, rtems/include/rtems/rtems/barriermp.h, rtems/include/rtems/rtems/cache.h, rtems/include/rtems/rtems/clock.h, rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/dpmem.h, rtems/include/rtems/rtems/event.h, rtems/include/rtems/rtems/eventmp.h, rtems/include/rtems/rtems/eventset.h, rtems/include/rtems/rtems/intr.h, rtems/include/rtems/rtems/message.h, rtems/include/rtems/rtems/modes.h, rtems/include/rtems/rtems/mp.h, rtems/include/rtems/rtems/msgmp.h, rtems/include/rtems/rtems/object.h, rtems/include/rtems/rtems/part.h, rtems/include/rtems/rtems/partmp.h, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/region.h, rtems/include/rtems/rtems/regionmp.h, rtems/include/rtems/rtems/rtemsapi.h, rtems/include/rtems/rtems/sem.h, rtems/include/rtems/rtems/semmp.h, rtems/include/rtems/rtems/signal.h, rtems/include/rtems/rtems/signalmp.h, rtems/include/rtems/rtems/status.h, rtems/include/rtems/rtems/support.h, rtems/include/rtems/rtems/taskmp.h, rtems/include/rtems/rtems/tasks.h, rtems/include/rtems/rtems/timer.h, rtems/include/rtems/rtems/types.h, rtems/inline/rtems/rtems/support.inl: Documentation. * include/rtems/irq-extension.h: Documentation. Added API for interrupt servers.
Diffstat (limited to '')
-rw-r--r--cpukit/ChangeLog34
-rw-r--r--cpukit/include/rtems/irq-extension.h203
-rw-r--r--cpukit/libblock/include/rtems/bdbuf.h2
-rw-r--r--cpukit/libblock/src/bdpart.c6
-rw-r--r--cpukit/libcsupport/include/rtems/libio_.h2
-rw-r--r--cpukit/libcsupport/src/fs_null_handlers.c2
-rw-r--r--cpukit/libi2c/libi2c.c71
-rw-r--r--cpukit/libi2c/libi2c.h18
-rw-r--r--cpukit/rtems/include/rtems.h95
-rw-r--r--cpukit/rtems/include/rtems/rtems/asr.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/attr.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/barrier.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/barriermp.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/cache.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/clock.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/config.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/dpmem.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/event.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/eventmp.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/eventset.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/intr.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/message.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/modes.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/mp.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/msgmp.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/object.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/part.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/partmp.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/ratemon.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/region.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/regionmp.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/rtemsapi.h5
-rw-r--r--cpukit/rtems/include/rtems/rtems/sem.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/semmp.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/signal.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/signalmp.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/status.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/support.h72
-rw-r--r--cpukit/rtems/include/rtems/rtems/taskmp.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/tasks.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/timer.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/types.h4
-rw-r--r--cpukit/rtems/inline/rtems/rtems/support.inl24
43 files changed, 413 insertions, 245 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 7bcd9fbdea..852be3152f 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,37 @@
+2009-08-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libcsupport/include/rtems/libio_.h,
+ libcsupport/src/fs_null_handlers.c: Null handlers are now const.
+ * libi2c/libi2c.c, libi2c/libi2c.h: Documentation. Do not create
+ semaphores on the fly.
+ * cpukit/libblock/src/bdpart.c: Fixed format specifier.
+ * cpukit/libblock/include/rtems/bdbuf.h, rtems/include/rtems.h,
+ rtems/include/rtems/rtems/asr.h, rtems/include/rtems/rtems/attr.h,
+ rtems/include/rtems/rtems/barrier.h,
+ rtems/include/rtems/rtems/barriermp.h,
+ rtems/include/rtems/rtems/cache.h, rtems/include/rtems/rtems/clock.h,
+ rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/dpmem.h,
+ rtems/include/rtems/rtems/event.h,
+ rtems/include/rtems/rtems/eventmp.h,
+ rtems/include/rtems/rtems/eventset.h,
+ rtems/include/rtems/rtems/intr.h, rtems/include/rtems/rtems/message.h,
+ rtems/include/rtems/rtems/modes.h, rtems/include/rtems/rtems/mp.h,
+ rtems/include/rtems/rtems/msgmp.h, rtems/include/rtems/rtems/object.h,
+ rtems/include/rtems/rtems/part.h, rtems/include/rtems/rtems/partmp.h,
+ rtems/include/rtems/rtems/ratemon.h,
+ rtems/include/rtems/rtems/region.h,
+ rtems/include/rtems/rtems/regionmp.h,
+ rtems/include/rtems/rtems/rtemsapi.h, rtems/include/rtems/rtems/sem.h,
+ rtems/include/rtems/rtems/semmp.h, rtems/include/rtems/rtems/signal.h,
+ rtems/include/rtems/rtems/signalmp.h,
+ rtems/include/rtems/rtems/status.h,
+ rtems/include/rtems/rtems/support.h,
+ rtems/include/rtems/rtems/taskmp.h, rtems/include/rtems/rtems/tasks.h,
+ rtems/include/rtems/rtems/timer.h, rtems/include/rtems/rtems/types.h,
+ rtems/inline/rtems/rtems/support.inl: Documentation.
+ * include/rtems/irq-extension.h: Documentation. Added API for
+ interrupt servers.
+
2009-08-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* sapi/include/confdefs.h: Account for memory for POSIX message queue
diff --git a/cpukit/include/rtems/irq-extension.h b/cpukit/include/rtems/irq-extension.h
index ddc4b58af9..6a5164f3f7 100644
--- a/cpukit/include/rtems/irq-extension.h
+++ b/cpukit/include/rtems/irq-extension.h
@@ -42,16 +42,44 @@ extern "C" {
*/
/**
+ * @brief Makes the interrupt handler unique. Prevents other handler from
+ * using the same interrupt vector.
+ */
+#define RTEMS_INTERRUPT_UNIQUE ((rtems_option) 0x00000001)
+
+/**
+ * @brief Allows that this interrupt handler may share a common interrupt
+ * vector with other handler.
+ */
+#define RTEMS_INTERRUPT_SHARED ((rtems_option) 0x00000000)
+
+/**
+ * @brief Returns true if the interrupt handler unique option is set.
+ */
+#define RTEMS_INTERRUPT_IS_UNIQUE( options) \
+ ((options) & RTEMS_INTERRUPT_UNIQUE)
+
+/**
+ * @brief Returns true if the interrupt handler shared option is set.
+ */
+#define RTEMS_INTERRUPT_IS_SHARED( options) \
+ (!RTEMS_INTERRUPT_IS_UNIQUE( options))
+
+/**
* @brief Interrupt handler routine type.
*/
-typedef void (*rtems_interrupt_handler)( rtems_vector_number, void *);
+typedef void (*rtems_interrupt_handler)(rtems_vector_number, void *);
/**
* @brief Installs the interrupt handler routine @a handler for the interrupt
* vector with number @a vector.
*
- * You can set some @ref rtems_interrupt_extension_options "options" with @a
- * options for the interrupt handler.
+ * You can set one of the mutually exclusive options
+ *
+ * - @ref RTEMS_INTERRUPT_UNIQUE
+ * - @ref RTEMS_INTERRUPT_SHARED
+ *
+ * with the @a options parameter for the interrupt handler.
*
* The handler routine shall be called with argument @a arg when dispatched.
* The order in which the shared interrupt handlers are dispatched for one
@@ -64,22 +92,23 @@ typedef void (*rtems_interrupt_handler)( rtems_vector_number, void *);
* system debugging and status tools. The string has to be persistent during
* the handler life time.
*
- * @note This function may block.
- *
- * @return
- * - On success RTEMS_SUCCESSFUL shall be returned.
- * - If the vector is already occupied with a unique handler the
- * RTEMS_RESOURCE_IN_USE status code shall be returned.
- * - If you want to install a unique handler and there is already a handler
- * installed RTEMS_RESOURCE_IN_USE shall be returned.
- * - If this function is called within interrupt context RTEMS_CALLED_FROM_ISR
- * shall be returned.
- * - If the vector number is out of range RTEMS_INVALID_NUMBER shall be
+ * This function may block.
+ *
+ * @retval RTEMS_SUCCESSFUL Shall be returned in case of success.
+ * @retval RTEMS_CALLED_FROM_ISR If this function is called from interrupt
+ * context this shall be returned.
+ * @retval RTEMS_INVALID_ADDRESS If the handler address is NULL this shall be
+ * returned.
+ * @retval RTEMS_INVALID_ID If the vector number is out of range this shall be
* returned.
- * - If the handler address is NULL a RTEMS_INVALID_ADDRESS shall be returned.
- * - If a handler with this argument is already installed for this vector
- * RTEMS_TOO_MANY shall be returned.
- * - Other error states are BSP specific.
+ * @retval RTEMS_INVALID_NUMBER If an option is not applicable this shall be
+ * returned.
+ * @retval RTEMS_RESOURCE_IN_USE If the vector is already occupied with a
+ * unique handler this shall be returned. If a unique handler should be
+ * installed and there is already a handler installed this shall be returned.
+ * @retval RTEMS_TOO_MANY If a handler with this argument is already installed
+ * for the vector this shall be returned.
+ * @retval * Other error states are BSP specific.
*/
rtems_status_code rtems_interrupt_handler_install(
rtems_vector_number vector,
@@ -93,18 +122,18 @@ rtems_status_code rtems_interrupt_handler_install(
* @brief Removes the interrupt handler routine @a handler with argument @a arg
* for the interrupt vector with number @a vector.
*
- * @note This function may block.
+ * This function may block.
*
- * @return
- * - On success RTEMS_SUCCESSFUL shall be returned.
- * - If this function is called within interrupt context RTEMS_CALLED_FROM_ISR
- * shall be returned.
- * - If the vector number is out of range RTEMS_INVALID_NUMBER shall be
+ * @retval RTEMS_SUCCESSFUL Shall be returned in case of success.
+ * @retval RTEMS_CALLED_FROM_ISR If this function is called from interrupt
+ * context this shall be returned.
+ * @retval RTEMS_INVALID_ADDRESS If the handler address is NULL this shall be
+ * returned.
+ * @retval RTEMS_INVALID_ID If the vector number is out of range this shall be
* returned.
- * - If the handler address is NULL a RTEMS_INVALID_ADDRESS shall be returned.
- * - If the handler with this argument is not installed for this vector
- * RTEMS_UNSATISFIED shall be returned.
- * - Other error states are BSP specific.
+ * @retval RTEMS_UNSATISFIED If the handler with its argument is not installed
+ * for the vector this shall be returned.
+ * @retval * Other error states are BSP specific.
*/
rtems_status_code rtems_interrupt_handler_remove(
rtems_vector_number vector,
@@ -131,16 +160,15 @@ typedef void (*rtems_interrupt_per_handler_routine)(
*
* This function is intended for system information and diagnostics.
*
- * @note This function may block. Never install or remove an interrupt handler
+ * This function may block. Never install or remove an interrupt handler
* within the iteration routine. This may result in a deadlock.
*
- * @return
- * - On success RTEMS_SUCCESSFUL shall be returned.
- * - If this function is called within interrupt context RTEMS_CALLED_FROM_ISR
- * shall be returned.
- * - If the vector number is out of range RTEMS_INVALID_NUMBER shall be
+ * @retval RTEMS_SUCCESSFUL Shall be returned in case of success.
+ * @retval RTEMS_CALLED_FROM_ISR If this function is called from interrupt
+ * context this shall be returned.
+ * @retval RTEMS_INVALID_ID If the vector number is out of range this shall be
* returned.
- * - Other error states are BSP specific.
+ * @retval * Other error states are BSP specific.
*/
rtems_status_code rtems_interrupt_handler_iterate(
rtems_vector_number vector,
@@ -148,55 +176,86 @@ rtems_status_code rtems_interrupt_handler_iterate(
void *arg
);
-/** @} */
-
/**
- * @defgroup rtems_interrupt_extension_options Interrupt Handler Options
+ * @brief Initializes an interrupt server task.
*
- * @ingroup rtems_interrupt_extension
+ * The task will have the priority @a priority, the stack size @a stack_size,
+ * the modes @a modes and the attributes @a attributes. The identifier of the
+ * server task will be returned in @a server. Interrupt handlers can be
+ * installed on the server with rtems_interrupt_server_handler_install() and
+ * removed with rtems_interrupt_server_handler_remove() using this identifier.
+ * In case of an interrupt the request will be forwarded to the server. The
+ * handlers are executed within the server context. If one handler blocks on
+ * something this may delay the processing of other handlers.
*
- * @{
- */
-
-/**
- * @name Options
+ * The server identifier pointer @a server may be @a NULL to initialize the
+ * default server.
*
- * @{
- */
-
-/**
- * @brief Makes the interrupt handler unique. Prevents other handler from
- * using the same interrupt vector.
- */
-#define RTEMS_INTERRUPT_UNIQUE ((rtems_option) 0x00000001)
-
-/**
- * @brief Allows that this interrupt handler may share a common interrupt
- * vector with other handler.
- */
-#define RTEMS_INTERRUPT_SHARED ((rtems_option) 0x00000000)
-
-/** @} */
-
-/**
- * @name Option Set Checks
+ * This function may block.
*
- * @{
+ * @see rtems_task_create().
+ *
+ * @retval RTEMS_SUCCESSFUL Shall be returned in case of success.
+ * @retval RTEMS_INCORRECT_STATE If the default server is already initialized
+ * this shall be returned.
+ * @retval * Other error states are BSP specific.
*/
+rtems_status_code rtems_interrupt_server_initialize(
+ rtems_task_priority priority,
+ size_t stack_size,
+ rtems_mode modes,
+ rtems_attribute attributes,
+ rtems_id *server
+);
/**
- * @brief Returns true if the interrupt handler unique option is set.
+ * @brief Installs the interrupt handler routine @a handler for the interrupt
+ * vector with number @a vector on the server @a server.
+ *
+ * The handler routine will be executed on the corresponding interrupt server
+ * task. A server identifier @a server of @c RTEMS_ID_NONE may be used to
+ * install the handler on the default server.
+ *
+ * This function may block.
+ *
+ * @see rtems_interrupt_handler_install().
+ *
+ * @retval RTEMS_SUCCESSFUL Shall be returned in case of success.
+ * @retval RTEMS_INCORRECT_STATE If the interrupt handler server is not
+ * initialized this shall be returned.
+ * @retval * For other errors see rtems_interrupt_handler_install().
*/
-#define RTEMS_INTERRUPT_IS_UNIQUE( options) \
- ((options) & RTEMS_INTERRUPT_UNIQUE)
+rtems_status_code rtems_interrupt_server_handler_install(
+ rtems_id server,
+ rtems_vector_number vector,
+ const char *info,
+ rtems_option options,
+ rtems_interrupt_handler handler,
+ void *arg
+);
/**
- * @brief Returns true if the interrupt handler shared option is set.
+ * @brief Removes the interrupt handler routine @a handler with argument @a arg
+ * for the interrupt vector with number @a vector from the server @a server.
+ *
+ * A server identifier @a server of @c RTEMS_ID_NONE may be used to remove the
+ * handler from the default server.
+ *
+ * This function may block.
+ *
+ * @see rtems_interrupt_handler_remove().
+ *
+ * @retval RTEMS_SUCCESSFUL Shall be returned in case of success.
+ * @retval RTEMS_INCORRECT_STATE If the interrupt handler server is not
+ * initialized this shall be returned.
+ * @retval * For other errors see rtems_interrupt_handler_remove().
*/
-#define RTEMS_INTERRUPT_IS_SHARED( options) \
- (!RTEMS_INTERRUPT_IS_UNIQUE( options))
-
-/** @} */
+rtems_status_code rtems_interrupt_server_handler_remove(
+ rtems_id server,
+ rtems_vector_number vector,
+ rtems_interrupt_handler handler,
+ void *arg
+);
/** @} */
diff --git a/cpukit/libblock/include/rtems/bdbuf.h b/cpukit/libblock/include/rtems/bdbuf.h
index 16f86fcdd3..da9e05011f 100644
--- a/cpukit/libblock/include/rtems/bdbuf.h
+++ b/cpukit/libblock/include/rtems/bdbuf.h
@@ -34,6 +34,8 @@ extern "C" {
/**
* @defgroup rtems_libblock Block Device Library
+ *
+ * Block device modules.
*/
/**
diff --git a/cpukit/libblock/src/bdpart.c b/cpukit/libblock/src/bdpart.c
index 5f005452fb..16694aa704 100644
--- a/cpukit/libblock/src/bdpart.c
+++ b/cpukit/libblock/src/bdpart.c
@@ -858,7 +858,7 @@ rtems_status_code rtems_bdpart_register(
logical_disk = rtems_filesystem_make_dev_t( major, minor);
/* Set partition number for logical disk name */
- rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%lu", i + 1);
+ rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
esc = RTEMS_INVALID_NAME;
goto cleanup;
@@ -994,7 +994,7 @@ rtems_status_code rtems_bdpart_mount(
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
/* Create logical disk name */
- int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%lu", i + 1);
+ int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
esc = RTEMS_INVALID_NAME;
goto cleanup;
@@ -1070,7 +1070,7 @@ rtems_status_code rtems_bdpart_unmount(
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
/* Create mount point */
- int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%lu", i + 1);
+ int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
esc = RTEMS_INVALID_NAME;
goto cleanup;
diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h
index dfde83145d..7aada77622 100644
--- a/cpukit/libcsupport/include/rtems/libio_.h
+++ b/cpukit/libcsupport/include/rtems/libio_.h
@@ -37,7 +37,7 @@ extern "C" {
#define RTEMS_LIBIO_IOP_SEM(n) rtems_build_name('L', 'B', 'I', n)
extern rtems_id rtems_libio_semaphore;
-extern rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers;
+extern const rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers;
/*
* File descriptor Table Information
diff --git a/cpukit/libcsupport/src/fs_null_handlers.c b/cpukit/libcsupport/src/fs_null_handlers.c
index fb323d7452..72c5b2c2b1 100644
--- a/cpukit/libcsupport/src/fs_null_handlers.c
+++ b/cpukit/libcsupport/src/fs_null_handlers.c
@@ -23,7 +23,7 @@
* Set of null operations handlers.
*/
-rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers = {
+const rtems_filesystem_file_handlers_r rtems_filesystem_null_handlers = {
NULL, /* open */
NULL, /* close */
NULL, /* read */
diff --git a/cpukit/libi2c/libi2c.c b/cpukit/libi2c/libi2c.c
index 2d54a640ed..c07a03d92d 100644
--- a/cpukit/libi2c/libi2c.c
+++ b/cpukit/libi2c/libi2c.c
@@ -110,8 +110,7 @@ static struct i2cbus
{
rtems_libi2c_bus_t *bush;
volatile rtems_id mutex; /* lock this across start -> stop */
- volatile short waiting;
- volatile char started;
+ volatile bool started;
char *name;
} busses[MAX_NO_BUSSES] = { { 0, 0, 0, 0, 0 } };
@@ -120,7 +119,7 @@ static struct
rtems_libi2c_drv_t *drv;
} drvs[MAX_NO_DRIVERS] = { { 0 } };
-static rtems_id libmutex = 0;
+static rtems_id libmutex = RTEMS_ID_NONE;
#define LOCK(m) assert(!rtems_semaphore_obtain((m), RTEMS_WAIT, RTEMS_NO_TIMEOUT))
#define UNLOCK(m) rtems_semaphore_release((m))
@@ -175,24 +174,29 @@ mutexCreate (rtems_name nm, rtems_id *pm)
static void
lock_bus (int busno)
{
-rtems_status_code sc;
-struct i2cbus *bus = &busses[busno];
+ struct i2cbus *bus = &busses[busno];
- LIBLOCK ();
- if (!bus->waiting) {
- rtems_id m;
- /* nobody is holding the bus mutex - it's not there. Create it on the fly */
- sc = mutexCreate (rtems_build_name ('i', '2', 'c', '0' + busno), &m);
- if ( RTEMS_SUCCESSFUL != sc ) {
- LIBUNLOCK ();
- rtems_panic (DRVNM "Unable to create bus lock");
- } else {
- bus->mutex = m;
- }
+ if (bus->mutex == RTEMS_ID_NONE) {
+ /*
+ * Nobody is holding the bus mutex - it's not there. Create it on the fly.
+ */
+ LIBLOCK ();
+ if (bus->mutex == RTEMS_ID_NONE) {
+ rtems_id m = RTEMS_ID_NONE;
+ rtems_status_code sc = mutexCreate (
+ rtems_build_name ('i', '2', 'c', '0' + busno),
+ &m
+ );
+ if (sc != RTEMS_SUCCESSFUL) {
+ LIBUNLOCK ();
+ rtems_panic (DRVNM "Unable to create bus lock");
+ return;
+ }
+ bus->mutex = m;
+ }
+ LIBUNLOCK ();
}
- /* count number of people waiting on this bus; only the last one deletes the mutex */
- bus->waiting++;
- LIBUNLOCK ();
+
/* Now lock this bus */
LOCK (bus->mutex);
}
@@ -201,12 +205,7 @@ static void
unlock_bus (int busno)
{
struct i2cbus *bus = &busses[busno];
- LIBLOCK ();
UNLOCK (bus->mutex);
- if (!--bus->waiting) {
- rtems_semaphore_delete (bus->mutex);
- }
- LIBUNLOCK ();
}
/* Note that 'arg' is always passed in as NULL */
@@ -226,7 +225,7 @@ rtems_i2c_init (rtems_device_major_number major, rtems_device_minor_number minor
is_initialized = true;
rtems_libi2c_major = major;
} else {
- libmutex = 0;
+ libmutex = RTEMS_ID_NONE;
}
return rval;
}
@@ -370,10 +369,11 @@ rtems_libi2c_initialize (void)
safe_printf(
DRVNM "Claiming driver slot failed (rtems status code %i)\n",
sc);
- if ( libmutex )
- rtems_semaphore_delete (libmutex);
- libmutex = 0;
- is_initialized = false;
+ if (libmutex != RTEMS_ID_NONE) {
+ rtems_semaphore_delete (libmutex);
+ }
+ libmutex = RTEMS_ID_NONE;
+ is_initialized = false;
return -1;
}
@@ -417,7 +417,7 @@ rtems_libi2c_register_bus (const char *name, rtems_libi2c_bus_t * bus)
/* should be a directory since name terminates in '/' */
- if (!libmutex) {
+ if (libmutex == RTEMS_ID_NONE) {
safe_printf ( DRVNM "Library not initialized\n");
return -RTEMS_NOT_DEFINED;
}
@@ -432,9 +432,8 @@ rtems_libi2c_register_bus (const char *name, rtems_libi2c_bus_t * bus)
if (!busses[i].bush) {
/* found a free slot */
busses[i].bush = bus;
- busses[i].mutex = 0;
- busses[i].waiting = 0;
- busses[i].started = 0;
+ busses[i].mutex = RTEMS_ID_NONE;
+ busses[i].started = false;
if (!name)
sprintf (nmcpy + strlen (nmcpy), "%i", i);
@@ -497,7 +496,7 @@ rtems_libi2c_send_start (rtems_device_minor_number minor)
unlock_bus (busno);
} else {
/* successful 1st start; keep bus locked until stop is sent */
- busses[busno].started = 1;
+ busses[busno].started = true;
}
return rval;
}
@@ -513,7 +512,7 @@ rtems_libi2c_send_stop (rtems_device_minor_number minor)
rval = bush->ops->send_stop (bush);
- busses[busno].started = 0;
+ busses[busno].started = false;
unlock_bus (busno);
return rval;
@@ -693,7 +692,7 @@ rtems_libi2c_register_drv (const char *name, rtems_libi2c_drv_t * drvtbl,
rtems_status_code err;
rtems_device_minor_number minor;
- if (!libmutex) {
+ if (libmutex == RTEMS_ID_NONE) {
safe_printf ( DRVNM "Library not initialized\n");
return -RTEMS_NOT_DEFINED;
}
diff --git a/cpukit/libi2c/libi2c.h b/cpukit/libi2c/libi2c.h
index fa0a5850ea..3ab4432b9f 100644
--- a/cpukit/libi2c/libi2c.h
+++ b/cpukit/libi2c/libi2c.h
@@ -1,3 +1,11 @@
+/**
+ * @file
+ *
+ * @ingroup libi2c
+ *
+ * @brief I2C library.
+ */
+
#ifndef _RTEMS_LIBI2C_H
#define _RTEMS_LIBI2C_H
/*$Id$*/
@@ -55,6 +63,14 @@
extern "C" {
#endif
+/**
+ * @defgroup libi2c I2C Library
+ *
+ * @brief I2C library.
+ *
+ * @{
+ */
+
/* Simple I2C driver API */
/* Initialize the libary - may fail if no semaphore or no driver slot is available */
@@ -485,6 +501,8 @@ typedef struct {
void *arg;
} rtems_libi2c_read_write_async_t;
+/** @} */
+
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/rtems/include/rtems.h b/cpukit/rtems/include/rtems.h
index 4bc89d704e..ec7db33254 100644
--- a/cpukit/rtems/include/rtems.h
+++ b/cpukit/rtems/include/rtems.h
@@ -1,8 +1,9 @@
/**
- * @file rtems.h
+ * @file
*
- * This include file provides the public interface to the RTEMS Classic
- * API.
+ * @ingroup ClassicRTEMS
+ *
+ * @brief Provides the public interface to the RTEMS Classic API.
*/
/* COPYRIGHT (c) 1989-2008.
@@ -19,12 +20,12 @@
#define _RTEMS_H
/**
- * @defgroup ClassicRTEMS Classic API RTEMS Header
+ * @defgroup ClassicRTEMS RTEMS Classic API
+ *
+ * RTEMS Classic API definitions and modules.
*
- * This encapsulates functionality which is specific to the Classic API
- * and generally shared across the various object classes.
+ * @{
*/
-/**@{*/
#ifdef __cplusplus
extern "C" {
@@ -33,13 +34,13 @@ extern "C" {
#if (!defined(__RTEMS_VIOLATE_KERNEL_VISIBILITY__)) && \
(!defined(__RTEMS_INSIDE__))
/**
- * @brief Compiling RTEMS Application Macro
+ * @brief Compiling RTEMS application macro.
*
- * Unless told otherwise, the RTEMS include files will hide some stuff
- * from normal application code. Defining this crosses a boundary which
- * is undesirable since it means your application is using RTEMS features
- * which are not included in the formally defined and supported API.
- * Define this at your own risk.
+ * Unless told otherwise, the RTEMS include files will hide some stuff from
+ * normal application code. Defining this crosses a boundary which is
+ * undesirable since it means your application is using RTEMS features which
+ * are not included in the formally defined and supported API. Define this at
+ * your own risk.
*/
#define __RTEMS_APPLICATION__
#endif
@@ -78,17 +79,13 @@ extern "C" {
#include <rtems/score/sysstate.h>
/**
- * @brief Obtain the RTEMS Version String
- *
- * This method may be used to obtain the RTEMS version string.
- *
- * @return This method returns a pointer to the version string.
+ * @brief Returns the pointer to the RTEMS version string.
*/
const char *rtems_get_version_string(void);
/**
- * This constant indicates whether this processor variant has
- * hardware floating point support.
+ * @brief Indicates whether this processor variant has hardware floating point
+ * support.
*/
#define RTEMS_HAS_HARDWARE_FP CPU_HARDWARE_FP
@@ -97,28 +94,26 @@ const char *rtems_get_version_string(void);
**********************************************************************/
/**
- * This constant indicates that the search is across all nodes.
+ * @brief Indicates that a search is across all nodes.
*/
#define RTEMS_SEARCH_ALL_NODES OBJECTS_SEARCH_ALL_NODES
/**
- * This constant indicates that the search is across all nodes
- * except the one the call is made from.
+ * @brief Indicates that a search is across all nodes except the one the call
+ * is made from.
*/
#define RTEMS_SEARCH_OTHER_NODES OBJECTS_SEARCH_OTHER_NODES
/**
- * This constant indicates that the search is to be restricted
- * to the local node.
+ * @brief Indicates that the search is to be restricted to the local node.
*/
#define RTEMS_SEARCH_LOCAL_NODE OBJECTS_SEARCH_LOCAL_NODE
/**
- * This constant indicates that the caller wants to obtain the
- * name of the currently executing thread.
+ * @brief Indicates that the caller wants to obtain the name of the currently
+ * executing thread.
*
- * @note This constant is only meaningful when obtaining the name
- * of a task.
+ * This constant is only meaningful when obtaining the name of a task.
*/
#define RTEMS_WHO_AM_I OBJECTS_WHO_AM_I
@@ -127,61 +122,61 @@ const char *rtems_get_version_string(void);
**********************************************************************/
/**
- * This constant is the lowest valid valid for the index portion
- * of an object Id.
+ * @brief Lowest valid index value for the index portion of an object
+ * identifier.
*/
#define RTEMS_OBJECT_ID_INITIAL_INDEX OBJECTS_ID_INITIAL_INDEX
/**
- * This constant is the maximum valid valid for the index portion
- * of an object Id.
+ * @brief Maximum valid index value for the index portion of an object
+ * identifier.
*/
#define RTEMS_OBJECT_ID_FINAL_INDEX OBJECTS_ID_FINAL_INDEX
/**
- * This method returns the Id of the object with the lowest
- * valid index valud.
+ * @brief Returns the identifier of the object with the lowest valid index
+ * value.
*
- * @param[in] _api is the API of the object
- * @param[in] _class is the Object Class of the object
- * @param[in] _node is the node where the object resides
+ * The object is specified by the API @a _api, the object class @a _class and
+ * the node @a _node where the object resides.
*/
#define RTEMS_OBJECT_ID_INITIAL(_api, _class, _node) \
OBJECTS_ID_INITIAL(_api, _class, _node)
/**
- * This constant is the maximum valid object Id.
+ * @brief Maximum valid object identifier.
*/
#define RTEMS_OBJECT_ID_FINAL OBJECTS_ID_FINAL
/**
- * The following constant defines the minimum stack size which every
- * thread must exceed.
+ * @brief Minimum stack size which every thread must exceed.
*/
#define RTEMS_MINIMUM_STACK_SIZE STACK_MINIMUM_SIZE
/**
- * The following constant is used to specify that the task should
- * be created with the configured minimum stack size.
+ * @brief Specifies that the task should be created with the configured minimum
+ * stack size.
*/
#define RTEMS_CONFIGURED_MINIMUM_STACK_SIZE 0
/**
- * Constant for indefinite wait. (actually an illegal interval)
+ * @brief Constant for indefinite wait.
+ *
+ * This is actually an illegal interval value.
*/
#define RTEMS_NO_TIMEOUT WATCHDOG_NO_TIMEOUT
/**
- * An MPCI must support packets of at least this size.
+ * @brief An MPCI must support packets of at least this size.
*/
#define RTEMS_MINIMUM_PACKET_SIZE MP_PACKET_MINIMUM_PACKET_SIZE
/**
- * The following constant defines the number of uint32_t's
- * in a packet which must be converted to native format in a
- * heterogeneous system. In packets longer than
- * MP_PACKET_MINIMUN_HETERO_CONVERSION uint32_t's, some of the "extra" data
- * may a user message buffer which is not automatically endian swapped.
+ * @brief Defines the count of @c uint32_t numbers in a packet which must be
+ * converted to native format in a heterogeneous system.
+ *
+ * In packets longer than this value, some of the extra data may be a user
+ * message buffer which is not automatically endian swapped.
*/
#define RTEMS_MINIMUN_HETERO_CONVERSION MP_PACKET_MINIMUN_HETERO_CONVERSION
diff --git a/cpukit/rtems/include/rtems/rtems/asr.h b/cpukit/rtems/include/rtems/rtems/asr.h
index ea5fab8538..d733bd0626 100644
--- a/cpukit/rtems/include/rtems/rtems/asr.h
+++ b/cpukit/rtems/include/rtems/rtems/asr.h
@@ -26,7 +26,9 @@ extern "C" {
#endif
/**
- * @defgroup ClassicASR Classic API ASR Support
+ * @defgroup ClassicASR ASR Support
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/attr.h b/cpukit/rtems/include/rtems/rtems/attr.h
index 693cfdbaa9..5b3480f967 100644
--- a/cpukit/rtems/include/rtems/rtems/attr.h
+++ b/cpukit/rtems/include/rtems/rtems/attr.h
@@ -23,7 +23,9 @@ extern "C" {
#endif
/**
- * @defgroup ClassicAttributes Classic API Attributes
+ * @defgroup ClassicAttributes Attributes
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which defines and manages the
* set of Classic API object attributes.
diff --git a/cpukit/rtems/include/rtems/rtems/barrier.h b/cpukit/rtems/include/rtems/rtems/barrier.h
index 19e32e4a78..d598bd101b 100644
--- a/cpukit/rtems/include/rtems/rtems/barrier.h
+++ b/cpukit/rtems/include/rtems/rtems/barrier.h
@@ -27,7 +27,9 @@
#define _RTEMS_RTEMS_BARRIER_H
/**
- * @defgroup ClassicBarrier Classic API Barrier
+ * @defgroup ClassicBarrier Barriers
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/barriermp.h b/cpukit/rtems/include/rtems/rtems/barriermp.h
index db9622f490..1a20680665 100644
--- a/cpukit/rtems/include/rtems/rtems/barriermp.h
+++ b/cpukit/rtems/include/rtems/rtems/barriermp.h
@@ -19,7 +19,9 @@
#define _RTEMS_RTEMS_SEMMP_H
/**
- * @defgroup ClassicBarrierMP Classic API Barrier MP Support
+ * @defgroup ClassicBarrierMP Barrier MP Support
+ *
+ * @ingroup ClassicMP
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/cache.h b/cpukit/rtems/include/rtems/rtems/cache.h
index c73b1496ef..72aab56cea 100644
--- a/cpukit/rtems/include/rtems/rtems/cache.h
+++ b/cpukit/rtems/include/rtems/rtems/cache.h
@@ -38,7 +38,9 @@ extern "C" {
#include <sys/types.h>
/**
- * @defgroup ClassicCache Classic API Cache
+ * @defgroup ClassicCache Cache
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/clock.h b/cpukit/rtems/include/rtems/rtems/clock.h
index e638acc030..124d04e8d8 100644
--- a/cpukit/rtems/include/rtems/rtems/clock.h
+++ b/cpukit/rtems/include/rtems/rtems/clock.h
@@ -35,7 +35,9 @@
#include <sys/time.h> /* struct timeval */
/**
- * @defgroup ClassicClock Classic API Clock
+ * @defgroup ClassicClock Clocks
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/config.h b/cpukit/rtems/include/rtems/rtems/config.h
index dc69af0067..4b6ea93bc2 100644
--- a/cpukit/rtems/include/rtems/rtems/config.h
+++ b/cpukit/rtems/include/rtems/rtems/config.h
@@ -26,7 +26,9 @@ extern "C" {
#endif
/**
- * @defgroup ClassicConfig Classic API Configuration
+ * @defgroup ClassicConfig Configuration
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/dpmem.h b/cpukit/rtems/include/rtems/rtems/dpmem.h
index 3c4dce1499..a511024856 100644
--- a/cpukit/rtems/include/rtems/rtems/dpmem.h
+++ b/cpukit/rtems/include/rtems/rtems/dpmem.h
@@ -48,7 +48,9 @@ extern "C" {
#include <rtems/rtems/status.h>
/**
- * @defgroup ClassicDPMEM Classic API Dual Ported Memory
+ * @defgroup ClassicDPMEM Dual Ported Memory
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality related to the
* Classic API Dual Ported Memory Manager.
diff --git a/cpukit/rtems/include/rtems/rtems/event.h b/cpukit/rtems/include/rtems/rtems/event.h
index fcc2b4b4b5..2ac4692171 100644
--- a/cpukit/rtems/include/rtems/rtems/event.h
+++ b/cpukit/rtems/include/rtems/rtems/event.h
@@ -49,7 +49,9 @@ extern "C" {
#include <rtems/rtems/eventset.h>
/**
- * @defgroup ClassicEvent Classic API Event
+ * @defgroup ClassicEvent Events
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/eventmp.h b/cpukit/rtems/include/rtems/rtems/eventmp.h
index 954d9042f9..bc44fe6aab 100644
--- a/cpukit/rtems/include/rtems/rtems/eventmp.h
+++ b/cpukit/rtems/include/rtems/rtems/eventmp.h
@@ -29,7 +29,9 @@ extern "C" {
#include <rtems/score/watchdog.h>
/**
- * @defgroup ClassicEventMP Classic API Event MP Support
+ * @defgroup ClassicEventMP Event MP Support
+ *
+ * @ingroup ClassicMP
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/eventset.h b/cpukit/rtems/include/rtems/rtems/eventset.h
index e8e50bd06f..679934f22b 100644
--- a/cpukit/rtems/include/rtems/rtems/eventset.h
+++ b/cpukit/rtems/include/rtems/rtems/eventset.h
@@ -20,7 +20,9 @@
#define _RTEMS_RTEMS_EVENTSET_H
/**
- * @defgroup ClassicEventSet Classic API Event Set
+ * @defgroup ClassicEventSet Event Sets
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality related to Classic API
* Event Sets. These are used by the Classic API Event Manager.
diff --git a/cpukit/rtems/include/rtems/rtems/intr.h b/cpukit/rtems/include/rtems/rtems/intr.h
index 747c14420f..1576416879 100644
--- a/cpukit/rtems/include/rtems/rtems/intr.h
+++ b/cpukit/rtems/include/rtems/rtems/intr.h
@@ -27,7 +27,9 @@ extern "C" {
#include <rtems/score/isr.h>
/**
- * @defgroup ClassicINTR Classic API Interrupt
+ * @defgroup ClassicINTR Interrupts
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/message.h b/cpukit/rtems/include/rtems/rtems/message.h
index aab42b6b1f..772f9d3654 100644
--- a/cpukit/rtems/include/rtems/rtems/message.h
+++ b/cpukit/rtems/include/rtems/rtems/message.h
@@ -53,7 +53,9 @@ extern "C" {
#include <rtems/score/coremsg.h>
/**
- * @defgroup ClassicMessageQueue Classic API Message Queue
+ * @defgroup ClassicMessageQueue Message Queues
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/modes.h b/cpukit/rtems/include/rtems/rtems/modes.h
index 596425643e..b531a27b5d 100644
--- a/cpukit/rtems/include/rtems/rtems/modes.h
+++ b/cpukit/rtems/include/rtems/rtems/modes.h
@@ -19,7 +19,9 @@
#define _RTEMS_RTEMS_MODES_H
/**
- * @defgroup ClassicModes Classic API Modes
+ * @defgroup ClassicModes Modes
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/mp.h b/cpukit/rtems/include/rtems/rtems/mp.h
index 8893e1fef0..1f8252aac3 100644
--- a/cpukit/rtems/include/rtems/rtems/mp.h
+++ b/cpukit/rtems/include/rtems/rtems/mp.h
@@ -19,7 +19,9 @@
#define _RTEMS_RTEMS_MP_H
/**
- * @defgroup ClassicMP Classic API Multiprocessing
+ * @defgroup ClassicMP Multiprocessing
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/msgmp.h b/cpukit/rtems/include/rtems/rtems/msgmp.h
index 3b7d82357a..8aa5f533ae 100644
--- a/cpukit/rtems/include/rtems/rtems/msgmp.h
+++ b/cpukit/rtems/include/rtems/rtems/msgmp.h
@@ -30,7 +30,9 @@ extern "C" {
#include <rtems/score/watchdog.h>
/**
- * @defgroup ClassicMsgMP Classic API Message Queue MP Support
+ * @defgroup ClassicMsgMP Message Queue MP Support
+ *
+ * @ingroup ClassicMP
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/object.h b/cpukit/rtems/include/rtems/rtems/object.h
index 58ca9f8b6c..d419a3b095 100644
--- a/cpukit/rtems/include/rtems/rtems/object.h
+++ b/cpukit/rtems/include/rtems/rtems/object.h
@@ -25,7 +25,9 @@ extern "C" {
#endif
/**
- * @defgroup ClassicClassInfo Classic API Class Information
+ * @defgroup ClassicClassInfo Object Class Information
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/part.h b/cpukit/rtems/include/rtems/rtems/part.h
index 84245aa78b..8a41ad2ee6 100644
--- a/cpukit/rtems/include/rtems/rtems/part.h
+++ b/cpukit/rtems/include/rtems/rtems/part.h
@@ -50,7 +50,9 @@ extern "C" {
#include <rtems/rtems/types.h>
/**
- * @defgroup ClassicPart Classic API Partition
+ * @defgroup ClassicPart Partitions
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality related to the
* Classic API Partition Manager.
diff --git a/cpukit/rtems/include/rtems/rtems/partmp.h b/cpukit/rtems/include/rtems/rtems/partmp.h
index 69a6646746..f36f0e259c 100644
--- a/cpukit/rtems/include/rtems/rtems/partmp.h
+++ b/cpukit/rtems/include/rtems/rtems/partmp.h
@@ -30,7 +30,9 @@ extern "C" {
#include <rtems/rtems/part.h>
/**
- * @defgroup ClassicPartMP Classic API Partition MP Support
+ * @defgroup ClassicPartMP Partition MP Support
+ *
+ * @ingroup ClassicMP
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h
index 2959acea72..925efda1a9 100644
--- a/cpukit/rtems/include/rtems/rtems/ratemon.h
+++ b/cpukit/rtems/include/rtems/rtems/ratemon.h
@@ -40,7 +40,9 @@
#include <rtems/bspIo.h>
/**
- * @defgroup ClassicRateMon Classic API Rate Monotonic
+ * @defgroup ClassicRateMon Rate Monotonic Scheduler
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality related to the
* Classic API Rate Monotonic Manager.
diff --git a/cpukit/rtems/include/rtems/rtems/region.h b/cpukit/rtems/include/rtems/rtems/region.h
index a86aae57cb..938be4e77d 100644
--- a/cpukit/rtems/include/rtems/rtems/region.h
+++ b/cpukit/rtems/include/rtems/rtems/region.h
@@ -38,7 +38,9 @@
#include <rtems/rtems/types.h>
/**
- * @defgroup ClassicRegion Classic API Region
+ * @defgroup ClassicRegion Regions
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/regionmp.h b/cpukit/rtems/include/rtems/rtems/regionmp.h
index ba6816bb3d..b748aba8e8 100644
--- a/cpukit/rtems/include/rtems/rtems/regionmp.h
+++ b/cpukit/rtems/include/rtems/rtems/regionmp.h
@@ -30,7 +30,9 @@ extern "C" {
#include <rtems/rtems/region.h>
/**
- * @defgroup ClassicRegionMP Classic API Region MP Support
+ * @defgroup ClassicRegionMP Region MP Support
+ *
+ * @ingroup ClassicMP
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/rtemsapi.h b/cpukit/rtems/include/rtems/rtems/rtemsapi.h
index da703813e3..d75dbb0490 100644
--- a/cpukit/rtems/include/rtems/rtems/rtemsapi.h
+++ b/cpukit/rtems/include/rtems/rtems/rtemsapi.h
@@ -20,11 +20,6 @@
#include <rtems/config.h>
/**
- * @addtogroup ClassicRTEMS
- * @{
- */
-
-/**
* _RTEMS_API_Initialize
*
* This routine initializes the RTEMS API by invoking the initialization
diff --git a/cpukit/rtems/include/rtems/rtems/sem.h b/cpukit/rtems/include/rtems/rtems/sem.h
index e7ded959c6..406e1541f5 100644
--- a/cpukit/rtems/include/rtems/rtems/sem.h
+++ b/cpukit/rtems/include/rtems/rtems/sem.h
@@ -52,7 +52,9 @@ extern "C" {
#include <rtems/score/coresem.h>
/**
- * @defgroup ClassicSem Classic API Semaphore
+ * @defgroup ClassicSem Semaphores
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality related to the Classic API
* Semaphore Manager.
diff --git a/cpukit/rtems/include/rtems/rtems/semmp.h b/cpukit/rtems/include/rtems/rtems/semmp.h
index 248e4f385a..1be30ef467 100644
--- a/cpukit/rtems/include/rtems/rtems/semmp.h
+++ b/cpukit/rtems/include/rtems/rtems/semmp.h
@@ -30,7 +30,9 @@ extern "C" {
#include <rtems/score/watchdog.h>
/**
- * @defgroup ClassicSEM Classic API Semaphore MP Support
+ * @defgroup ClassicSEM Semaphore MP Support
+ *
+ * @ingroup ClassicMP
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/signal.h b/cpukit/rtems/include/rtems/rtems/signal.h
index e137feb84d..5f3be2a606 100644
--- a/cpukit/rtems/include/rtems/rtems/signal.h
+++ b/cpukit/rtems/include/rtems/rtems/signal.h
@@ -25,7 +25,9 @@
#define _RTEMS_RTEMS_SIGNAL_H
/**
- * @defgroup ClassicSignal Classic API Signal
+ * @defgroup ClassicSignal Signals
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/signalmp.h b/cpukit/rtems/include/rtems/rtems/signalmp.h
index fec8812230..49fc37b0d0 100644
--- a/cpukit/rtems/include/rtems/rtems/signalmp.h
+++ b/cpukit/rtems/include/rtems/rtems/signalmp.h
@@ -29,7 +29,9 @@ extern "C" {
#include <rtems/score/watchdog.h>
/**
- * @defgroup ClassicSignalMP Classic API Signal MP Support
+ * @defgroup ClassicSignalMP Signal MP Support
+ *
+ * @ingroup ClassicMP
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/status.h b/cpukit/rtems/include/rtems/rtems/status.h
index 1c5b4d05f7..0f42a8b54d 100644
--- a/cpukit/rtems/include/rtems/rtems/status.h
+++ b/cpukit/rtems/include/rtems/rtems/status.h
@@ -19,7 +19,9 @@
#define _RTEMS_RTEMS_STATUS_H
/**
- * @defgroup ClassicStatus Classic API Status
+ * @defgroup ClassicStatus Status Codes
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/support.h b/cpukit/rtems/include/rtems/rtems/support.h
index 8d8a85a825..220411d984 100644
--- a/cpukit/rtems/include/rtems/rtems/support.h
+++ b/cpukit/rtems/include/rtems/rtems/support.h
@@ -1,8 +1,11 @@
/**
- * @file rtems/rtems/support.h
+ * @file
*
- * This include file contains information about support functions for
- * the RTEMS API.
+ * @ingroup ClassicRTEMS
+ *
+ * @ingroup ClassicRTEMSWorkspace
+ *
+ * @brief Classic API support.
*/
/* COPYRIGHT (c) 1989-2008.
@@ -25,58 +28,61 @@ extern "C" {
#include <rtems/rtems/types.h>
/**
- * @addtogroup ClassicRTEMS
- * @{
+ * @addtogroup ClassicRTEMS
+ *
+ * @{
*/
/**
- * @brief milliseconds to microseconds
- *
- * This is the public milliseconds to microseconds conversion.
+ * @brief Returns the number of micro seconds for the milli seconds value @a _ms.
*/
#define RTEMS_MILLISECONDS_TO_MICROSECONDS(_ms) \
TOD_MILLISECONDS_TO_MICROSECONDS(_ms)
/**
- * @brief milliseconds to ticks
- *
- * This is the public milliseconds to ticks conversion.
+ * @brief Returns the number of ticks for the milli seconds value @a _ms.
*/
#define RTEMS_MILLISECONDS_TO_TICKS(_ms) \
(TOD_MILLISECONDS_TO_MICROSECONDS(_ms) / \
rtems_configuration_get_microseconds_per_tick())
/**
- * @brief microseconds to ticks
- *
- * This is the public microseconds to tick conversion.
+ * @brief Returns the number of ticks for the micro seconds value @a _us.
*/
-#define RTEMS_MICROSECONDS_TO_TICKS(_ms) \
- ((_ms) / rtems_configuration_get_microseconds_per_tick())
+#define RTEMS_MICROSECONDS_TO_TICKS(_us) \
+ ((_us) / rtems_configuration_get_microseconds_per_tick())
+
+/** @} */
/**
- * @brief get workspace information
+ * @defgroup ClassicRTEMSWorkspace Workspace
*
- * This returns information about the heap that is used as
- * the RTEMS Executive Workspace.
+ * @ingroup ClassicRTEMS
*
- * @param[in] the_info
+ * Workspace definitions.
*
- * @return true if successful
+ * @{
+ */
+
+/**
+ * @brief Gets workspace information.
+ *
+ * Returns information about the heap that is used as the RTEMS Executive
+ * Workspace in @a the_info.
+ *
+ * Returns @c true if successful, and @a false otherwise.
*/
bool rtems_workspace_get_information(
Heap_Information_block *the_info
);
/**
- * @brief allocate memory from workspace
+ * @brief Allocates memory from the workspace.
*
- * This allocates memory from the the RTEMS Executive Workspace.
+ * A number of @a bytes bytes will be allocated from the RTEMS Executive
+ * Workspace and returned in @a pointer.
*
- * @param[in] bytes is the number of bytes to allocate
- * @param[in] pointer is the returned pointer to allocated memory
- *
- * @return true if successful
+ * Returns @c true if successful, and @a false otherwise.
*/
bool rtems_workspace_allocate(
size_t bytes,
@@ -84,19 +90,19 @@ bool rtems_workspace_allocate(
);
/**
- * @brief free memory back to the workspace
- *
- * This frees memory that was allocated from
- * the RTEMS Executive Workspace.
+ * @brief Frees memory allocated from the workspace.
*
- * @param[in] pointer is the allocated workspace
+ * This frees the memory indicated by @a pointer that was allocated from the
+ * RTEMS Executive Workspace.
*
- * @return true if successful
+ * Returns @c true if successful, and @a false otherwise.
*/
bool rtems_workspace_free(
void *pointer
);
+/** @} */
+
#ifndef __RTEMS_APPLICATION__
#include <rtems/rtems/support.inl>
#endif
diff --git a/cpukit/rtems/include/rtems/rtems/taskmp.h b/cpukit/rtems/include/rtems/rtems/taskmp.h
index 726772f618..16bf205d8d 100644
--- a/cpukit/rtems/include/rtems/rtems/taskmp.h
+++ b/cpukit/rtems/include/rtems/rtems/taskmp.h
@@ -26,7 +26,9 @@
#include <rtems/score/thread.h>
/**
- * @defgroup ClassicTaskMP Classic API Task MP Support
+ * @defgroup ClassicTaskMP Task MP Support
+ *
+ * @ingroup ClassicMP
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h
index 5aa1475f70..049e709fd6 100644
--- a/cpukit/rtems/include/rtems/rtems/tasks.h
+++ b/cpukit/rtems/include/rtems/rtems/tasks.h
@@ -55,7 +55,9 @@
#endif
/**
- * @defgroup ClassicTasks Classic API Tasks
+ * @defgroup ClassicTasks Tasks
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which X XX
*/
diff --git a/cpukit/rtems/include/rtems/rtems/timer.h b/cpukit/rtems/include/rtems/rtems/timer.h
index f3d375818f..deac24324a 100644
--- a/cpukit/rtems/include/rtems/rtems/timer.h
+++ b/cpukit/rtems/include/rtems/rtems/timer.h
@@ -56,7 +56,9 @@ extern "C" {
#include <rtems/rtems/attr.h>
/**
- * @defgroup ClassicTimer Classic API Timer
+ * @defgroup ClassicTimer Timers
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality related to the Classic API Timer
* Manager. This manager provides functionality which allows the
diff --git a/cpukit/rtems/include/rtems/rtems/types.h b/cpukit/rtems/include/rtems/rtems/types.h
index 0fbf7003ca..4cd4dd5a0d 100644
--- a/cpukit/rtems/include/rtems/rtems/types.h
+++ b/cpukit/rtems/include/rtems/rtems/types.h
@@ -18,7 +18,9 @@
#define _RTEMS_RTEMS_TYPES_H
/**
- * @defgroup ClassicTypes Classic API Types
+ * @defgroup ClassicTypes Types
+ *
+ * @ingroup ClassicRTEMS
*
* This encapsulates functionality which XXX
*/
diff --git a/cpukit/rtems/inline/rtems/rtems/support.inl b/cpukit/rtems/inline/rtems/rtems/support.inl
index 23becf8497..bd79300e8a 100644
--- a/cpukit/rtems/inline/rtems/rtems/support.inl
+++ b/cpukit/rtems/inline/rtems/rtems/support.inl
@@ -1,8 +1,9 @@
/**
- * @file rtems/rtems/support.inl
+ * @file
*
- * This include file contains the static inline implementation of all
- * of the inlined routines specific to the RTEMS API.
+ * @ingroup ClassicRTEMS
+ *
+ * @brief Classic API support.
*/
/* COPYRIGHT (c) 1989-2008.
@@ -23,14 +24,13 @@
#define _RTEMS_RTEMS_SUPPORT_INL
/**
- * @addtogroup ClassicSupport
- * @{
+ * @addtogroup ClassicRTEMS
+ *
+ * @{
*/
/**
- * rtems_is_name_valid
- *
- * This function returns TRUE if the name is valid, and FALSE otherwise.
+ * @brief Returns @c true if the name is valid, and @c false otherwise.
*/
RTEMS_INLINE_ROUTINE bool rtems_is_name_valid (
rtems_name name
@@ -40,10 +40,8 @@ RTEMS_INLINE_ROUTINE bool rtems_is_name_valid (
}
/**
- * rtems_name_to_characters
- *
- * This function breaks the object name into the four component
- * characters C1, C2, C3, and C4.
+ * @brief Breaks the object name into the four component characters @a c1,
+ * @a c2, @a c3, and @a c4.
*/
RTEMS_INLINE_ROUTINE void rtems_name_to_characters(
rtems_name name,
@@ -59,7 +57,7 @@ RTEMS_INLINE_ROUTINE void rtems_name_to_characters(
*c4 = (char) ( name & 0xff);
}
-/**@}*/
+/** @} */
#endif
/* end of include file */