summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2012-12-13 18:20:57 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2012-12-13 18:20:57 -0600
commit074fafd9eb23d43d246151804e61412809681369 (patch)
treea97f2dd238a89461175a223490b5821a92993bdc
parentMerge branch 'master' of ssh://git.rtems.org/home/joel/git/rtems (diff)
parentposix: Doxygen enhancement task #4 (diff)
downloadrtems-074fafd9eb23d43d246151804e61412809681369.tar.bz2
Merge branch 'master' of ssh://git.rtems.org/data/git/rtems
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/configure.ac23
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/console/console-config.c60
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c29
-rw-r--r--cpukit/libcsupport/include/rtems/assoc.h33
-rw-r--r--cpukit/libcsupport/include/rtems/deviceio.h2
-rw-r--r--cpukit/libcsupport/include/rtems/error.h61
-rw-r--r--cpukit/libcsupport/include/rtems/gxx_wrappers.h8
-rw-r--r--cpukit/libcsupport/include/rtems/libcsupport.h27
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h75
-rw-r--r--cpukit/libcsupport/include/rtems/libio_.h29
-rw-r--r--cpukit/libcsupport/include/rtems/malloc.h13
-rw-r--r--cpukit/libcsupport/include/rtems/termiostypes.h32
-rw-r--r--cpukit/libcsupport/include/sys/ioccom.h1
-rw-r--r--cpukit/libcsupport/include/sys/termios.h11
-rw-r--r--cpukit/libcsupport/include/zilog/z8530.h2
-rw-r--r--cpukit/libcsupport/include/zilog/z8536.h2
-rw-r--r--cpukit/libcsupport/src/__assert.c15
-rw-r--r--cpukit/libcsupport/src/__getpid.c12
-rw-r--r--cpukit/libcsupport/src/__usrenv.c7
-rw-r--r--cpukit/libcsupport/src/_calloc_r.c9
-rw-r--r--cpukit/libcsupport/src/_free_r.c9
-rw-r--r--cpukit/libcsupport/src/_rename_r.c12
-rw-r--r--cpukit/libcsupport/src/assoclocalbyremote.c8
-rw-r--r--cpukit/libcsupport/src/assocnamebad.c13
-rw-r--r--cpukit/libcsupport/src/assocnamebylocal.c8
-rw-r--r--cpukit/libcsupport/src/assocnamebylocalbitfield.c8
-rw-r--r--cpukit/libcsupport/src/assocnamebyremotebitfield.c8
-rw-r--r--cpukit/libcsupport/src/assocptrbylocal.c8
-rw-r--r--cpukit/libcsupport/src/assocptrbyname.c8
-rw-r--r--cpukit/libcsupport/src/assocptrbyremote.c8
-rw-r--r--cpukit/libcsupport/src/assocremotebyname.c8
-rw-r--r--cpukit/libcsupport/src/base_fs.c19
-rw-r--r--cpukit/libcsupport/src/calloc.c9
-rw-r--r--cpukit/libcsupport/src/cfgetospeed.c12
-rw-r--r--cpukit/libcsupport/src/cfsetispeed.c12
-rw-r--r--cpukit/libcsupport/src/cfsetospeed.c12
-rw-r--r--cpukit/libcsupport/src/chmod.c12
-rw-r--r--cpukit/libcsupport/src/chown.c12
-rw-r--r--cpukit/libcsupport/src/clonenode.c7
-rw-r--r--cpukit/libcsupport/src/ctermid.c12
-rw-r--r--cpukit/libcsupport/src/dup2.c12
-rw-r--r--cpukit/libcsupport/src/envlock.c7
-rw-r--r--cpukit/libcsupport/src/error.c55
-rw-r--r--cpukit/libcsupport/src/fchdir.c12
-rw-r--r--cpukit/libcsupport/src/fchmod.c12
-rw-r--r--cpukit/libcsupport/src/fchown.c12
-rw-r--r--cpukit/libcsupport/src/flockfile.c10
-rw-r--r--cpukit/libcsupport/src/fpathconf.c12
-rw-r--r--cpukit/libcsupport/src/fsync.c12
-rw-r--r--cpukit/libcsupport/src/ftruncate.c9
-rw-r--r--cpukit/libcsupport/src/funlockfile.c11
-rw-r--r--cpukit/libcsupport/src/getdents.c22
-rw-r--r--cpukit/libcsupport/src/getegid.c10
-rw-r--r--cpukit/libcsupport/src/geteuid.c10
-rw-r--r--cpukit/libcsupport/src/getgid.c9
-rw-r--r--cpukit/libcsupport/src/getgroups.c10
-rw-r--r--cpukit/libcsupport/src/getpagesize.c9
-rw-r--r--cpukit/libcsupport/src/getpid.c19
-rw-r--r--cpukit/libcsupport/src/getppid.c10
-rw-r--r--cpukit/libcsupport/src/getpwent.c29
-rw-r--r--cpukit/libcsupport/src/getuid.c9
-rw-r--r--cpukit/libcsupport/src/gxx_wrappers.c9
-rw-r--r--cpukit/libcsupport/src/isatty.c7
-rw-r--r--cpukit/libcsupport/src/isatty_r.c16
-rw-r--r--cpukit/libcsupport/src/issetugid.c12
-rw-r--r--cpukit/libcsupport/src/link.c21
-rw-r--r--cpukit/libcsupport/src/lstat.c13
-rw-r--r--cpukit/libcsupport/src/malloc.c10
-rw-r--r--cpukit/libcsupport/src/malloc_deferred.c7
-rw-r--r--cpukit/libcsupport/src/malloc_report_statistics.c9
-rw-r--r--cpukit/libcsupport/src/malloc_statistics_helpers.c11
-rw-r--r--cpukit/libcsupport/src/malloc_walk.c9
-rw-r--r--cpukit/libcsupport/src/mallocgetheapptr.c9
-rw-r--r--cpukit/libcsupport/src/mallocinfo.c14
-rw-r--r--cpukit/libcsupport/src/mallocsetheapptr.c9
-rw-r--r--cpukit/libcsupport/src/mkdir.c12
-rw-r--r--cpukit/libcsupport/src/mkfifo.c12
-rw-r--r--cpukit/libcsupport/src/mknod.c18
-rw-r--r--cpukit/libcsupport/src/mount.c18
-rw-r--r--cpukit/libcsupport/src/newlibc_init.c11
-rw-r--r--cpukit/libcsupport/src/newlibc_reent.c9
-rw-r--r--cpukit/libcsupport/src/open.c21
-rw-r--r--cpukit/libcsupport/src/pathconf.c12
-rw-r--r--cpukit/libcsupport/src/pipe.c12
-rw-r--r--cpukit/libcsupport/src/printf_plugin.c7
-rw-r--r--cpukit/libcsupport/src/printk.c13
-rw-r--r--cpukit/libcsupport/src/printk_plugin.c7
-rw-r--r--cpukit/libcsupport/src/privateenv.c11
-rw-r--r--cpukit/libcsupport/src/putk.c11
-rw-r--r--cpukit/libcsupport/src/read.c21
-rw-r--r--cpukit/libcsupport/src/readdir_r.c13
-rw-r--r--cpukit/libcsupport/src/readlink.c12
-rw-r--r--cpukit/libcsupport/src/realloc.c9
-rw-r--r--cpukit/libcsupport/src/rmdir.c12
-rw-r--r--cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c7
-rw-r--r--cpukit/libcsupport/src/rtems_heap_greedy.c7
-rw-r--r--cpukit/libcsupport/src/rtems_memalign.c9
-rw-r--r--cpukit/libcsupport/src/rtems_putc.c7
-rw-r--r--cpukit/libcsupport/src/setegid.c2
-rw-r--r--cpukit/libcsupport/src/seteuid.c7
-rw-r--r--cpukit/libcsupport/src/setpgid.c10
-rw-r--r--cpukit/libcsupport/src/strlcat.c16
-rw-r--r--cpukit/libcsupport/src/sup_fs_deviceio.c7
-rw-r--r--cpukit/libcsupport/src/sup_fs_eval_path.c7
-rw-r--r--cpukit/libcsupport/src/sup_fs_eval_path_generic.c7
-rw-r--r--cpukit/libcsupport/src/sup_fs_exist_in_same_instance.c7
-rw-r--r--cpukit/libcsupport/src/sup_fs_next_token.c7
-rw-r--r--cpukit/libcsupport/src/sup_fs_node_type.c7
-rw-r--r--cpukit/libcsupport/src/symlink.c9
-rw-r--r--cpukit/libcsupport/src/sync.c22
-rw-r--r--cpukit/libcsupport/src/tcdrain.c12
-rw-r--r--cpukit/libcsupport/src/tcflow.c10
-rw-r--r--cpukit/libcsupport/src/tcflush.c35
-rw-r--r--cpukit/libcsupport/src/tcgetattr.c9
-rw-r--r--cpukit/libcsupport/src/tcgetpgrp.c12
-rw-r--r--cpukit/libcsupport/src/tcsendbreak.c9
-rw-r--r--cpukit/libcsupport/src/tcsetattr.c12
-rw-r--r--cpukit/libcsupport/src/tcsetpgrp.c12
-rw-r--r--cpukit/libcsupport/src/termios.c41
-rw-r--r--cpukit/libcsupport/src/termios_baud2index.c7
-rw-r--r--cpukit/libcsupport/src/termios_baud2num.c7
-rw-r--r--cpukit/libcsupport/src/termios_baudtable.c7
-rw-r--r--cpukit/libcsupport/src/termios_num2baud.c7
-rw-r--r--cpukit/libcsupport/src/termiosinitialize.c9
-rw-r--r--cpukit/libcsupport/src/truncate.c18
-rw-r--r--cpukit/libcsupport/src/umask.c12
-rw-r--r--cpukit/libcsupport/src/unlink.c21
-rw-r--r--cpukit/libcsupport/src/unmount.c20
-rw-r--r--cpukit/libcsupport/src/utimes.c7
-rw-r--r--cpukit/libcsupport/src/vprintk.c20
-rw-r--r--cpukit/libcsupport/src/write.c20
-rw-r--r--cpukit/libfs/src/devfs/devfs.h22
-rw-r--r--cpukit/libfs/src/devfs/devfs_eval.c7
-rw-r--r--cpukit/libfs/src/devfs/devfs_init.c7
-rw-r--r--cpukit/libfs/src/devfs/devfs_mknod.c7
-rw-r--r--cpukit/libfs/src/devfs/devfs_node_type.c7
-rw-r--r--cpukit/libfs/src/devfs/devioctl.c7
-rw-r--r--cpukit/libfs/src/devfs/devopen.c7
-rw-r--r--cpukit/libfs/src/devfs/devread.c7
-rw-r--r--cpukit/libfs/src/devfs/devwrite.c7
-rw-r--r--cpukit/libfs/src/dosfs/dosfs.h5
-rw-r--r--cpukit/libfs/src/dosfs/msdos_format.c190
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-bitmaps.h18
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-block-pos.h17
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-block.h18
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-buffer.h18
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-data.h18
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-dir-hash.h17
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-dir.h17
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-file-system-fwd.h18
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-file-system.h17
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-file.h17
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-group.h18
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-inode.h18
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-link.h18
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-mutex.h17
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-trace.h18
-rw-r--r--cpukit/posix/include/mqueue.h23
-rw-r--r--cpukit/posix/include/rtems/posix/cond.h12
-rw-r--r--cpukit/posix/include/rtems/posix/key.h10
-rw-r--r--cpukit/posix/include/rtems/posix/ptimer.h10
-rw-r--r--cpukit/posix/include/rtems/posix/threadsup.h13
-rw-r--r--cpukit/posix/include/rtems/posix/time.h7
-rw-r--r--cpukit/posix/include/rtems/posix/timer.h10
-rw-r--r--cpukit/posix/src/barrierattrgetpshared.c7
-rw-r--r--cpukit/posix/src/cleanuppush.c7
-rw-r--r--cpukit/posix/src/clocksettime.c7
-rw-r--r--cpukit/posix/src/cond.c7
-rw-r--r--cpukit/posix/src/condsignalsupp.c7
-rw-r--r--cpukit/posix/src/condtimedwait.c7
-rw-r--r--cpukit/posix/src/key.c7
-rw-r--r--cpukit/posix/src/mprotect.c7
-rw-r--r--cpukit/posix/src/mqueueunlink.c19
-rw-r--r--cpukit/posix/src/mutexattrgetprioceiling.c7
-rw-r--r--cpukit/posix/src/posixtimespecabsolutetimeout.c7
-rw-r--r--cpukit/posix/src/prwlocktrywrlock.c9
-rw-r--r--cpukit/posix/src/pspintrylock.c9
-rw-r--r--cpukit/posix/src/pthreadexit.c11
-rw-r--r--cpukit/posix/src/setcancelstate.c7
-rw-r--r--cpukit/posix/src/sigemptyset.c9
-rw-r--r--cpukit/posix/src/sigpending.c9
-rw-r--r--cpukit/posix/src/sysconf.c7
-rw-r--r--cpukit/posix/src/timercreate.c7
-rw-r--r--cpukit/posix/src/timertsr.c7
-rw-r--r--cpukit/rtems/include/rtems/rtems/asr.h2
-rw-r--r--cpukit/rtems/include/rtems/rtems/barrier.h2
-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.h2
-rw-r--r--cpukit/rtems/include/rtems/rtems/event.h2
-rw-r--r--cpukit/rtems/include/rtems/rtems/eventset.h2
-rw-r--r--cpukit/rtems/include/rtems/rtems/message.h2
-rw-r--r--cpukit/rtems/include/rtems/rtems/modes.h2
-rw-r--r--cpukit/rtems/include/rtems/rtems/options.h2
-rw-r--r--cpukit/rtems/include/rtems/rtems/part.h2
-rw-r--r--cpukit/rtems/include/rtems/rtems/ratemon.h2
-rw-r--r--cpukit/rtems/include/rtems/rtems/region.h32
-rw-r--r--cpukit/rtems/include/rtems/rtems/status.h4
-rw-r--r--cpukit/rtems/include/rtems/rtems/timer.h2
-rw-r--r--cpukit/sapi/include/rtems/rbheap.h4
-rw-r--r--cpukit/score/include/rtems/debug.h4
-rw-r--r--testsuites/fstests/fsdosfsformat01/init.c71
-rw-r--r--testsuites/fstests/fsdosfssync01/init.c7
-rw-r--r--testsuites/libtests/termios02/init.c41
-rw-r--r--testsuites/libtests/termios02/termios02.scn6
205 files changed, 2029 insertions, 755 deletions
diff --git a/c/src/lib/libbsp/arm/lpc32xx/configure.ac b/c/src/lib/libbsp/arm/lpc32xx/configure.ac
index 6af65292f1..06be1da217 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/configure.ac
+++ b/c/src/lib/libbsp/arm/lpc32xx/configure.ac
@@ -43,24 +43,33 @@ RTEMS_BSPOPTS_HELP([LPC32XX_UART_1_BAUD],[baud for UART 1])
RTEMS_BSPOPTS_SET([LPC32XX_UART_2_BAUD],[*],[])
RTEMS_BSPOPTS_HELP([LPC32XX_UART_2_BAUD],[baud for UART 2])
+RTEMS_BSPOPTS_SET([LPC32XX_UART_3_BAUD],[*],[115200])
+RTEMS_BSPOPTS_HELP([LPC32XX_UART_3_BAUD],[baud for UART 3])
+
+RTEMS_BSPOPTS_SET([LPC32XX_UART_4_BAUD],[*],[115200])
+RTEMS_BSPOPTS_HELP([LPC32XX_UART_4_BAUD],[baud for UART 4])
+
+RTEMS_BSPOPTS_SET([LPC32XX_UART_5_BAUD],[*],[115200])
+RTEMS_BSPOPTS_HELP([LPC32XX_UART_5_BAUD],[baud for UART 5])
+
+RTEMS_BSPOPTS_SET([LPC32XX_UART_6_BAUD],[*],[115200])
+RTEMS_BSPOPTS_HELP([LPC32XX_UART_6_BAUD],[baud for UART 6])
+
RTEMS_BSPOPTS_SET([LPC32XX_UART_7_BAUD],[*],[])
RTEMS_BSPOPTS_HELP([LPC32XX_UART_7_BAUD],[baud for UART 7])
-RTEMS_BSPOPTS_SET([LPC32XX_CONFIG_U3CLK],[*],[])
+RTEMS_BSPOPTS_SET([LPC32XX_CONFIG_U3CLK],[*],[0x00001386])
RTEMS_BSPOPTS_HELP([LPC32XX_CONFIG_U3CLK],[clock configuration for UART 3])
-RTEMS_BSPOPTS_SET([LPC32XX_CONFIG_U4CLK],[*],[])
+RTEMS_BSPOPTS_SET([LPC32XX_CONFIG_U4CLK],[*],[0x00001386])
RTEMS_BSPOPTS_HELP([LPC32XX_CONFIG_U4CLK],[clock configuration for UART 4])
-RTEMS_BSPOPTS_SET([LPC32XX_CONFIG_U5CLK],[*],[0x00001386U])
+RTEMS_BSPOPTS_SET([LPC32XX_CONFIG_U5CLK],[*],[0x00001386])
RTEMS_BSPOPTS_HELP([LPC32XX_CONFIG_U5CLK],[clock configuration for UART 5])
-RTEMS_BSPOPTS_SET([LPC32XX_CONFIG_U6CLK],[*],[])
+RTEMS_BSPOPTS_SET([LPC32XX_CONFIG_U6CLK],[*],[0x00001386])
RTEMS_BSPOPTS_HELP([LPC32XX_CONFIG_U6CLK],[clock configuration for UART 6])
-RTEMS_BSPOPTS_SET([LPC32XX_CONFIG_UART_CLKMODE],[*],[0x00000200U])
-RTEMS_BSPOPTS_HELP([LPC32XX_CONFIG_UART_CLKMODE],[clock mode configuration for UARTs])
-
RTEMS_BSPOPTS_SET([LPC32XX_DISABLE_MMU],[*],[])
RTEMS_BSPOPTS_HELP([LPC32XX_DISABLE_MMU],[disable MMU])
diff --git a/c/src/lib/libbsp/arm/lpc32xx/console/console-config.c b/c/src/lib/libbsp/arm/lpc32xx/console/console-config.c
index d70f93ecd8..2428697604 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/console/console-config.c
+++ b/c/src/lib/libbsp/arm/lpc32xx/console/console-config.c
@@ -42,10 +42,40 @@ static void lpc32xx_uart_set_register(uint32_t addr, uint8_t i, uint8_t val)
reg [i] = val;
}
+#ifdef LPC32XX_UART_3_BAUD
+ static bool lpc32xx_uart_probe_3(int minor)
+ {
+ LPC32XX_UARTCLK_CTRL |= 1U << 0;
+ LPC32XX_U3CLK = LPC32XX_CONFIG_U3CLK;
+
+ return true;
+ }
+#endif
+
+#ifdef LPC32XX_UART_4_BAUD
+ static bool lpc32xx_uart_probe_4(int minor)
+ {
+ LPC32XX_UARTCLK_CTRL |= 1U << 1;
+ LPC32XX_U4CLK = LPC32XX_CONFIG_U4CLK;
+
+ return true;
+ }
+#endif
+
+#ifdef LPC32XX_UART_6_BAUD
+ static bool lpc32xx_uart_probe_6(int minor)
+ {
+ LPC32XX_UARTCLK_CTRL |= 1U << 3;
+ LPC32XX_U6CLK = LPC32XX_CONFIG_U6CLK;
+
+ return true;
+ }
+#endif
+
/* FIXME: Console selection */
console_tbl Console_Configuration_Ports [] = {
- #ifdef LPC32XX_CONFIG_U5CLK
+ #ifdef LPC32XX_UART_5_BAUD
{
.sDeviceName = "/dev/ttyS5",
.deviceType = SERIAL_NS16550,
@@ -54,7 +84,7 @@ console_tbl Console_Configuration_Ports [] = {
.pDeviceFlow = NULL,
.ulMargin = 16,
.ulHysteresis = 8,
- .pDeviceParams = (void *) 1,
+ .pDeviceParams = (void *) LPC32XX_UART_5_BAUD,
.ulCtrlPort1 = LPC32XX_BASE_UART_5,
.ulCtrlPort2 = 0,
.ulDataPort = LPC32XX_BASE_UART_5,
@@ -62,20 +92,20 @@ console_tbl Console_Configuration_Ports [] = {
.setRegister = lpc32xx_uart_set_register,
.getData = NULL,
.setData = NULL,
- .ulClock = 16,
+ .ulClock = 16 * LPC32XX_UART_5_BAUD,
.ulIntVector = LPC32XX_IRQ_UART_5
},
#endif
- #ifdef LPC32XX_CONFIG_U3CLK
+ #ifdef LPC32XX_UART_3_BAUD
{
.sDeviceName = "/dev/ttyS3",
.deviceType = SERIAL_NS16550,
.pDeviceFns = &ns16550_fns,
- .deviceProbe = NULL,
+ .deviceProbe = lpc32xx_uart_probe_3,
.pDeviceFlow = NULL,
.ulMargin = 16,
.ulHysteresis = 8,
- .pDeviceParams = (void *) 1,
+ .pDeviceParams = (void *) LPC32XX_UART_3_BAUD,
.ulCtrlPort1 = LPC32XX_BASE_UART_3,
.ulCtrlPort2 = 0,
.ulDataPort = LPC32XX_BASE_UART_3,
@@ -83,20 +113,20 @@ console_tbl Console_Configuration_Ports [] = {
.setRegister = lpc32xx_uart_set_register,
.getData = NULL,
.setData = NULL,
- .ulClock = 16,
+ .ulClock = 16 * LPC32XX_UART_3_BAUD,
.ulIntVector = LPC32XX_IRQ_UART_3
},
#endif
- #ifdef LPC32XX_CONFIG_U4CLK
+ #ifdef LPC32XX_UART_4_BAUD
{
.sDeviceName = "/dev/ttyS4",
.deviceType = SERIAL_NS16550,
.pDeviceFns = &ns16550_fns,
- .deviceProbe = NULL,
+ .deviceProbe = lpc32xx_uart_probe_4,
.pDeviceFlow = NULL,
.ulMargin = 16,
.ulHysteresis = 8,
- .pDeviceParams = (void *) 1,
+ .pDeviceParams = (void *) LPC32XX_UART_4_BAUD,
.ulCtrlPort1 = LPC32XX_BASE_UART_4,
.ulCtrlPort2 = 0,
.ulDataPort = LPC32XX_BASE_UART_4,
@@ -104,20 +134,20 @@ console_tbl Console_Configuration_Ports [] = {
.setRegister = lpc32xx_uart_set_register,
.getData = NULL,
.setData = NULL,
- .ulClock = 16,
+ .ulClock = 16 * LPC32XX_UART_4_BAUD,
.ulIntVector = LPC32XX_IRQ_UART_4
},
#endif
- #ifdef LPC32XX_CONFIG_U6CLK
+ #ifdef LPC32XX_UART_6_BAUD
{
.sDeviceName = "/dev/ttyS6",
.deviceType = SERIAL_NS16550,
.pDeviceFns = &ns16550_fns,
- .deviceProbe = NULL,
+ .deviceProbe = lpc32xx_uart_probe_6,
.pDeviceFlow = NULL,
.ulMargin = 16,
.ulHysteresis = 8,
- .pDeviceParams = (void *) 1,
+ .pDeviceParams = (void *) LPC32XX_UART_6_BAUD,
.ulCtrlPort1 = LPC32XX_BASE_UART_6,
.ulCtrlPort2 = 0,
.ulDataPort = LPC32XX_BASE_UART_6,
@@ -125,7 +155,7 @@ console_tbl Console_Configuration_Ports [] = {
.setRegister = lpc32xx_uart_set_register,
.getData = NULL,
.setData = NULL,
- .ulClock = 16,
+ .ulClock = 16 * LPC32XX_UART_6_BAUD,
.ulIntVector = LPC32XX_IRQ_UART_6
},
#endif
diff --git a/c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c b/c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c
index e1b79ebf90..21b49de53e 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c
+++ b/c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c
@@ -263,35 +263,12 @@ static BSP_START_TEXT_SECTION void stop_dma_activities(void)
static BSP_START_TEXT_SECTION void setup_uarts(void)
{
- uint32_t uartclk_ctrl = 0;
-
- #ifdef LPC32XX_CONFIG_U3CLK
- uartclk_ctrl |= 1U << 0;
- LPC32XX_U3CLK = LPC32XX_CONFIG_U3CLK;
- #endif
- #ifdef LPC32XX_CONFIG_U4CLK
- uartclk_ctrl |= 1U << 1;
- LPC32XX_U4CLK = LPC32XX_CONFIG_U4CLK;
- #endif
- #ifdef LPC32XX_CONFIG_U5CLK
- uartclk_ctrl |= 1U << 2;
- LPC32XX_U5CLK = LPC32XX_CONFIG_U5CLK;
- #endif
- #ifdef LPC32XX_CONFIG_U6CLK
- uartclk_ctrl |= 1U << 3;
- LPC32XX_U6CLK = LPC32XX_CONFIG_U6CLK;
- #endif
-
- #ifdef LPC32XX_CONFIG_UART_CLKMODE
- LPC32XX_UART_CLKMODE = LPC32XX_CONFIG_UART_CLKMODE;
- #endif
-
- LPC32XX_UARTCLK_CTRL = uartclk_ctrl;
LPC32XX_UART_CTRL = 0x0;
LPC32XX_UART_LOOP = 0x0;
- #ifdef LPC32XX_CONFIG_U5CLK
- /* Clock is already set in LPC32XX_U5CLK */
+ #ifdef LPC32XX_UART_5_BAUD
+ LPC32XX_UARTCLK_CTRL |= 1U << 2;
+ LPC32XX_U5CLK = LPC32XX_CONFIG_U5CLK;
BSP_CONSOLE_UART_INIT(0x01);
#endif
}
diff --git a/cpukit/libcsupport/include/rtems/assoc.h b/cpukit/libcsupport/include/rtems/assoc.h
index 80a2fe7cdf..70ac56d662 100644
--- a/cpukit/libcsupport/include/rtems/assoc.h
+++ b/cpukit/libcsupport/include/rtems/assoc.h
@@ -32,11 +32,17 @@ typedef struct {
#define RTEMS_ASSOC_DEFAULT_NAME "(default)"
+/**
+ * @brief RTEMS Associate Pointer by Name
+ */
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *,
const char *
);
+/**
+ * @brief RTEMS Associate Pointer by Remote
+ */
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *,
uint32_t
@@ -47,11 +53,17 @@ uint32_t rtems_assoc_remote_by_local(
uint32_t
);
+/**
+ * @brief RTEMS Associate Local by Remote
+ */
uint32_t rtems_assoc_local_by_remote(
const rtems_assoc_t *,
uint32_t
);
+/**
+ * @brief RTEMS Associate Remote by Name
+ */
uint32_t rtems_assoc_remote_by_name(
const rtems_assoc_t *,
const char *
@@ -65,6 +77,9 @@ uint32_t rtems_assoc_local_by_name(
const char *
);
+/**
+ * @brief RTEMS Associate Name by Local
+ */
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *,
uint32_t
@@ -83,12 +98,18 @@ uint32_t rtems_assoc_remote_by_local_bitfield(
uint32_t
);
+/**
+ * @brief RTEMS Associate Name by Local Bitfield
+ */
char *rtems_assoc_name_by_local_bitfield(
const rtems_assoc_t *,
uint32_t ,
char *
);
+/**
+ * @brief RTEMS Associate Name by Remote Bitfield
+ */
char *rtems_assoc_name_by_remote_bitfield(
const rtems_assoc_t *,
uint32_t ,
@@ -100,6 +121,9 @@ uint32_t rtems_assoc_local_by_remote_bitfield(
uint32_t
);
+/**
+ * @brief RTEMS Associate Pointer by Local
+ */
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
@@ -110,11 +134,12 @@ const rtems_assoc_t *rtems_assoc_ptr_by_local(
#define rtems_assoc_is_default(_ap) \
((_ap)->name && !strcmp((_ap)->name, RTEMS_ASSOC_DEFAULT_NAME))
-/*
- * what to return if a value is not found
- * this is not reentrant, but it really shouldn't be invoked anyway
+/**
+ * @brief RTEMS Associate Bad Name
+ *
+ * what to return if a value is not found
+ * this is not reentrant, but it really shouldn't be invoked anyway
*/
-
const char *rtems_assoc_name_bad(
uint32_t bad_value
);
diff --git a/cpukit/libcsupport/include/rtems/deviceio.h b/cpukit/libcsupport/include/rtems/deviceio.h
index 637eef4f6c..b832942750 100644
--- a/cpukit/libcsupport/include/rtems/deviceio.h
+++ b/cpukit/libcsupport/include/rtems/deviceio.h
@@ -1,5 +1,7 @@
/**
* @file rtems/deviceio.h
+ *
+ * @brief Map Operations on IMFS Device Nodes to the RTEMS Classic API IO Manager
*/
/*
diff --git a/cpukit/libcsupport/include/rtems/error.h b/cpukit/libcsupport/include/rtems/error.h
index ab23ab0ced..056fb8f9c0 100644
--- a/cpukit/libcsupport/include/rtems/error.h
+++ b/cpukit/libcsupport/include/rtems/error.h
@@ -2,6 +2,40 @@
* @file rtems/error.h
*
* Defines and externs for rtems error reporting
+ *
+ * Currently just used by RTEMS monitor.
+ *
+ * These routines provide general purpose error reporting.
+ * rtems_error reports an error to stderr and allows use of
+ * printf style formatting. A newline is appended to all messages.
+ *
+ * error_flag can be specified as any of the following:
+ *
+ * RTEMS_ERROR_ERRNO -- include errno text in output
+ * RTEMS_ERROR_PANIC -- halts local system after output
+ * RTEMS_ERROR_ABORT -- abort after output
+ *
+ * It can also include a rtems_status value which can be OR'd
+ * with the above flags. *
+ *
+ * EXAMPLE
+ * #include <rtems.h>
+ * #include <rtems/error.h>
+ * rtems_error(0, "stray interrupt %d", intr);
+ *
+ * EXAMPLE
+ * if ((status = rtems_task_create(...)) != RTEMS_SUCCCESSFUL)
+ * {
+ * rtems_error(status | RTEMS_ERROR_ABORT,
+ * "could not create task");
+ * }
+ *
+ * EXAMPLE
+ * if ((fd = open(pathname, O_RDNLY)) < 0)
+ * {
+ * rtems_error(RTEMS_ERROR_ERRNO, "open of '%s' failed", pathname);
+ * goto failed;
+ * }
*/
@@ -15,6 +49,15 @@
extern "C" {
#endif
+/**
+ * @defgroup ErrorPanicSupport Error And Panic Support
+ *
+ * @ingroup libcsupport
+ *
+ * @brief Defines and externs for rtems error reporting
+ *
+ */
+
typedef Internal_errors_t rtems_error_code_t;
/*
@@ -36,11 +79,29 @@ typedef Internal_errors_t rtems_error_code_t;
(RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | RTEMS_ERROR_PANIC) /* all */
const char *rtems_status_text(rtems_status_code sc);
+
+/**
+ * @brief Report an Error
+ *
+ * @param[in] error_code can be specified as any of the following:
+ * RTEMS_ERROR_ERRNO -- include errno text in output
+ * RTEMS_ERROR_PANIC -- halts local system after output
+ * RTEMS_ERROR_ABORT -- abort after output
+ *
+ * @param[in] printf_format is a normal printf(3) format string,
+ * with its concommitant arguments
+ *
+ * @return the number of characters written.
+ */
int rtems_error(
rtems_error_code_t error_code,
const char *printf_format,
...
);
+
+/**
+ * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...)
+ */
void rtems_panic(
const char *printf_format,
...
diff --git a/cpukit/libcsupport/include/rtems/gxx_wrappers.h b/cpukit/libcsupport/include/rtems/gxx_wrappers.h
index 2ef180a629..33b163043f 100644
--- a/cpukit/libcsupport/include/rtems/gxx_wrappers.h
+++ b/cpukit/libcsupport/include/rtems/gxx_wrappers.h
@@ -25,6 +25,14 @@
extern "C" {
#endif /* __cplusplus */
+/**
+ * @defgroup GxxWrappersSupport Gxx Wrappers Support
+ *
+ * @ingroup libcsupport
+ *
+ * @brief RTEMS Threads Compatibility Routines for Libgcc2
+ */
+
/*
* These typedefs should match with the ones defined in the file
* gcc/gthr-rtems.h in the gcc distribution.
diff --git a/cpukit/libcsupport/include/rtems/libcsupport.h b/cpukit/libcsupport/include/rtems/libcsupport.h
index 919b41eea3..abe70205e3 100644
--- a/cpukit/libcsupport/include/rtems/libcsupport.h
+++ b/cpukit/libcsupport/include/rtems/libcsupport.h
@@ -27,9 +27,31 @@
extern "C" {
#endif
+/**
+ * @defgroup libcsupport Standard C Library Support
+ *
+ * @brief RTEMS Specific Support for the Standard C Library
+ */
+
extern void malloc_dump(void);
+
+/**
+ * @brief Malloc Walk
+ */
extern bool malloc_walk(int source, bool printf_enabled);
+
+/**
+ * @brief RTEMS Malloc Set Heap Pointer
+ *
+ * This routine is primarily used for debugging.
+ */
void malloc_set_heap_pointer(Heap_Control *new_heap);
+
+/**
+ * @brief RTEMS Malloc Get Heap Pointer
+ *
+ * This routine is primarily used for debugging.
+ */
Heap_Control *malloc_get_heap_pointer( void );
extern void libc_init(void);
extern int host_errno(void);
@@ -37,6 +59,11 @@ extern void fix_syscall_errno(void);
extern size_t malloc_free_space(void);
extern void open_dev_console(void);
+/**
+ * @brief RTEMS Malloc Get Status Information
+ *
+ * Find amount of free heap remaining.
+ */
extern int malloc_info(Heap_Information_block *the_info);
/*
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index 9374f3ac1a..85bcb9774d 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -1176,9 +1176,9 @@ typedef struct {
} rtems_filesystem_limits_and_options_t;
/**
- * @brief Default pathconf settings.
+ * @brief Default Pathconf Settings
*
- * Override in a filesystem.
+ * Override in a filesystem.
*/
extern const rtems_filesystem_limits_and_options_t
rtems_filesystem_default_pathconf;
@@ -1373,6 +1373,14 @@ static inline rtems_device_minor_number rtems_filesystem_dev_minor_t(
* Prototypes for filesystem
*/
+/**
+ * @brief Base File System Initialization
+ *
+ * Initialize the foundation of the file system. This is specified
+ * by the structure rtems_filesystem_mount_table. The usual
+ * configuration is a single instantiation of the IMFS or miniIMFS with
+ * a single "/dev" directory in it.
+ */
void rtems_filesystem_initialize( void );
typedef void (*rtems_libio_init_functions_t)(void);
@@ -1543,37 +1551,38 @@ int unmount(
);
/**
- * @brief Mounts a file system at @a target.
- *
- * The @a source may be a path to the corresponding device file, or @c NULL.
- * The @a target path must lead to an existing directory, or @c NULL. In case
- * @a target is @c NULL, the root file system will be mounted. The @a data
- * parameter will be forwarded to the file system initialization handler. The
- * file system type is selected by @a filesystemtype and may be one of
- * - RTEMS_FILESYSTEM_TYPE_DEVFS,
- * - RTEMS_FILESYSTEM_TYPE_DOSFS,
- * - RTEMS_FILESYSTEM_TYPE_FTPFS,
- * - RTEMS_FILESYSTEM_TYPE_IMFS,
- * - RTEMS_FILESYSTEM_TYPE_MINIIMFS,
- * - RTEMS_FILESYSTEM_TYPE_NFS,
- * - RTEMS_FILESYSTEM_TYPE_RFS, or
- * - RTEMS_FILESYSTEM_TYPE_TFTPFS.
- *
- * Only configured or registered file system types are available. You can add
- * file system types to your application configuration with
- * - CONFIGURE_FILESYSTEM_DEVFS,
- * - CONFIGURE_FILESYSTEM_DOSFS,
- * - CONFIGURE_FILESYSTEM_FTPFS,
- * - CONFIGURE_FILESYSTEM_IMFS,
- * - CONFIGURE_FILESYSTEM_MINIIMFS,
- * - CONFIGURE_FILESYSTEM_NFS,
- * - CONFIGURE_FILESYSTEM_RFS, and
- * - CONFIGURE_FILESYSTEM_TFTPFS.
- *
- * @see rtems_filesystem_register() and mount_and_make_target_path().
- *
- * @retval 0 Successful operation.
- * @retval -1 An error occured. The @c errno indicates the error.
+ * @brief Mounts a File System
+ *
+ * The @a source may be a path to the corresponding device file, or @c NULL.
+ * The @a target path must lead to an existing directory, or @c NULL.
+ * In case @a target is @c NULL, the root file system will be mounted.
+ * The @a data parameter will be forwarded to the file system
+ * initialization handler. The file system type is selected by
+ * @a filesystemtype and may be one of
+ * - RTEMS_FILESYSTEM_TYPE_DEVFS,
+ * - RTEMS_FILESYSTEM_TYPE_DOSFS,
+ * - RTEMS_FILESYSTEM_TYPE_FTPFS,
+ * - RTEMS_FILESYSTEM_TYPE_IMFS,
+ * - RTEMS_FILESYSTEM_TYPE_MINIIMFS,
+ * - RTEMS_FILESYSTEM_TYPE_NFS,
+ * - RTEMS_FILESYSTEM_TYPE_RFS, or
+ * - RTEMS_FILESYSTEM_TYPE_TFTPFS.
+ *
+ * Only configured or registered file system types are available.
+ * You can add file system types to your application configuration with
+ * - CONFIGURE_FILESYSTEM_DEVFS,
+ * - CONFIGURE_FILESYSTEM_DOSFS,
+ * - CONFIGURE_FILESYSTEM_FTPFS,
+ * - CONFIGURE_FILESYSTEM_IMFS,
+ * - CONFIGURE_FILESYSTEM_MINIIMFS,
+ * - CONFIGURE_FILESYSTEM_NFS,
+ * - CONFIGURE_FILESYSTEM_RFS, and
+ * - CONFIGURE_FILESYSTEM_TFTPFS.
+ *
+ * @see rtems_filesystem_register() and mount_and_make_target_path().
+ *
+ * @retval 0 Successful operation.
+ * @retval -1 An error occured. The @c errno indicates the error.
*/
int mount(
const char *source,
diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h
index 98f6f63d4d..7c5a29f0c3 100644
--- a/cpukit/libcsupport/include/rtems/libio_.h
+++ b/cpukit/libcsupport/include/rtems/libio_.h
@@ -30,11 +30,11 @@ extern "C" {
#endif
/**
- * @defgroup LibIOInternal IO Internal Library
+ * @defgroup LibIOInternal IO Internal Library
*
- * @brief Internal IO library API and implementation.
+ * @brief Internal IO library API and implementation.
*
- * @{
+ * @{
*/
#define RTEMS_FILESYSTEM_SYMLOOP_MAX 32
@@ -179,14 +179,14 @@ extern rtems_filesystem_global_location_t rtems_filesystem_global_location_null;
rtems_libio_check_permissions_with_error(_iop, _flag, EINVAL )
/**
- * @brief Clones a node.
+ * @brief Clones a Node
*
- * The caller must hold the file system instance lock.
+ * The caller must hold the file system instance lock.
*
- * @param[out] clone The cloned location.
- * @param[in] master The master location.
+ * @param[out] clone The cloned location.
+ * @param[in] master The master location.
*
- * @see rtems_filesystem_instance_lock().
+ * @see rtems_filesystem_instance_lock().
*/
void rtems_filesystem_location_clone(
rtems_filesystem_location_info_t *clone,
@@ -399,6 +399,9 @@ typedef struct {
rtems_filesystem_eval_path_eval_token eval_token;
} rtems_filesystem_eval_path_generic_config;
+/**
+ * @brief RTEMS File System Eval Generic Path
+ */
void rtems_filesystem_eval_path_generic(
rtems_filesystem_eval_path_context_t *ctx,
void *arg,
@@ -535,7 +538,9 @@ static inline void rtems_filesystem_location_error(
errno = eno;
}
}
-
+/**
+ * @brief RTEMS File System Mknod
+ */
int rtems_filesystem_mknod(
const rtems_filesystem_location_info_t *parentloc,
const char *name,
@@ -546,6 +551,9 @@ int rtems_filesystem_mknod(
int rtems_filesystem_chdir( rtems_filesystem_location_info_t *loc );
+/**
+ * @brief Change Owner and Group of a File
+ */
int rtems_filesystem_chown(
const char *path,
uid_t owner,
@@ -675,6 +683,9 @@ static inline void rtems_filesystem_eval_path_put_back_token(
ctx->tokenlen = 0;
}
+/**
+ * @brief RTEMS File System Eval Eat Delimiter Path
+ */
void rtems_filesystem_eval_path_eat_delimiter(
rtems_filesystem_eval_path_context_t *ctx
);
diff --git a/cpukit/libcsupport/include/rtems/malloc.h b/cpukit/libcsupport/include/rtems/malloc.h
index 9d475d33b1..a257674a38 100644
--- a/cpukit/libcsupport/include/rtems/malloc.h
+++ b/cpukit/libcsupport/include/rtems/malloc.h
@@ -27,6 +27,14 @@ extern "C" {
#endif
/**
+ * @defgroup MallocSupport Malloc Support
+ *
+ * @ingroup libcsupport
+ *
+ * @brief RTEMS extensions to the Malloc Family
+ */
+
+/**
* @brief C program heap control.
*
* This is the pointer to the heap control structure used to manage the C
@@ -80,6 +88,9 @@ typedef void *(*rtems_heap_extend_handler)(
size_t alloc_size
);
+/**
+ * @brief RTEMS Extend Heap via Sbrk
+ */
void *rtems_heap_extend_via_sbrk(
Heap_Control *heap,
size_t alloc_size
@@ -146,7 +157,7 @@ void malloc_report_statistics_with_plugin(
);
/**
- * @brief RTEMS variation on Aligned Memory Allocation
+ * @brief RTEMS Variation on Aligned Memory Allocation
*
* This method is a help memalign implementation which does all
* error checking done by posix_memalign() EXCEPT it does NOT
diff --git a/cpukit/libcsupport/include/rtems/termiostypes.h b/cpukit/libcsupport/include/rtems/termiostypes.h
index 74653b0252..89a997a09e 100644
--- a/cpukit/libcsupport/include/rtems/termiostypes.h
+++ b/cpukit/libcsupport/include/rtems/termiostypes.h
@@ -26,6 +26,14 @@
extern "C" {
#endif
+/**
+ * @defgroup TermiostypesSupport RTEMS Termios Device Support
+ *
+ * @ingroup libcsupport
+ *
+ * @brief RTEMS Termios Device Support Internal Data Structures
+ */
+
/*
* Wakeup callback data structure
*/
@@ -183,29 +191,33 @@ extern int rtems_termios_nlinesw;
/* baudrate xxx integer type */
typedef uint32_t rtems_termios_baud_t;
+/**
+ * @brief RTEMS Termios Baud Table
+ */
extern const rtems_assoc_t rtems_termios_baud_table [];
/**
- * @brief Converts the integral baud value @a baud to the Termios control flag
- * representation.
+ * @brief Converts the Integral Baud value @a baud to the Termios Control Flag
+ * Representation
*
- * @retval B0 Invalid baud value or a baud value of 0.
- * @retval other Baud constant according to @a baud.
+ * @retval B0 Invalid baud value or a baud value of 0.
+ * @retval other Baud constant according to @a baud.
*/
tcflag_t rtems_termios_number_to_baud(rtems_termios_baud_t baud);
/**
- * @brief Converts the baud part of the Termios control flags @a c_cflag to an
- * integral baud value.
+ * @brief Convert Baud Part of Termios control flags to an integral Baud Value
*
- * There is no need to mask the @a c_cflag with @c CBAUD.
+ * There is no need to mask the @a c_cflag with @c CBAUD.
*
- * @retval 0 Invalid baud value or a baud value of @c B0.
- * @retval other Integral baud value.
+ * @retval 0 Invalid baud value or a baud value of @c B0.
+ * @retval other Integral baud value.
*/
rtems_termios_baud_t rtems_termios_baud_to_number(tcflag_t c_cflag);
-/* convert Bxxx constant to index */
+/**
+ * @brief Convert Bxxx Constant to Index
+ */
int rtems_termios_baud_to_index(rtems_termios_baud_t termios_baud);
/**
diff --git a/cpukit/libcsupport/include/sys/ioccom.h b/cpukit/libcsupport/include/sys/ioccom.h
index 7f6ff26cf4..04e82fbb80 100644
--- a/cpukit/libcsupport/include/sys/ioccom.h
+++ b/cpukit/libcsupport/include/sys/ioccom.h
@@ -73,6 +73,7 @@
#define RTEMS_IO_TCDRAIN 3
#define RTEMS_IO_RCVWAKEUP 4
#define RTEMS_IO_SNDWAKEUP 5
+#define RTEMS_IO_TCFLUSH 6
/* copied from libnetworking/sys/filio.h and commented out there */
/* Generic file-descriptor ioctl's. */
diff --git a/cpukit/libcsupport/include/sys/termios.h b/cpukit/libcsupport/include/sys/termios.h
index d763c896e8..8fd46b1cbc 100644
--- a/cpukit/libcsupport/include/sys/termios.h
+++ b/cpukit/libcsupport/include/sys/termios.h
@@ -1,7 +1,9 @@
/**
* @file sys/termios.h
*
- * POSIX termios implementation for RTEMS console device driver.
+ * @brief POSIX termios implementation for RTEMS console device driver.
+ *
+ * http://pubs.opengroup.org/onlinepubs/009604599/basedefs/termios.h.html
*/
/*
@@ -22,6 +24,12 @@
extern "C" {
#endif
+/**
+ * @ingroup Termios
+ *
+ * @brief POSIX Termios Implementation
+ */
+
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
@@ -193,7 +201,6 @@ int tcdrain(int);
pid_t tcgetprgrp(int);
int tcsetprgrp(int, pid_t);
int tcsendbreak(int, int);
-
speed_t cfgetospeed(const struct termios *tp);
int cfsetospeed(struct termios *tp, speed_t speed);
speed_t cfgetispeed(const struct termios *tp);
diff --git a/cpukit/libcsupport/include/zilog/z8530.h b/cpukit/libcsupport/include/zilog/z8530.h
index e4495fc1a5..d11698de50 100644
--- a/cpukit/libcsupport/include/zilog/z8530.h
+++ b/cpukit/libcsupport/include/zilog/z8530.h
@@ -1,6 +1,8 @@
/**
* @file rtems/zilog/z8530.h
*
+ * @brief Information Related to a Zilog Z8530 SCC Chip
+ *
* This include file defines information related to a Zilog Z8530
* SCC Chip. It is a IO mapped part.
*/
diff --git a/cpukit/libcsupport/include/zilog/z8536.h b/cpukit/libcsupport/include/zilog/z8536.h
index accf500fd7..326e75531e 100644
--- a/cpukit/libcsupport/include/zilog/z8536.h
+++ b/cpukit/libcsupport/include/zilog/z8536.h
@@ -1,6 +1,8 @@
/**
* @file rtems/zilog/z8536.h
*
+ * @brief Information Related to a Zilog Z8536 Counter/Timer/IO Chip
+ *
* This include file defines information related to a Zilog Z8536
* Counter/Timer/IO Chip. It is a IO mapped part.
*
diff --git a/cpukit/libcsupport/src/__assert.c b/cpukit/libcsupport/src/__assert.c
index 07af01bc40..be0fa6c2e9 100644
--- a/cpukit/libcsupport/src/__assert.c
+++ b/cpukit/libcsupport/src/__assert.c
@@ -1,5 +1,11 @@
-/* __assert - small RTEMS Specific Implementation
+/**
+ * @file
*
+ * @brief Evaluate Assertion
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -16,7 +22,8 @@
#include <rtems.h>
#if defined(RTEMS_NEWLIB) && !defined(HAVE___ASSERT_FUNC)
-/*
+
+/**
* Newlib 1.16.0 added this method. Together these provide an
* RTEMS safe, low memory implementation.
*/
@@ -39,6 +46,10 @@ void __assert_func(
#endif
#if defined(RTEMS_NEWLIB) && !defined(HAVE___ASSERT)
+
+/**
+ * small RTEMS Specific Implementation
+ */
void __assert(
const char *file,
int line,
diff --git a/cpukit/libcsupport/src/__getpid.c b/cpukit/libcsupport/src/__getpid.c
index 932a4f170a..96e1a3f813 100644
--- a/cpukit/libcsupport/src/__getpid.c
+++ b/cpukit/libcsupport/src/__getpid.c
@@ -1,6 +1,8 @@
-/*
- * Some C Libraries reference this routine since they think getpid is
- * a real system call.
+/**
+ * @file
+ *
+ * @brief Get Process Id
+ * @ingroup libcsupport
*/
#if HAVE_CONFIG_H
@@ -9,6 +11,10 @@
#include <unistd.h>
+/**
+ * Some C Libraries reference this routine since they think getpid is
+ * a real system call.
+ */
pid_t __getpid(void)
{
return getpid();
diff --git a/cpukit/libcsupport/src/__usrenv.c b/cpukit/libcsupport/src/__usrenv.c
index 6a793755ab..a0d96cb7eb 100644
--- a/cpukit/libcsupport/src/__usrenv.c
+++ b/cpukit/libcsupport/src/__usrenv.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS File System Location Support
+ * @ingroup LibIOInternal
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libcsupport/src/_calloc_r.c b/cpukit/libcsupport/src/_calloc_r.c
index 391643cf63..c86d3604b3 100644
--- a/cpukit/libcsupport/src/_calloc_r.c
+++ b/cpukit/libcsupport/src/_calloc_r.c
@@ -1,6 +1,11 @@
-/*
- * _calloc_r Implementation
+/**
+ * @file
*
+ * @brief Allocate Space for Array in Memory
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/_free_r.c b/cpukit/libcsupport/src/_free_r.c
index 22f99ae260..411cb2b3ce 100644
--- a/cpukit/libcsupport/src/_free_r.c
+++ b/cpukit/libcsupport/src/_free_r.c
@@ -1,6 +1,11 @@
-/*
- * _free_r Implementation
+/**
+ * @file
*
+ * @brief Allocate and Free Dynamic Memory
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/_rename_r.c b/cpukit/libcsupport/src/_rename_r.c
index c501472fc1..183717fc1d 100644
--- a/cpukit/libcsupport/src/_rename_r.c
+++ b/cpukit/libcsupport/src/_rename_r.c
@@ -1,6 +1,11 @@
-/*
- * _rename_r() - POSIX 1003.1b - 5.3.4 - Rename a file
+/**
+ * @file
*
+ * @brief Rename a File
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -22,6 +27,9 @@
#include <rtems/libio_.h>
+/**
+ * POSIX 1003.1b - 5.3.4 - Rename a file
+ */
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
diff --git a/cpukit/libcsupport/src/assoclocalbyremote.c b/cpukit/libcsupport/src/assoclocalbyremote.c
index 6146fd32ca..24a86d82c7 100644
--- a/cpukit/libcsupport/src/assoclocalbyremote.c
+++ b/cpukit/libcsupport/src/assoclocalbyremote.c
@@ -1,6 +1,8 @@
-/*
- * assoc.c
- * rtems assoc routines
+/**
+ * @file
+ *
+ * @brief RTEMS Associate Local by Remote
+ * @ingroup Associativity
*/
#if HAVE_CONFIG_H
diff --git a/cpukit/libcsupport/src/assocnamebad.c b/cpukit/libcsupport/src/assocnamebad.c
index 375aabc35c..7977f88949 100644
--- a/cpukit/libcsupport/src/assocnamebad.c
+++ b/cpukit/libcsupport/src/assocnamebad.c
@@ -1,6 +1,8 @@
-/*
- * assoc.c
- * rtems assoc routines
+/**
+ * @file
+ *
+ * @brief RTEMS Associate Bad Name
+ * @ingroup SET
*/
#if HAVE_CONFIG_H
@@ -15,11 +17,6 @@
#include <inttypes.h>
#include <stdio.h> /* sprintf */
-/*
- * what to return if a value is not found
- * this is not reentrant, but it really shouldn't be invoked anyway
- */
-
const char *
rtems_assoc_name_bad(
#ifdef RTEMS_DEBUG
diff --git a/cpukit/libcsupport/src/assocnamebylocal.c b/cpukit/libcsupport/src/assocnamebylocal.c
index 16cf8de481..0dd47b86e8 100644
--- a/cpukit/libcsupport/src/assocnamebylocal.c
+++ b/cpukit/libcsupport/src/assocnamebylocal.c
@@ -1,6 +1,8 @@
-/*
- * assoc.c
- * rtems assoc routines
+/**
+ * @file
+ *
+ * @brief RTEMS Associate Name by Local
+ * @ingroup Associativity
*/
#if HAVE_CONFIG_H
diff --git a/cpukit/libcsupport/src/assocnamebylocalbitfield.c b/cpukit/libcsupport/src/assocnamebylocalbitfield.c
index b19364006c..d8895cbfd5 100644
--- a/cpukit/libcsupport/src/assocnamebylocalbitfield.c
+++ b/cpukit/libcsupport/src/assocnamebylocalbitfield.c
@@ -1,6 +1,8 @@
-/*
- * assoc.c
- * rtems assoc routines
+/**
+ * @file
+ *
+ * @brief RTEMS Associate Name by Local Bitfield
+ * @ingroup Associativity
*/
#if HAVE_CONFIG_H
diff --git a/cpukit/libcsupport/src/assocnamebyremotebitfield.c b/cpukit/libcsupport/src/assocnamebyremotebitfield.c
index 0bc9111e0c..97876ea6ca 100644
--- a/cpukit/libcsupport/src/assocnamebyremotebitfield.c
+++ b/cpukit/libcsupport/src/assocnamebyremotebitfield.c
@@ -1,6 +1,8 @@
-/*
- * assoc.c
- * rtems assoc routines
+/**
+ * @file
+ *
+ * @brief RTEMS Associate Name by Remote Bitfield
+ * @ingroup Associativity
*/
#if HAVE_CONFIG_H
diff --git a/cpukit/libcsupport/src/assocptrbylocal.c b/cpukit/libcsupport/src/assocptrbylocal.c
index 8cba79ce52..a0e7c3ce5b 100644
--- a/cpukit/libcsupport/src/assocptrbylocal.c
+++ b/cpukit/libcsupport/src/assocptrbylocal.c
@@ -1,6 +1,8 @@
-/*
- * assoc.c
- * rtems assoc routines
+/**
+ * @file
+ *
+ * @brief RTEMS Associate Pointer by Local
+ * @ingroup Associativity
*/
#if HAVE_CONFIG_H
diff --git a/cpukit/libcsupport/src/assocptrbyname.c b/cpukit/libcsupport/src/assocptrbyname.c
index 1afc12e382..a01b9cb143 100644
--- a/cpukit/libcsupport/src/assocptrbyname.c
+++ b/cpukit/libcsupport/src/assocptrbyname.c
@@ -1,6 +1,8 @@
-/*
- * assoc.c
- * rtems assoc routines
+/**
+ * @file
+ *
+ * @brief RTEMS Associate Pointer by Name
+ * @ingroup Associativity
*/
#if HAVE_CONFIG_H
diff --git a/cpukit/libcsupport/src/assocptrbyremote.c b/cpukit/libcsupport/src/assocptrbyremote.c
index 1c929425a7..465158195b 100644
--- a/cpukit/libcsupport/src/assocptrbyremote.c
+++ b/cpukit/libcsupport/src/assocptrbyremote.c
@@ -1,6 +1,8 @@
-/*
- * assoc.c
- * rtems assoc routines
+/**
+ * @file
+ *
+ * @brief RTEMS Associate Pointer by Remote
+ * @ingroup Associativity
*/
#if HAVE_CONFIG_H
diff --git a/cpukit/libcsupport/src/assocremotebyname.c b/cpukit/libcsupport/src/assocremotebyname.c
index 0233d468da..8a894fc896 100644
--- a/cpukit/libcsupport/src/assocremotebyname.c
+++ b/cpukit/libcsupport/src/assocremotebyname.c
@@ -1,6 +1,8 @@
-/*
- * assoc.c
- * rtems assoc routines
+/**
+ * @file
+ *
+ * @brief RTEMS Associate Remote by Name
+ * @ingroup Associativity
*/
#if HAVE_CONFIG_H
diff --git a/cpukit/libcsupport/src/base_fs.c b/cpukit/libcsupport/src/base_fs.c
index df1b516a67..33712a7862 100644
--- a/cpukit/libcsupport/src/base_fs.c
+++ b/cpukit/libcsupport/src/base_fs.c
@@ -1,6 +1,11 @@
-/*
- * Base file system initialization
+/**
+ * @file
*
+ * @brief Base File System Initialization
+ * @ingroup LibIO
+ */
+
+/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
@@ -24,16 +29,6 @@
* Default mode for created files.
*/
-
-/*
- * rtems_filesystem_initialize
- *
- * Initialize the foundation of the file system. This is specified
- * by the structure rtems_filesystem_mount_table. The usual
- * configuration is a single instantiation of the IMFS or miniIMFS with
- * a single "/dev" directory in it.
- */
-
void rtems_filesystem_initialize( void )
{
int rv = 0;
diff --git a/cpukit/libcsupport/src/calloc.c b/cpukit/libcsupport/src/calloc.c
index 88928cca19..279c16c7be 100644
--- a/cpukit/libcsupport/src/calloc.c
+++ b/cpukit/libcsupport/src/calloc.c
@@ -1,6 +1,11 @@
-/*
- * calloc()
+/**
+ * @file
*
+ * @brief Allocate Space for Array in Memory
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/cfgetospeed.c b/cpukit/libcsupport/src/cfgetospeed.c
index 388c26e290..f1a4fc8dac 100644
--- a/cpukit/libcsupport/src/cfgetospeed.c
+++ b/cpukit/libcsupport/src/cfgetospeed.c
@@ -1,6 +1,11 @@
-/*
- * cfgetospeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions
+/**
+ * @file
*
+ * @brief Baud Rate Functions
+ * @ingroup Termios
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -21,6 +26,9 @@
#include <errno.h>
#include <termios.h>
+/**
+ * POSIX 1003.1b 7.1.3 - Baud Rate Functions
+ */
speed_t cfgetospeed(
const struct termios *tp
)
diff --git a/cpukit/libcsupport/src/cfsetispeed.c b/cpukit/libcsupport/src/cfsetispeed.c
index 571407d0f7..d4cce532e8 100644
--- a/cpukit/libcsupport/src/cfsetispeed.c
+++ b/cpukit/libcsupport/src/cfsetispeed.c
@@ -1,6 +1,11 @@
-/*
- * cfsetispeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions
+/**
+ * @file
*
+ * @brief Baud Rate Functions
+ * @ingroup Termios
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -24,6 +29,9 @@
#include <rtems/libio_.h>
#include <rtems/seterr.h>
+/**
+ * POSIX 1003.1b 7.1.3 - Baud Rate Functions
+ */
int cfsetispeed(
struct termios *tp,
speed_t speed
diff --git a/cpukit/libcsupport/src/cfsetospeed.c b/cpukit/libcsupport/src/cfsetospeed.c
index 850f4bbdb0..a6b4d4b6ee 100644
--- a/cpukit/libcsupport/src/cfsetospeed.c
+++ b/cpukit/libcsupport/src/cfsetospeed.c
@@ -1,6 +1,11 @@
-/*
- * cfsetospeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions
+/**
+ * @file
*
+ * @brief Baud Rate Functions
+ * @ingroup Termios
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -24,6 +29,9 @@
#include <rtems/libio_.h>
#include <rtems/seterr.h>
+/**
+ * POSIX 1003.1b 7.1.3 - Baud Rate Functions
+ */
int cfsetospeed(
struct termios *tp,
speed_t speed
diff --git a/cpukit/libcsupport/src/chmod.c b/cpukit/libcsupport/src/chmod.c
index 47de601b98..8b91b60eae 100644
--- a/cpukit/libcsupport/src/chmod.c
+++ b/cpukit/libcsupport/src/chmod.c
@@ -1,6 +1,11 @@
-/*
- * chmod() - POSIX 1003.1b 5.6.4 - Change File Modes
+/**
+ * @file
*
+ * @brief Change File Modes
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -17,6 +22,9 @@
#include <rtems/libio_.h>
+/**
+ * POSIX 1003.1b 5.6.4 - Change File Modes
+ */
int chmod( const char *path, mode_t mode )
{
int rv = 0;
diff --git a/cpukit/libcsupport/src/chown.c b/cpukit/libcsupport/src/chown.c
index 7cc03a2a07..434fc2b1a2 100644
--- a/cpukit/libcsupport/src/chown.c
+++ b/cpukit/libcsupport/src/chown.c
@@ -1,6 +1,11 @@
-/*
- * chown() - POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
+/**
+ * @file
*
+ * @brief Change Owner and Group of a File
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -41,6 +46,9 @@ int rtems_filesystem_chown(
return rv;
}
+/**
+ * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
+ */
int chown( const char *path, uid_t owner, gid_t group )
{
return rtems_filesystem_chown( path, owner, group, RTEMS_FS_FOLLOW_LINK );
diff --git a/cpukit/libcsupport/src/clonenode.c b/cpukit/libcsupport/src/clonenode.c
index 0ac7c9ef40..3004def15b 100644
--- a/cpukit/libcsupport/src/clonenode.c
+++ b/cpukit/libcsupport/src/clonenode.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Clones a Node
+ * @ingroup LibIOInternal
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/ctermid.c b/cpukit/libcsupport/src/ctermid.c
index 5699dcee1f..8df70e1263 100644
--- a/cpukit/libcsupport/src/ctermid.c
+++ b/cpukit/libcsupport/src/ctermid.c
@@ -1,6 +1,11 @@
-/*
- * ctermid() - POSIX 1003.1b 4.7.1 - Generate Terminal Pathname
+/**
+ * @file
*
+ * @brief Generate Terminal Pathname
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
@@ -21,6 +26,9 @@
static char *ctermid_name = "/dev/console";
+/**
+ * ctermid() - POSIX 1003.1b 4.7.1 - Generate Terminal Pathname
+ */
char *ctermid(
char *s
)
diff --git a/cpukit/libcsupport/src/dup2.c b/cpukit/libcsupport/src/dup2.c
index ba60acb85b..37c93a7398 100644
--- a/cpukit/libcsupport/src/dup2.c
+++ b/cpukit/libcsupport/src/dup2.c
@@ -1,6 +1,11 @@
-/*
- * dup2() - POSIX 1003.1b 6.2.1 Duplicate an Open File Descriptor
+/**
+ * @file
*
+ * @brief Duplicate an Open File Descriptor
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -18,6 +23,9 @@
#include <rtems/libio_.h>
+/**
+ * POSIX 1003.1b 6.2.1 Duplicate an Open File Descriptor
+ */
int dup2(
int fildes,
int fildes2
diff --git a/cpukit/libcsupport/src/envlock.c b/cpukit/libcsupport/src/envlock.c
index cd24a6d467..bc6f02c9f7 100644
--- a/cpukit/libcsupport/src/envlock.c
+++ b/cpukit/libcsupport/src/envlock.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Global Environment Lock Support
+ * @ingroup libcsupport
+ */
+
/*
* Author: Till Straumann <strauman@slac.stanford.edu>, 3/2002
*/
diff --git a/cpukit/libcsupport/src/error.c b/cpukit/libcsupport/src/error.c
index f8d2e40255..a77dfbbb34 100644
--- a/cpukit/libcsupport/src/error.c
+++ b/cpukit/libcsupport/src/error.c
@@ -1,46 +1,14 @@
-/*
- * report errors and panics to RTEMS' stderr.
- * Currently just used by RTEMS monitor.
+/**
+ * @file
+ *
+ * @brief Error and Panic Report Support
+ * @ingroup ErrorPanicSupport
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
-/*
- * These routines provide general purpose error reporting.
- * rtems_error reports an error to stderr and allows use of
- * printf style formatting. A newline is appended to all messages.
- *
- * error_flag can be specified as any of the following:
- *
- * RTEMS_ERROR_ERRNO -- include errno text in output
- * RTEMS_ERROR_PANIC -- halts local system after output
- * RTEMS_ERROR_ABORT -- abort after output
- *
- * It can also include a rtems_status value which can be OR'd
- * with the above flags. *
- *
- * EXAMPLE
- * #include <rtems.h>
- * #include <rtems/error.h>
- * rtems_error(0, "stray interrupt %d", intr);
- *
- * EXAMPLE
- * if ((status = rtems_task_create(...)) != RTEMS_SUCCCESSFUL)
- * {
- * rtems_error(status | RTEMS_ERROR_ABORT,
- * "could not create task");
- * }
- *
- * EXAMPLE
- * if ((fd = open(pathname, O_RDNLY)) < 0)
- * {
- * rtems_error(RTEMS_ERROR_ERRNO, "open of '%s' failed", pathname);
- * goto failed;
- * }
- */
-
/* This is always defined on RTEMS Scheduler Simulator and thus
* we get a redefined warning if this is not present.
*/
@@ -153,15 +121,6 @@ static int rtems_verror(
return chars_written;
}
-
-/*
- * Report an error.
- * error_flag is as above; printf_format is a normal
- * printf(3) format string, with its concommitant arguments.
- *
- * Returns the number of characters written.
- */
-
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
@@ -187,10 +146,6 @@ int rtems_error(
return chars_written;
}
-/*
- * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...)
- */
-
void rtems_panic(
const char *printf_format,
...
diff --git a/cpukit/libcsupport/src/fchdir.c b/cpukit/libcsupport/src/fchdir.c
index 255e58fa5d..c5fec5ba9e 100644
--- a/cpukit/libcsupport/src/fchdir.c
+++ b/cpukit/libcsupport/src/fchdir.c
@@ -1,6 +1,11 @@
-/*
- * fchdir() - compatible with SVr4, 4.4BSD and X/OPEN - Change Directory
+/**
+ * @file
*
+ * @brief Change Directory
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
@@ -20,6 +25,9 @@
#include <rtems/libio_.h>
+/**
+ * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory
+ */
int fchdir( int fd )
{
int rv = 0;
diff --git a/cpukit/libcsupport/src/fchmod.c b/cpukit/libcsupport/src/fchmod.c
index 944873817d..94e82647fc 100644
--- a/cpukit/libcsupport/src/fchmod.c
+++ b/cpukit/libcsupport/src/fchmod.c
@@ -1,6 +1,11 @@
-/*
- * fchmod() - POSIX 1003.1b 5.6.4 - Change File Modes
+/**
+ * @file
*
+ * @brief Change File Modes
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
@@ -17,6 +22,9 @@
#include <rtems/libio_.h>
+/**
+ * POSIX 1003.1b 5.6.4 - Change File Modes
+ */
int fchmod( int fd, mode_t mode )
{
int rv;
diff --git a/cpukit/libcsupport/src/fchown.c b/cpukit/libcsupport/src/fchown.c
index 6dfbc52ff3..ec84fe4f47 100644
--- a/cpukit/libcsupport/src/fchown.c
+++ b/cpukit/libcsupport/src/fchown.c
@@ -1,6 +1,11 @@
-/*
- * fchown() - POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
+/**
+ * @file
*
+ * @brief Change Owner and Group of a File
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -17,6 +22,9 @@
#include <rtems/libio_.h>
+/**
+ * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
+ */
int fchown( int fd, uid_t owner, gid_t group )
{
int rv = 0;
diff --git a/cpukit/libcsupport/src/flockfile.c b/cpukit/libcsupport/src/flockfile.c
index 5fc6e25dbf..b4c28d8ce5 100644
--- a/cpukit/libcsupport/src/flockfile.c
+++ b/cpukit/libcsupport/src/flockfile.c
@@ -1,3 +1,9 @@
+/**
+ * @file
+ *
+ * @brief Lock File for Stdio
+ * @ingroup SET
+ */
/*
* Copyright (c) 2009 by
* Ralf Corsépius, Ulm, Germany. All rights reserved.
@@ -14,7 +20,9 @@
#include <stdio.h>
-/* This is a non-functional stub */
+/**
+ * This is a non-functional stub
+ */
void flockfile(FILE* file __attribute__((unused)))
{
}
diff --git a/cpukit/libcsupport/src/fpathconf.c b/cpukit/libcsupport/src/fpathconf.c
index a48c5d35fc..104a3512e8 100644
--- a/cpukit/libcsupport/src/fpathconf.c
+++ b/cpukit/libcsupport/src/fpathconf.c
@@ -1,6 +1,11 @@
-/*
- * fpathconf() - POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables
+/**
+ * @file
*
+ * @brief Configurable Pathname Varables
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,6 +24,9 @@
#include <unistd.h>
#include <errno.h>
+/**
+ * POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables
+ */
long fpathconf(
int fd,
int name
diff --git a/cpukit/libcsupport/src/fsync.c b/cpukit/libcsupport/src/fsync.c
index 2bdf982090..885d32718a 100644
--- a/cpukit/libcsupport/src/fsync.c
+++ b/cpukit/libcsupport/src/fsync.c
@@ -1,6 +1,11 @@
-/*
- * fsync() - POSIX 1003.1b 6.6.1 - Synchronize the State of a File
+/**
+ * @file
*
+ * @brief Synchronize the State of a File
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
@@ -18,6 +23,9 @@
#include <rtems/libio_.h>
#include <rtems/seterr.h>
+/**
+ * POSIX 1003.1b 6.6.1 - Synchronize the State of a File
+ */
int fsync(
int fd
)
diff --git a/cpukit/libcsupport/src/ftruncate.c b/cpukit/libcsupport/src/ftruncate.c
index a6eb16fd0d..8ec852de38 100644
--- a/cpukit/libcsupport/src/ftruncate.c
+++ b/cpukit/libcsupport/src/ftruncate.c
@@ -1,6 +1,11 @@
-/*
- * ftruncate() - Truncate a File to the Specified Length
+/**
+ * @file
*
+ * @brief Truncate a File to the Specified Length
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/funlockfile.c b/cpukit/libcsupport/src/funlockfile.c
index 53362cf959..46e8af33bb 100644
--- a/cpukit/libcsupport/src/funlockfile.c
+++ b/cpukit/libcsupport/src/funlockfile.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Unlock File for Stdio
+ * @ingroup libcsupport
+ */
+
/*
* Copyright (c) 2009 by
* Ralf Corsépius, Ulm, Germany. All rights reserved.
@@ -14,7 +21,9 @@
#include <stdio.h>
-/* This is a non-functional stub */
+/**
+ * This is a non-functional stub
+ */
void funlockfile(FILE* file __attribute__((unused)))
{
}
diff --git a/cpukit/libcsupport/src/getdents.c b/cpukit/libcsupport/src/getdents.c
index 4f68240512..9e26a3cc2d 100644
--- a/cpukit/libcsupport/src/getdents.c
+++ b/cpukit/libcsupport/src/getdents.c
@@ -1,12 +1,11 @@
-/*
- * getdents() - Get Directory Entries
- *
- * SVR4 and SVID extension required by Newlib readdir() family.
- *
- * This routine will dd_len / (sizeof dirent) directory entries relative to
- * the current directory position index. These entries will be placed in
- * character array pointed to by -dd_buf-
+/**
+ * @file
*
+ * @brief Get Directory Entries
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -24,6 +23,13 @@
#include <rtems/libio_.h>
#include <rtems/seterr.h>
+/**
+ * SVR4 and SVID extension required by Newlib readdir() family.
+ *
+ * This routine will dd_len / (sizeof dirent) directory entries relative to
+ * the current directory position index. These entries will be placed in
+ * character array pointed to by -dd_buf-
+ */
int getdents(
int dd_fd,
char *dd_buf,
diff --git a/cpukit/libcsupport/src/getegid.c b/cpukit/libcsupport/src/getegid.c
index 222942066b..9ec6f0b6fc 100644
--- a/cpukit/libcsupport/src/getegid.c
+++ b/cpukit/libcsupport/src/getegid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get Real User, Effective User, Ral Group, and Effective Group IDs
+ * @ingroup libcsupport
+ */
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -9,11 +16,10 @@
#include <rtems/seterr.h>
#include <rtems/userenv.h>
-/*
+/**
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
* P1003.1b-1993, p. 84
*/
-
gid_t getegid( void )
{
return _POSIX_types_Egid;
diff --git a/cpukit/libcsupport/src/geteuid.c b/cpukit/libcsupport/src/geteuid.c
index 753dabf997..bc4ee75601 100644
--- a/cpukit/libcsupport/src/geteuid.c
+++ b/cpukit/libcsupport/src/geteuid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get Real User, Effective User, Ral Group, and Effective Group IDs
+ * @ingroup libcsupport
+ */
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -15,11 +22,10 @@
uid_t _POSIX_types_Euid = 0;
*/
-/*
+/**
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
* P1003.1b-1993, p. 84
*/
-
uid_t geteuid( void )
{
return _POSIX_types_Euid;
diff --git a/cpukit/libcsupport/src/getgid.c b/cpukit/libcsupport/src/getgid.c
index 3e38dde0ef..cb8e7e97fc 100644
--- a/cpukit/libcsupport/src/getgid.c
+++ b/cpukit/libcsupport/src/getgid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get Real User, Effective User, Ral Group, and Effective Group IDs
+ * @ingroup libcsupport
+ */
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -5,7 +12,7 @@
#include <unistd.h>
#include <rtems/userenv.h>
-/*
+/**
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
* P1003.1b-1993, p. 84
*/
diff --git a/cpukit/libcsupport/src/getgroups.c b/cpukit/libcsupport/src/getgroups.c
index d6eebb852c..6bf58a70fe 100644
--- a/cpukit/libcsupport/src/getgroups.c
+++ b/cpukit/libcsupport/src/getgroups.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get Supplementary IDs
+ * @ingroup libcsupport
+ */
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -5,10 +12,9 @@
#include <sys/types.h>
#include <unistd.h>
-/*
+/**
* 4.2.3 Get Supplementary IDs, P1003.1b-1993, p. 86
*/
-
int getgroups(
int gidsetsize __attribute__((unused)),
gid_t grouplist[] __attribute__((unused))
diff --git a/cpukit/libcsupport/src/getpagesize.c b/cpukit/libcsupport/src/getpagesize.c
index 2b93415f21..24776ec920 100644
--- a/cpukit/libcsupport/src/getpagesize.c
+++ b/cpukit/libcsupport/src/getpagesize.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get System Page Size
+ * @ingroup libcsupport
+ */
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -5,7 +12,7 @@
#include <unistd.h>
#include <sys/param.h>
-/*
+/**
* Get System Page Size (from SVR4 and 4.2+ BSD)
*
* This is not a functional version but the SPARC backend for at least
diff --git a/cpukit/libcsupport/src/getpid.c b/cpukit/libcsupport/src/getpid.c
index a46fbb59a9..27825e50b5 100644
--- a/cpukit/libcsupport/src/getpid.c
+++ b/cpukit/libcsupport/src/getpid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Process and Parent Process IDs
+ * @ingroup libcsupport
+ */
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -8,25 +15,21 @@
#include <rtems/score/object.h>
#include <rtems/seterr.h>
-/*
+/**
* 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83
*/
-
pid_t getpid( void )
{
return _Objects_Local_node;
}
-/*
- * _getpid_r
- *
- * This is the Newlib dependent reentrant version of getpid().
- */
-
#if defined(RTEMS_NEWLIB) && !defined(HAVE__GETPID_R)
#include <reent.h>
+/**
+ * This is the Newlib dependent reentrant version of getpid().
+ */
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
diff --git a/cpukit/libcsupport/src/getppid.c b/cpukit/libcsupport/src/getppid.c
index 0341356a1f..b0269d4aea 100644
--- a/cpukit/libcsupport/src/getppid.c
+++ b/cpukit/libcsupport/src/getppid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get Process and Parent Process IDs
+ * @ingroup libcsupport
+ */
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -10,10 +17,9 @@
pid_t _POSIX_types_Ppid = 0;
-/*
+/**
* 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83
*/
-
pid_t getppid( void )
{
return _POSIX_types_Ppid;
diff --git a/cpukit/libcsupport/src/getpwent.c b/cpukit/libcsupport/src/getpwent.c
index 75181fd8f1..618f318885 100644
--- a/cpukit/libcsupport/src/getpwent.c
+++ b/cpukit/libcsupport/src/getpwent.c
@@ -1,6 +1,11 @@
-/*
- * POSIX 1003.1b - 9.2.2 - User Database Access Routines
+/**
+ * @file
*
+ * @brief User Database Access Routines
+ * @ingroup libcsupport
+ */
+
+/*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
@@ -24,6 +29,10 @@
#include <rtems/libio_.h>
#include <rtems/seterr.h>
+/**
+ * POSIX 1003.1b - 9.2.2 - User Database Access Routines
+ */
+
/*
* Static, thread-unsafe, buffers
*/
@@ -34,8 +43,8 @@ static FILE *group_fp;
static char grbuf[200];
static struct group grent;
-/*
- * Initialize useable but dummy databases
+/**
+ * Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
@@ -74,8 +83,8 @@ void init_etc_passwd_group(void)
}
}
-/*
- * Extract a string value from the database
+/**
+ * Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
@@ -109,8 +118,8 @@ scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
return 1;
}
-/*
- * Extract an integer value from the database
+/**
+ * Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
@@ -279,8 +288,8 @@ void endpwent(void)
fclose(passwd_fp);
}
-/*
- * Extract a single group record from the database
+/**
+ * Extract a single group record from the database
*/
static int scangr(
FILE *fp,
diff --git a/cpukit/libcsupport/src/getuid.c b/cpukit/libcsupport/src/getuid.c
index 6c4dbf0bb7..f01c163caf 100644
--- a/cpukit/libcsupport/src/getuid.c
+++ b/cpukit/libcsupport/src/getuid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get Real User, Effective User, Ral Group, and Effective Group IDs
+ * @ingroup libcsupport
+ */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
@@ -15,7 +22,7 @@
#include <rtems/userenv.h>
-/*
+/**
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
* P1003.1b-1993, p. 84
*/
diff --git a/cpukit/libcsupport/src/gxx_wrappers.c b/cpukit/libcsupport/src/gxx_wrappers.c
index 2979da4b38..cd1ecc6339 100644
--- a/cpukit/libcsupport/src/gxx_wrappers.c
+++ b/cpukit/libcsupport/src/gxx_wrappers.c
@@ -1,6 +1,11 @@
-/*
- * RTEMS threads compatibility routines for libgcc2.
+/**
+ * @file
*
+ * @brief RTEMS Threads Compatibility Routines for Libgcc2
+ * @ingroup GxxWrappersSupport
+ */
+
+/*
* by: Rosimildo da Silva (rdasilva@connecttel.com)
*
* Used ideas from:
diff --git a/cpukit/libcsupport/src/isatty.c b/cpukit/libcsupport/src/isatty.c
index 1149f73437..54e2c69ae6 100644
--- a/cpukit/libcsupport/src/isatty.c
+++ b/cpukit/libcsupport/src/isatty.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Test whether a File Descriptor Refers to a Terminal
+ * @ingroup libcsupport
+ */
+
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libcsupport/src/isatty_r.c b/cpukit/libcsupport/src/isatty_r.c
index 56751dc008..13ba6b4b34 100644
--- a/cpukit/libcsupport/src/isatty_r.c
+++ b/cpukit/libcsupport/src/isatty_r.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Test for a Terminal Device
+ * @ingroup libcsupport
+ */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
@@ -11,14 +18,11 @@
#include "config.h"
#endif
-/*
- * _isatty_r
- *
- * This is the Newlib dependent reentrant version of isatty().
- */
-
#if defined(RTEMS_NEWLIB) && !defined(HAVE__ISATTY_R)
+ /**
+ * This is the Newlib dependent reentrant version of isatty().
+ */
#include <unistd.h>
#include <reent.h>
#include <sys/stat.h>
diff --git a/cpukit/libcsupport/src/issetugid.c b/cpukit/libcsupport/src/issetugid.c
index 375fea8d9b..0cb870ea00 100644
--- a/cpukit/libcsupport/src/issetugid.c
+++ b/cpukit/libcsupport/src/issetugid.c
@@ -1,12 +1,20 @@
-/*
- * Dummy version of BSD routine
+/**
+ * @file
+ *
+ * @brief Dummy Version of BSD Routine
+ * @ingroup libcsupport
*/
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
#if defined(RTEMS_NEWLIB) && !defined(HAVE_ISSETUGID)
+
+/**
+ * Dummy version of BSD routine
+ */
int issetugid (void)
{
return 0;
diff --git a/cpukit/libcsupport/src/link.c b/cpukit/libcsupport/src/link.c
index f49cca2302..7ec103c15c 100644
--- a/cpukit/libcsupport/src/link.c
+++ b/cpukit/libcsupport/src/link.c
@@ -1,6 +1,11 @@
-/*
- * link() - POSIX 1003.1b - 5.3.4 - Create a new link
+/**
+ * @file
*
+ * @brief Create a new link
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -17,6 +22,9 @@
#include <rtems/libio_.h>
+/**
+ * link() - POSIX 1003.1b - 5.3.4 - Create a new link
+ */
int link( const char *path1, const char *path2 )
{
int rv = 0;
@@ -50,16 +58,13 @@ int link( const char *path1, const char *path2 )
return rv;
}
-/*
- * _link_r
- *
- * This is the Newlib dependent reentrant version of link().
- */
-
#if defined(RTEMS_NEWLIB)
#include <reent.h>
+/**
+ * This is the Newlib dependent reentrant version of link().
+ */
int _link_r(
struct _reent *ptr __attribute__((unused)),
const char *path1,
diff --git a/cpukit/libcsupport/src/lstat.c b/cpukit/libcsupport/src/lstat.c
index 3cf93bee27..abdc0465cd 100644
--- a/cpukit/libcsupport/src/lstat.c
+++ b/cpukit/libcsupport/src/lstat.c
@@ -1,6 +1,11 @@
-/*
- * lstat() - BSD 4.3 and SVR4 - Get File Status
+/**
+ * @file
*
+ * @brief Get File Status
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -18,3 +23,7 @@
#define _STAT_FOLLOW_LINKS RTEMS_FS_FOLLOW_HARD_LINK
#include "stat.c"
+
+/**
+ * BSD 4.3 and SVR4 - Get File Status
+ */ \ No newline at end of file
diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c
index dea6f8f3c7..f79e3bb4f7 100644
--- a/cpukit/libcsupport/src/malloc.c
+++ b/cpukit/libcsupport/src/malloc.c
@@ -1,7 +1,11 @@
-/*
- * RTEMS Malloc Family Implementation
- *
+/**
+ * @file
*
+ * @brief RTEMS Malloc Family Implementation
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/malloc_deferred.c b/cpukit/libcsupport/src/malloc_deferred.c
index 28c6379b86..d1ad56f64b 100644
--- a/cpukit/libcsupport/src/malloc_deferred.c
+++ b/cpukit/libcsupport/src/malloc_deferred.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Malloc Deferred Support
+ * @ingroup libcsupport
+ */
+
/*
* Process free requests deferred because they were from ISR
* or other critical section.
diff --git a/cpukit/libcsupport/src/malloc_report_statistics.c b/cpukit/libcsupport/src/malloc_report_statistics.c
index 7af92d45d5..09c7b0f32f 100644
--- a/cpukit/libcsupport/src/malloc_report_statistics.c
+++ b/cpukit/libcsupport/src/malloc_report_statistics.c
@@ -1,6 +1,11 @@
-/*
- * malloc_report_statistics Implementation
+/**
+ * @file
*
+ * @brief Print Malloc Statistic Usage Report
+ * @ingroup MallocSupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/malloc_statistics_helpers.c b/cpukit/libcsupport/src/malloc_statistics_helpers.c
index 8de5320fbb..0e788c04f1 100644
--- a/cpukit/libcsupport/src/malloc_statistics_helpers.c
+++ b/cpukit/libcsupport/src/malloc_statistics_helpers.c
@@ -1,6 +1,11 @@
-/*
- * _calloc_r Implementation
+/**
+ * @file
*
+ * @brief Malloc Statistics Support
+ * @ingroup MallocSupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -48,7 +53,7 @@ static void rtems_malloc_statistics_at_malloc(
s->max_depth = current_depth;
}
-/*
+/**
* If the pointer is not in the heap, then we won't be able to get its
* size and thus we skip updating the statistics.
*/
diff --git a/cpukit/libcsupport/src/malloc_walk.c b/cpukit/libcsupport/src/malloc_walk.c
index fa810888c9..d06106beef 100644
--- a/cpukit/libcsupport/src/malloc_walk.c
+++ b/cpukit/libcsupport/src/malloc_walk.c
@@ -1,6 +1,11 @@
-/*
- * malloc_walk Implementation
+/**
+ * @file
*
+ * @brief Malloc Walk
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/mallocgetheapptr.c b/cpukit/libcsupport/src/mallocgetheapptr.c
index a25426ae6e..7392d67831 100644
--- a/cpukit/libcsupport/src/mallocgetheapptr.c
+++ b/cpukit/libcsupport/src/mallocgetheapptr.c
@@ -1,6 +1,11 @@
-/*
- * RTEMS Malloc Get Heap Pointer -- Primarily for Debug
+/**
+ * @file
*
+ * @brief RTEMS Malloc Get Heap Pointer
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/mallocinfo.c b/cpukit/libcsupport/src/mallocinfo.c
index 1532608420..63c349d762 100644
--- a/cpukit/libcsupport/src/mallocinfo.c
+++ b/cpukit/libcsupport/src/mallocinfo.c
@@ -1,7 +1,11 @@
-/*
- * RTEMS Malloc Get Status Information
- *
+/**
+ * @file
*
+ * @brief RTEMS Malloc Get Status Information
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -17,10 +21,6 @@
#include <rtems/malloc.h>
#include <rtems/score/protectedheap.h>
-/*
- * Find amount of free heap remaining
- */
-
int malloc_info(
Heap_Information_block *the_info
)
diff --git a/cpukit/libcsupport/src/mallocsetheapptr.c b/cpukit/libcsupport/src/mallocsetheapptr.c
index 42e887810d..414918a4b5 100644
--- a/cpukit/libcsupport/src/mallocsetheapptr.c
+++ b/cpukit/libcsupport/src/mallocsetheapptr.c
@@ -1,6 +1,11 @@
-/*
- * RTEMS Malloc Set Heap Pointer -- Primarily for Debug
+/**
+ * @file
*
+ * @brief RTEMS Malloc Set Heap Pointer
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/mkdir.c b/cpukit/libcsupport/src/mkdir.c
index 7b823141b0..e1c4b7c001 100644
--- a/cpukit/libcsupport/src/mkdir.c
+++ b/cpukit/libcsupport/src/mkdir.c
@@ -1,6 +1,11 @@
-/*
- * mkdir() - POSIX 1003.1b 5.4.1 - Make a Directory
+/**
+ * @file
*
+ * @brief Make a Directory
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,6 +24,9 @@
#include <errno.h>
#include <stdlib.h>
+/**
+ * POSIX 1003.1b 5.4.1 - Make a Directory
+ */
int mkdir(
const char *pathname,
mode_t mode
diff --git a/cpukit/libcsupport/src/mkfifo.c b/cpukit/libcsupport/src/mkfifo.c
index 2ed351fe9d..ac4bb40cae 100644
--- a/cpukit/libcsupport/src/mkfifo.c
+++ b/cpukit/libcsupport/src/mkfifo.c
@@ -1,6 +1,11 @@
-/*
- * mkfifo() - POSIX 1003.1b 5.4.1 - Make a FIFO Special File
+/**
+ * @file
*
+ * @brief Make a FIFO Special File
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -17,6 +22,9 @@
#include <sys/stat.h>
#include <errno.h>
+/**
+ * POSIX 1003.1b 5.4.1 - Make a FIFO Special File
+ */
int mkfifo(
const char *path,
mode_t mode
diff --git a/cpukit/libcsupport/src/mknod.c b/cpukit/libcsupport/src/mknod.c
index 6a63455d81..0a639f0813 100644
--- a/cpukit/libcsupport/src/mknod.c
+++ b/cpukit/libcsupport/src/mknod.c
@@ -1,10 +1,11 @@
-/*
- * mknod()
- *
- * This routine is not defined in the POSIX 1003.1b standard but is
- * commonly supported on most UNIX and POSIX systems. It is the
- * foundation for creating file system objects.
+/**
+ * @file
*
+ * @brief Create a Special or Ordinary File
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -55,6 +56,11 @@ int rtems_filesystem_mknod(
return rv;
}
+/**
+ * This routine is not defined in the POSIX 1003.1b standard but is
+ * commonly supported on most UNIX and POSIX systems. It is the
+ * foundation for creating file system objects.
+ */
int mknod( const char *path, mode_t mode, dev_t dev )
{
int rv = 0;
diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c
index 8eb4796fb2..92033e1904 100644
--- a/cpukit/libcsupport/src/mount.c
+++ b/cpukit/libcsupport/src/mount.c
@@ -1,12 +1,11 @@
-/*
- * mount()
- *
- * XXX
- *
- * XXX make sure no required ops are NULL
- * XXX make sure no optional ops you are using are NULL
- * XXX unmount should be required.
+/**
+ * @file
*
+ * @brief Mounts a File System
+ * @ingroup FileSystemTypesAndMount
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
@@ -28,9 +27,6 @@
RTEMS_CHAIN_DEFINE_EMPTY(rtems_filesystem_mount_table);
-/*
- * Default pathconfs.
- */
const rtems_filesystem_limits_and_options_t rtems_filesystem_default_pathconf = {
5, /* link_max: count */
128, /* max_canon: max formatted input line size */
diff --git a/cpukit/libcsupport/src/newlibc_init.c b/cpukit/libcsupport/src/newlibc_init.c
index ff6d438b33..110f721554 100644
--- a/cpukit/libcsupport/src/newlibc_init.c
+++ b/cpukit/libcsupport/src/newlibc_init.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Newlib Initialization
+ * @ingroup libcsupport
+ */
+
/*
* Implementation of hooks for the CYGNUS newlib libc
* These hooks set things up so that:
@@ -17,7 +24,7 @@
#if defined(RTEMS_NEWLIB)
-/*
+/**
* Init libc for CYGNUS newlib
*
* Set up _REENT to use our global libc_global_reent.
@@ -29,8 +36,6 @@
* create, delete, switch, exit, etc.
*
*/
-
-
void
libc_init(void)
{
diff --git a/cpukit/libcsupport/src/newlibc_reent.c b/cpukit/libcsupport/src/newlibc_reent.c
index 91b5bde5c9..72aa7f592c 100644
--- a/cpukit/libcsupport/src/newlibc_reent.c
+++ b/cpukit/libcsupport/src/newlibc_reent.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Newlib Support
+ * @ingroup libcsupport
+ */
+
/*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -98,9 +105,7 @@ void newlib_begin_hook(rtems_tcb *current_task)
* Called when a task is deleted.
* Must restore the new lib reentrancy state for the new current
* task.
- *
*/
-
int newlib_free_buffers(
FILE *fp
)
diff --git a/cpukit/libcsupport/src/open.c b/cpukit/libcsupport/src/open.c
index 02436b66e7..ead76a6fa3 100644
--- a/cpukit/libcsupport/src/open.c
+++ b/cpukit/libcsupport/src/open.c
@@ -1,6 +1,11 @@
-/*
- * open() - POSIX 1003.1 5.3.1 - Open a File
+/**
+ * @file
*
+ * @brief Open a File
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
@@ -120,6 +125,9 @@ static int do_open(
return rv;
}
+/**
+* POSIX 1003.1 5.3.1 - Open a File
+*/
int open( const char *path, int oflag, ... )
{
int rv = 0;
@@ -144,16 +152,15 @@ int open( const char *path, int oflag, ... )
return rv;
}
-/*
- * _open_r
- *
- * This is the Newlib dependent reentrant version of open().
- */
+
#if defined(RTEMS_NEWLIB) && !defined(HAVE__OPEN_R)
#include <reent.h>
+/**
+ * This is the Newlib dependent reentrant version of open().
+ */
int _open_r(
struct _reent *ptr __attribute__((unused)),
const char *buf,
diff --git a/cpukit/libcsupport/src/pathconf.c b/cpukit/libcsupport/src/pathconf.c
index c337d44955..690817c3e8 100644
--- a/cpukit/libcsupport/src/pathconf.c
+++ b/cpukit/libcsupport/src/pathconf.c
@@ -1,6 +1,11 @@
-/*
- * pathconf() - POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables
+/**
+ * @file
*
+ * @brief Configurable Pathname Varables
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,6 +24,9 @@
#include <sys/stat.h>
#include <fcntl.h>
+/**
+ * POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables
+ */
long pathconf(
const char *path,
int name
diff --git a/cpukit/libcsupport/src/pipe.c b/cpukit/libcsupport/src/pipe.c
index 97f2bd4b65..21d3205cf1 100644
--- a/cpukit/libcsupport/src/pipe.c
+++ b/cpukit/libcsupport/src/pipe.c
@@ -1,6 +1,11 @@
-/*
- * pipe() - POSIX 1003.1b 6.1.1 Create an Inter-Process Channel
+/**
+ * @file
*
+ * @brief Create an Inter-Process Channel
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -20,6 +25,9 @@
#include <rtems/seterr.h>
#include <rtems/pipe.h>
+/**
+ * POSIX 1003.1b 6.1.1 Create an Inter-Process Channel
+ */
int pipe(
int filsdes[2]
)
diff --git a/cpukit/libcsupport/src/printf_plugin.c b/cpukit/libcsupport/src/printf_plugin.c
index 87913277f9..5814f6e4c1 100644
--- a/cpukit/libcsupport/src/printf_plugin.c
+++ b/cpukit/libcsupport/src/printf_plugin.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS Plugin Printf
+ * @ingroup libcsupport
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/printk.c b/cpukit/libcsupport/src/printk.c
index 0a2989226c..badbd0d591 100644
--- a/cpukit/libcsupport/src/printk.c
+++ b/cpukit/libcsupport/src/printk.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Kernel Printf Function
+ * @ingroup libcsupport
+ */
+
/*
* (C) Copyright 1997 -
* - NavIST Group - Real-Time Distributed Systems and Industrial Automation
@@ -22,10 +29,8 @@
#include <stdio.h>
#include <rtems/bspIo.h>
-/*
- * printk
- *
- * Kernel printf function requiring minimal infrastructure.
+/**
+ * Kernel printf function requiring minimal infrastructure.
*/
void printk(const char *fmt, ...)
{
diff --git a/cpukit/libcsupport/src/printk_plugin.c b/cpukit/libcsupport/src/printk_plugin.c
index 70fd19a6cc..12f9495248 100644
--- a/cpukit/libcsupport/src/printk_plugin.c
+++ b/cpukit/libcsupport/src/printk_plugin.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Plugin Printk
+ * @ingroup libcsupport
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libcsupport/src/privateenv.c b/cpukit/libcsupport/src/privateenv.c
index 04622fd432..f5fd67db95 100644
--- a/cpukit/libcsupport/src/privateenv.c
+++ b/cpukit/libcsupport/src/privateenv.c
@@ -1,12 +1,11 @@
/**
- * @file
+ * @file
*
- * @ingroup LibIOEnv
+ * @brief Instantiate a Private User Environment
+ * @ingroup LibIOEnv
*/
/*
- * Instantiate a private user environment for the calling thread.
- *
* Submitted by: fernando.ruiz@ctv.es (correo@fernando-ruiz.com)
*
* COPYRIGHT (c) 1989-2010.
@@ -28,6 +27,10 @@
#include <rtems/libio_.h>
#include <rtems/score/thread.h>
+/**
+ * Instantiate a private user environment for the calling thread.
+ */
+
static void free_user_env(void *arg)
{
rtems_user_env_t *env = arg;
diff --git a/cpukit/libcsupport/src/putk.c b/cpukit/libcsupport/src/putk.c
index 53265ffbb5..f3d7758f67 100644
--- a/cpukit/libcsupport/src/putk.c
+++ b/cpukit/libcsupport/src/putk.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Write Character to Stream
+ * @ingroup libcsupport
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -13,9 +20,7 @@
#include <rtems/bspIo.h>
-/*
- * putk
- *
+/**
* Kernel putk (e.g. puts) function requiring minimal infrastrure.
*/
void putk(const char *s)
diff --git a/cpukit/libcsupport/src/read.c b/cpukit/libcsupport/src/read.c
index ee10166dc8..c1a0d085a3 100644
--- a/cpukit/libcsupport/src/read.c
+++ b/cpukit/libcsupport/src/read.c
@@ -1,6 +1,11 @@
-/*
- * read() - POSIX 1003.1b 6.4.1 - Read From a File
+/**
+ * @file
*
+ * @brief Read From a File
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
@@ -16,6 +21,9 @@
#include <rtems/libio_.h>
#include <rtems/seterr.h>
+/**
+ * POSIX 1003.1b 6.4.1 - Read From a File
+ */
ssize_t read(
int fd,
void *buffer,
@@ -37,16 +45,13 @@ ssize_t read(
return (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
}
-/*
- * _read_r
- *
- * This is the Newlib dependent reentrant version of read().
- */
-
#if defined(RTEMS_NEWLIB) && !defined(HAVE__READ_R)
#include <reent.h>
+/**
+ * This is the Newlib dependent reentrant version of read().
+ */
ssize_t _read_r(
struct _reent *ptr __attribute__((unused)),
int fd,
diff --git a/cpukit/libcsupport/src/readdir_r.c b/cpukit/libcsupport/src/readdir_r.c
index 28c6dadfe0..ba0e53af92 100644
--- a/cpukit/libcsupport/src/readdir_r.c
+++ b/cpukit/libcsupport/src/readdir_r.c
@@ -1,5 +1,8 @@
-/*
- * readdir_r - reentrant version of readdir()
+/**
+ * @file
+ *
+ * @brief Read a Directory
+ * @ingroup libcsupport
*/
#if HAVE_CONFIG_H
@@ -13,10 +16,10 @@
#include <errno.h>
#include <stdio.h>
-/*
- * The RTEMS version of readdir is already thread-safe.
+/**
+ * The RTEMS version of readdir is already thread-safe.
+ * This routine is reentrant version of readdir().
*/
-
int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)
{
*result = readdir(dirp);
diff --git a/cpukit/libcsupport/src/readlink.c b/cpukit/libcsupport/src/readlink.c
index 2cafcca10d..4abc68a955 100644
--- a/cpukit/libcsupport/src/readlink.c
+++ b/cpukit/libcsupport/src/readlink.c
@@ -1,6 +1,11 @@
-/*
- * readlink() - POSIX 1003.1b - X.X.X - XXX
+/**
+ * @file
*
+ * @brief Read Value of a Symbolic Link
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -17,6 +22,9 @@
#include <rtems/libio_.h>
+/**
+ * POSIX 1003.1b - X.X.X - XXX
+ */
ssize_t readlink( const char *path, char *buf, size_t bufsize )
{
ssize_t rv = 0;
diff --git a/cpukit/libcsupport/src/realloc.c b/cpukit/libcsupport/src/realloc.c
index d606f91f4d..eee6f79e69 100644
--- a/cpukit/libcsupport/src/realloc.c
+++ b/cpukit/libcsupport/src/realloc.c
@@ -1,6 +1,11 @@
-/*
- * calloc()
+/**
+ * @file
*
+ * @brief Reallocate Memory Block
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/rmdir.c b/cpukit/libcsupport/src/rmdir.c
index 5e4c9f15be..4802aa364c 100644
--- a/cpukit/libcsupport/src/rmdir.c
+++ b/cpukit/libcsupport/src/rmdir.c
@@ -1,6 +1,11 @@
-/*
- * rmdir() - POSIX 1003.1b - 5.2.2 - Remove a Directory
+/**
+ * @file
*
+ * @brief Remove a Directory
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -17,6 +22,9 @@
#include <rtems/libio_.h>
+/**
+ * POSIX 1003.1b - 5.2.2 - Remove a Directory
+ */
int rmdir( const char *path )
{
int rv = 0;
diff --git a/cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c b/cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c
index 831626b3d5..d27a3660a2 100644
--- a/cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c
+++ b/cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS Extend Heap via Sbrk
+ * @ingroup MallocSupport
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/rtems_heap_greedy.c b/cpukit/libcsupport/src/rtems_heap_greedy.c
index 7e5dc16e7e..a63ff913cd 100644
--- a/cpukit/libcsupport/src/rtems_heap_greedy.c
+++ b/cpukit/libcsupport/src/rtems_heap_greedy.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Greedy Allocate that Empties the Heap
+ * @ingroup MallocSupport
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/rtems_memalign.c b/cpukit/libcsupport/src/rtems_memalign.c
index b7760372f4..64bb489dae 100644
--- a/cpukit/libcsupport/src/rtems_memalign.c
+++ b/cpukit/libcsupport/src/rtems_memalign.c
@@ -1,6 +1,11 @@
-/*
- * rtems_memalign() - Raw aligned allocate from Protected Heap
+/**
+ * @file
*
+ * @brief RTEMS Variation on Aligned Memory Allocation
+ * @ingroup MallocSupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/rtems_putc.c b/cpukit/libcsupport/src/rtems_putc.c
index 8a2b022192..caf4294c9a 100644
--- a/cpukit/libcsupport/src/rtems_putc.c
+++ b/cpukit/libcsupport/src/rtems_putc.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS Output a Character
+ * @ingroup libcsupport
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/setegid.c b/cpukit/libcsupport/src/setegid.c
index d19ced41f9..249491102b 100644
--- a/cpukit/libcsupport/src/setegid.c
+++ b/cpukit/libcsupport/src/setegid.c
@@ -25,7 +25,7 @@
#include <rtems/seterr.h>
#include <rtems/userenv.h>
-/*
+/**
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
* P1003.1b-1993, p. 84
*/
diff --git a/cpukit/libcsupport/src/seteuid.c b/cpukit/libcsupport/src/seteuid.c
index 406cc9ff24..6495decdc3 100644
--- a/cpukit/libcsupport/src/seteuid.c
+++ b/cpukit/libcsupport/src/seteuid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Set Effective User Id
+ * @ingroup libcsupport
+ */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libcsupport/src/setpgid.c b/cpukit/libcsupport/src/setpgid.c
index 3b2011abf1..f3251bcacd 100644
--- a/cpukit/libcsupport/src/setpgid.c
+++ b/cpukit/libcsupport/src/setpgid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Set Process Group ID for Job Control
+ * @ingroup libcsupport
+ */
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -6,10 +13,9 @@
#include <errno.h>
#include <rtems/seterr.h>
-/*
+/**
* 4.3.3 Set Process Group ID for Job Control, P1003.1b-1993, p. 89
*/
-
int setpgid(
pid_t pid __attribute__((unused)),
pid_t pgid __attribute__((unused))
diff --git a/cpukit/libcsupport/src/strlcat.c b/cpukit/libcsupport/src/strlcat.c
index b617cb93e8..6ca17b9d40 100644
--- a/cpukit/libcsupport/src/strlcat.c
+++ b/cpukit/libcsupport/src/strlcat.c
@@ -1,6 +1,11 @@
-/*
- * utils.c - various utility functions used in pppd.
+/**
+ * @file
*
+ * @brief Concatenate a Strings
+ * @ingroup libcsupport
+ */
+
+/*
* Copyright (c) 1999 The Australian National University.
* All rights reserved.
*
@@ -24,9 +29,10 @@
#include <string.h>
#ifndef HAVE_STRLCAT
-/*
- * strlcat - like strcat/strncat, doesn't overflow destination buffer,
- * always leaves destination null-terminated (for len > 0).
+
+/**
+ * like strcat/strncat, doesn't overflow destination buffer,
+ * always leaves destination null-terminated (for len > 0).
*/
size_t
strlcat(
diff --git a/cpukit/libcsupport/src/sup_fs_deviceio.c b/cpukit/libcsupport/src/sup_fs_deviceio.c
index 74f92cb44c..67e035301a 100644
--- a/cpukit/libcsupport/src/sup_fs_deviceio.c
+++ b/cpukit/libcsupport/src/sup_fs_deviceio.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS DeviceIO Support
+ * @ingroup Device
+ */
+
/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libcsupport/src/sup_fs_eval_path.c b/cpukit/libcsupport/src/sup_fs_eval_path.c
index f323dbc8f3..ca31e5eb69 100644
--- a/cpukit/libcsupport/src/sup_fs_eval_path.c
+++ b/cpukit/libcsupport/src/sup_fs_eval_path.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS File Sysyem Path Eval Support
+ * @ingroup LibIOInternal
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/sup_fs_eval_path_generic.c b/cpukit/libcsupport/src/sup_fs_eval_path_generic.c
index 27dd80145a..380e5a69ef 100644
--- a/cpukit/libcsupport/src/sup_fs_eval_path_generic.c
+++ b/cpukit/libcsupport/src/sup_fs_eval_path_generic.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS File System Eval Generic Path
+ * @ingroup LibIOInternal
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/sup_fs_exist_in_same_instance.c b/cpukit/libcsupport/src/sup_fs_exist_in_same_instance.c
index 6d19ae4346..adb3d9ba1d 100644
--- a/cpukit/libcsupport/src/sup_fs_exist_in_same_instance.c
+++ b/cpukit/libcsupport/src/sup_fs_exist_in_same_instance.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Checks that the Locations Exist in the Same File System Instance
+ * @ingroup LibIOInternal
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/sup_fs_next_token.c b/cpukit/libcsupport/src/sup_fs_next_token.c
index 451d81bbfe..2034774834 100644
--- a/cpukit/libcsupport/src/sup_fs_next_token.c
+++ b/cpukit/libcsupport/src/sup_fs_next_token.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS File System Eval Eat Delimiter Path
+ * @ingroup LibIOInternal
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/sup_fs_node_type.c b/cpukit/libcsupport/src/sup_fs_node_type.c
index 0eb4221402..561075c6dc 100644
--- a/cpukit/libcsupport/src/sup_fs_node_type.c
+++ b/cpukit/libcsupport/src/sup_fs_node_type.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Returns the Type of a Node
+ * @ingroup LibIOInternal
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/symlink.c b/cpukit/libcsupport/src/symlink.c
index 07ab87fc57..3c0fd7b41a 100644
--- a/cpukit/libcsupport/src/symlink.c
+++ b/cpukit/libcsupport/src/symlink.c
@@ -1,6 +1,11 @@
-/*
- * symlink() - POSIX 1003.1b - X.X.X - XXX
+/**
+ * @file
*
+ * @brief Make a Symbolic Link to a File
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/sync.c b/cpukit/libcsupport/src/sync.c
index 7b17db15ef..2e8386754c 100644
--- a/cpukit/libcsupport/src/sync.c
+++ b/cpukit/libcsupport/src/sync.c
@@ -1,12 +1,11 @@
-/*
- * sync() - XXX ??? where is this defined
- *
- * This function operates by as follows:
- * for all threads
- * for all FILE *
- * fsync()
- * fdatasync()
+/**
+ * @file
*
+ * @brief Synchronize Data on Disk with Memory
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
@@ -79,6 +78,13 @@ static void sync_per_thread(Thread_Control *t)
*/
extern struct _reent * const _global_impure_ptr __ATTRIBUTE_IMPURE_PTR__;
+/**
+ * This function operates by as follows:
+ * for all threads
+ * for all FILE *
+ * fsync()
+ * fdatasync()
+ */
void sync(void)
{
diff --git a/cpukit/libcsupport/src/tcdrain.c b/cpukit/libcsupport/src/tcdrain.c
index 6dcf824b18..9e9f9acef2 100644
--- a/cpukit/libcsupport/src/tcdrain.c
+++ b/cpukit/libcsupport/src/tcdrain.c
@@ -1,6 +1,11 @@
-/*
- * tcdrain() - POSIX 1003.1b 7.2.2 - Line Control Functions
+/**
+ * @file
*
+ * @brief Line Control Functions
+ * @ingroup Termios
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -24,6 +29,9 @@
#include <rtems/libio.h>
+/**
+ * POSIX 1003.1b 7.2.2 - Line Control Functions
+ */
int tcdrain(
int fd
)
diff --git a/cpukit/libcsupport/src/tcflow.c b/cpukit/libcsupport/src/tcflow.c
index edd056952f..7de2e98cdf 100644
--- a/cpukit/libcsupport/src/tcflow.c
+++ b/cpukit/libcsupport/src/tcflow.c
@@ -1,6 +1,11 @@
-/*
- * tcflow() - POSIX 1003.1b 7.2.2 - Line Control Functions
+/**
+ * @file
*
+ * @brief Line Control Functions
+ * @ingroup Termios
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
@@ -29,6 +34,7 @@ int tcflow (
case TCOON:
case TCIOFF:
case TCION:
+ break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
diff --git a/cpukit/libcsupport/src/tcflush.c b/cpukit/libcsupport/src/tcflush.c
index d528c2aeb7..1cf5eb61f5 100644
--- a/cpukit/libcsupport/src/tcflush.c
+++ b/cpukit/libcsupport/src/tcflush.c
@@ -10,39 +10,14 @@
*/
#if HAVE_CONFIG_H
-#include "config.h"
+ #include "config.h"
#endif
-#include <rtems.h>
-#if defined(RTEMS_NEWLIB)
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
#include <termios.h>
-/* #include <sys/ioctl.h> */
-
-#include <rtems/seterr.h>
-#include <rtems/libio.h>
+#include <stdint.h>
+#include <sys/ioccom.h>
-int tcflush (
- int fd __attribute__((unused)),
- int queue
-)
+int tcflush( int fd, int queue )
{
- switch (queue) {
- case TCIFLUSH:
- case TCOFLUSH:
- case TCIOFLUSH:
- default:
- rtems_set_errno_and_return_minus_one( EINVAL );
- }
-
- /* fd is not validated */
-
- /* When this is supported, implement it here */
- rtems_set_errno_and_return_minus_one( ENOTSUP );
- return 0;
+ return ioctl( fd, RTEMS_IO_TCFLUSH, (intptr_t) queue );
}
-
-#endif
diff --git a/cpukit/libcsupport/src/tcgetattr.c b/cpukit/libcsupport/src/tcgetattr.c
index 00964d25c7..281e75663f 100644
--- a/cpukit/libcsupport/src/tcgetattr.c
+++ b/cpukit/libcsupport/src/tcgetattr.c
@@ -1,6 +1,11 @@
-/*
- * tcgetattr() - POSIX 1003.1b 7.2.1 - Get and Set State
+/**
+ * @file
*
+ * @brief Get State
+ * @ingroup Termios
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/tcgetpgrp.c b/cpukit/libcsupport/src/tcgetpgrp.c
index ae879b3287..3488db1d03 100644
--- a/cpukit/libcsupport/src/tcgetpgrp.c
+++ b/cpukit/libcsupport/src/tcgetpgrp.c
@@ -1,6 +1,11 @@
-/*
- * tcgetprgrp() - POSIX 1003.1b 7.2.3 - Get Foreground Process Group ID
+/**
+ * @file
*
+ * @brief Get Foreground Process Group ID
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -18,6 +23,9 @@
#include <sys/types.h>
#include <unistd.h>
+/**
+ * POSIX 1003.1b 7.2.3 - Get Foreground Process Group ID
+ */
pid_t tcgetpgrp(int fd __attribute__((unused)))
{
return getpid();
diff --git a/cpukit/libcsupport/src/tcsendbreak.c b/cpukit/libcsupport/src/tcsendbreak.c
index 43ebcaafd9..11ac828205 100644
--- a/cpukit/libcsupport/src/tcsendbreak.c
+++ b/cpukit/libcsupport/src/tcsendbreak.c
@@ -1,6 +1,11 @@
-/*
- * tcsendbreak() - POSIX 1003.1b 7.2.2 - Line Control Functions
+/**
+ * @file
*
+ * @brief Line Control Functions
+ * @ingroup Termios
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/tcsetattr.c b/cpukit/libcsupport/src/tcsetattr.c
index f0f3b55ecc..07a71ba7d0 100644
--- a/cpukit/libcsupport/src/tcsetattr.c
+++ b/cpukit/libcsupport/src/tcsetattr.c
@@ -1,6 +1,11 @@
-/*
- * tcsetattr() - POSIX 1003.1b 7.2.1 - Get and Set State
+/**
+ * @file
*
+ * @brief Get and Set State
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -26,6 +31,9 @@
#include <rtems/libio_.h>
#include <rtems/seterr.h>
+/**
+ * POSIX 1003.1b 7.2.1 - Get and Set State
+ */
int tcsetattr(
int fd,
int opt,
diff --git a/cpukit/libcsupport/src/tcsetpgrp.c b/cpukit/libcsupport/src/tcsetpgrp.c
index 1f547c5229..5b0d1f989e 100644
--- a/cpukit/libcsupport/src/tcsetpgrp.c
+++ b/cpukit/libcsupport/src/tcsetpgrp.c
@@ -1,6 +1,11 @@
-/*
- * tcsetprgrp() - POSIX 1003.1b 7.2.4 - Set Foreground Process Group ID
+/**
+ * @file
*
+ * @brief Set Foreground Process Group ID
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
@@ -24,6 +29,9 @@
#include <rtems/libio.h>
+/**
+ * POSIX 1003.1b 7.2.4 - Set Foreground Process Group ID
+ */
int tcsetpgrp(
int fd __attribute__((unused)),
pid_t pid __attribute__((unused)) )
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c
index bcf8d8acb3..cd127f80fc 100644
--- a/cpukit/libcsupport/src/termios.c
+++ b/cpukit/libcsupport/src/termios.c
@@ -354,6 +354,29 @@ drainOutput (struct rtems_termios_tty *tty)
}
}
+static void
+flushOutput (struct rtems_termios_tty *tty)
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_disable (level);
+ tty->rawOutBuf.Tail = 0;
+ tty->rawOutBuf.Head = 0;
+ tty->rawOutBufState = rob_idle;
+ rtems_interrupt_enable (level);
+}
+
+static void
+flushInput (struct rtems_termios_tty *tty)
+{
+ rtems_interrupt_level level;
+
+ rtems_interrupt_disable (level);
+ tty->rawInBuf.Tail = 0;
+ tty->rawInBuf.Head = 0;
+ rtems_interrupt_enable (level);
+}
+
rtems_status_code
rtems_termios_close (void *arg)
{
@@ -572,6 +595,24 @@ rtems_termios_ioctl (void *arg)
drainOutput (tty);
break;
+ case RTEMS_IO_TCFLUSH:
+ switch ((intptr_t) args->buffer) {
+ case TCIFLUSH:
+ flushInput (tty);
+ break;
+ case TCOFLUSH:
+ flushOutput (tty);
+ break;
+ case TCIOFLUSH:
+ flushOutput (tty);
+ flushInput (tty);
+ break;
+ default:
+ sc = RTEMS_INVALID_NAME;
+ break;
+ }
+ break;
+
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
diff --git a/cpukit/libcsupport/src/termios_baud2index.c b/cpukit/libcsupport/src/termios_baud2index.c
index f8454e6f1c..9ced4b20ba 100644
--- a/cpukit/libcsupport/src/termios_baud2index.c
+++ b/cpukit/libcsupport/src/termios_baud2index.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Convert Bxxx Constant to Index
+ * @ingroup TermiostypesSupport
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libcsupport/src/termios_baud2num.c b/cpukit/libcsupport/src/termios_baud2num.c
index 1da2f37e9c..770e670111 100644
--- a/cpukit/libcsupport/src/termios_baud2num.c
+++ b/cpukit/libcsupport/src/termios_baud2num.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Convert Baud Part of Termios control flags to an integral Baud Value
+ * @ingroup TermiostypesSupport
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libcsupport/src/termios_baudtable.c b/cpukit/libcsupport/src/termios_baudtable.c
index d1d70cb19a..a3c0b78c33 100644
--- a/cpukit/libcsupport/src/termios_baudtable.c
+++ b/cpukit/libcsupport/src/termios_baudtable.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS Termios Baud Table
+ * @ingroup TermiostypesSupport
+ */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libcsupport/src/termios_num2baud.c b/cpukit/libcsupport/src/termios_num2baud.c
index dc31ca7fc4..186922f978 100644
--- a/cpukit/libcsupport/src/termios_num2baud.c
+++ b/cpukit/libcsupport/src/termios_num2baud.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Converts the Integral Baud to Termios Control Flag Representation
+ * @ingroup TermiostypesSupport
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libcsupport/src/termiosinitialize.c b/cpukit/libcsupport/src/termiosinitialize.c
index 428458cc1a..11a1ef365b 100644
--- a/cpukit/libcsupport/src/termiosinitialize.c
+++ b/cpukit/libcsupport/src/termiosinitialize.c
@@ -1,6 +1,11 @@
-/*
- * Termios initialization routine
+/**
+ * @file
*
+ * @brief Termios Initialization
+ * @ingroup Termios
+ */
+
+/*
* Author:
* W. Eric Norum
* Saskatchewan Accelerator Laboratory
diff --git a/cpukit/libcsupport/src/truncate.c b/cpukit/libcsupport/src/truncate.c
index 5d58128dd3..654d99e4d9 100644
--- a/cpukit/libcsupport/src/truncate.c
+++ b/cpukit/libcsupport/src/truncate.c
@@ -1,10 +1,11 @@
-/*
- * truncate() - Truncate a File to the Specified Length
- *
- * This routine is not defined in the POSIX 1003.1b standard but is
- * commonly supported on most UNIX and POSIX systems. It is provided
- * for compatibility.
+/**
+ * @file
*
+ * @brief Truncate a File to the Specified Length
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -21,6 +22,11 @@
#include <errno.h>
#include <fcntl.h>
+/**
+ * This routine is not defined in the POSIX 1003.1b standard but is
+ * commonly supported on most UNIX and POSIX systems. It is provided
+ * for compatibility.
+ */
int truncate(
const char *path,
off_t length
diff --git a/cpukit/libcsupport/src/umask.c b/cpukit/libcsupport/src/umask.c
index d9b5580dba..1a5daa51cd 100644
--- a/cpukit/libcsupport/src/umask.c
+++ b/cpukit/libcsupport/src/umask.c
@@ -1,6 +1,11 @@
-/*
- * umask() - POSIX 1003.1b 5.3.3 - Set File Creation Mask
+/**
+ * @file
*
+ * @brief Set File Creation Mask
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,6 +24,9 @@
#include <rtems/libio_.h>
+/**
+ * POSIX 1003.1b 5.3.3 - Set File Creation Mask
+ */
mode_t umask( mode_t cmask )
{
mode_t old_mask;
diff --git a/cpukit/libcsupport/src/unlink.c b/cpukit/libcsupport/src/unlink.c
index a007cc293b..dbeacf4ea8 100644
--- a/cpukit/libcsupport/src/unlink.c
+++ b/cpukit/libcsupport/src/unlink.c
@@ -1,6 +1,11 @@
-/*
- * unlink() - POSIX 1003.1b - 5.5.1 - Remove an existing link
+/**
+ * @file
*
+ * @brief Remove an Existing Link
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -17,6 +22,9 @@
#include <rtems/libio_.h>
+/**
+ * POSIX 1003.1b - 5.5.1 - Remove an existing link
+ */
int unlink( const char *path )
{
int rv = 0;
@@ -49,16 +57,13 @@ int unlink( const char *path )
return rv;
}
-/*
- * _unlink_r
- *
- * This is the Newlib dependent reentrant version of unlink().
- */
-
#if defined(RTEMS_NEWLIB)
#include <reent.h>
+/**
+ * This is the Newlib dependent reentrant version of unlink().
+ */
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
diff --git a/cpukit/libcsupport/src/unmount.c b/cpukit/libcsupport/src/unmount.c
index a6e0f40442..06141b599a 100644
--- a/cpukit/libcsupport/src/unmount.c
+++ b/cpukit/libcsupport/src/unmount.c
@@ -1,11 +1,11 @@
-/*
- * unmount() - Unmount a File System
- *
- * This routine is not defined in the POSIX 1003.1b standard but
- * in some form is supported on most UNIX and POSIX systems. This
- * routine is necessary to mount instantiations of a file system
- * into the file system name space.
+/**
+ * @file
*
+ * @brief Unmount a File System
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
@@ -34,6 +34,12 @@ static bool contains_root_or_current_directory(
return mt_entry == root->mt_entry || mt_entry == current->mt_entry;
}
+/**
+ * This routine is not defined in the POSIX 1003.1b standard but
+ * in some form is supported on most UNIX and POSIX systems. This
+ * routine is necessary to mount instantiations of a file system
+ * into the file system name space.
+ */
int unmount( const char *path )
{
int rv = 0;
diff --git a/cpukit/libcsupport/src/utimes.c b/cpukit/libcsupport/src/utimes.c
index 648cb8b7a6..ef982d1c60 100644
--- a/cpukit/libcsupport/src/utimes.c
+++ b/cpukit/libcsupport/src/utimes.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Change File Last Access and Modification Times
+ * @ingroup libcsupport
+ */
+
/*
* Written by: Vinu Rajashekhar <vinutheraj@gmail.com>
*
diff --git a/cpukit/libcsupport/src/vprintk.c b/cpukit/libcsupport/src/vprintk.c
index 2524e88a3f..b1aceccbe9 100644
--- a/cpukit/libcsupport/src/vprintk.c
+++ b/cpukit/libcsupport/src/vprintk.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Print Formatted Output
+ * @ingroup libcsupport
+ */
+
/*
* (C) Copyright 1997 -
* - NavIST Group - Real-Time Distributed Systems and Industrial Automation
@@ -31,9 +38,7 @@ static void printNum(
char lead
);
-/*
- * vprintk
- *
+/**
* A simplified version of printf intended for use when the
* console is not yet initialized or in ISR's.
*
@@ -146,11 +151,10 @@ void vprintk(
}
}
-/*
- * printNum - print number in a given base.
- * Arguments
- * num - number to print
- * base - base used to print the number.
+/**
+ * @brief Print Number in a Given Base
+ * @param[in] num is the number to print
+ * @param[in] base is the base used to print the number
*/
static void printNum(
long num,
diff --git a/cpukit/libcsupport/src/write.c b/cpukit/libcsupport/src/write.c
index dc1255867d..e96e938b0b 100644
--- a/cpukit/libcsupport/src/write.c
+++ b/cpukit/libcsupport/src/write.c
@@ -1,6 +1,11 @@
-/*
- * write() - POSIX 1003.1b 6.4.2 - Write to a File
+/**
+ * @file
*
+ * @brief Write to a File
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
@@ -16,13 +21,12 @@
#include <rtems/libio_.h>
#include <rtems/seterr.h>
-/*
- * write
- *
- * This routine writes count bytes from from buffer pointed to by buffer
- * to the file associated with the open file descriptor, fildes.
+/**
+ * POSIX 1003.1b 6.4.2 - Write to a File
+ *
+ * This routine writes count bytes from from buffer pointed to by buffer
+ * to the file associated with the open file descriptor, fildes.
*/
-
ssize_t write(
int fd,
const void *buffer,
diff --git a/cpukit/libfs/src/devfs/devfs.h b/cpukit/libfs/src/devfs/devfs.h
index 4155dd6884..3fd1fab036 100644
--- a/cpukit/libfs/src/devfs/devfs.h
+++ b/cpukit/libfs/src/devfs/devfs.h
@@ -13,10 +13,16 @@
#ifdef __cplusplus
extern "C" {
#endif
-
/**
- * This structure define the type of device table
+ * @defgroup DevFsDeviceTable Define Device Table Type
+ *
+ * @ingroup DevFs
+ *
+ * @brief This structure defines the type of device table
+ *
+ * @{
*/
+
typedef struct {
/** This member points to device name which is not a null-terminated string */
const char *name;
@@ -56,11 +62,15 @@ static inline const devFS_data *devFS_get_data(
return (const devFS_data *) loc->mt_entry->immutable_fs_info;
}
+/**
+ * @brief Evaluate Patch
+ */
extern void devFS_eval_path(
rtems_filesystem_eval_path_context_t *ctx
);
/**
+ * @brief Maps Open Operation to rtems_io_open
* This handler maps open operation to rtems_io_open.
* @param iop This is the RTEMS's internal representation of file.
* @param pathname a null-terminated string that starts with /dev.
@@ -90,6 +100,7 @@ extern int devFS_close(
/**
+ * @brief Maps Read Operation to rtems_io_read
* This handler maps read operation to rtems_io_read.
* @param iop This is the RTEMS's internal representation of file
* @param buffer memory location to store read data
@@ -106,6 +117,7 @@ extern ssize_t devFS_read(
/**
+ * @brief Writes Operation to rtems_io_write
* This handler maps write operation to rtems_io_write.
* @param iop This is the RTEMS's internal representation of file
* @param buffer data to be written
@@ -122,6 +134,7 @@ extern ssize_t devFS_write(
/**
+ * @brief Maps ioctl Operation to rtems_io_ioctl
* This handler maps ioctl operation to rtems_io_ioctl.
* @param iop This is the RTEMS's internal representation of file
* @param command io control command
@@ -159,6 +172,7 @@ extern int devFS_stat(
/**
+ * @brief Invoked upon Determination of a Node Type
* This routine is invoked upon determination of a node type.
* Since this is a device-only filesystem, so there is only
* one node type in the system.
@@ -173,6 +187,7 @@ extern rtems_filesystem_node_types_t devFS_node_type(
);
/**
+ * @brief Creates an item in the main device table.
* This routine is invoked upon registration of a new device
* file. It is responsible for creating a item in the main
* device table. This routine searches the device table in
@@ -192,6 +207,7 @@ extern int devFS_mknod(
/**
+ * @brief Creates the Main Device Table
* This routine is invoked upon rtems filesystem initialization.
* It is responsible for creating the main device table,
* initializing it to a known state, and set device file operation
@@ -225,7 +241,7 @@ extern int devFS_initialize(
*/
extern void devFS_Show(void);
-
+/** @} */
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/libfs/src/devfs/devfs_eval.c b/cpukit/libfs/src/devfs/devfs_eval.c
index 6af27d6044..a313afca78 100644
--- a/cpukit/libfs/src/devfs/devfs_eval.c
+++ b/cpukit/libfs/src/devfs/devfs_eval.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Evaluate Patch
+ * @ingroup DevFsDeviceTable Define Device Table Type
+ */
+
/*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/cpukit/libfs/src/devfs/devfs_init.c b/cpukit/libfs/src/devfs/devfs_init.c
index 7ec3d9f9be..e0dbe2fe4a 100644
--- a/cpukit/libfs/src/devfs/devfs_init.c
+++ b/cpukit/libfs/src/devfs/devfs_init.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Creates the Main Device Table
+ * @ingroup DevFsDeviceTable Define Device Table Type
+ */
+
/*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/cpukit/libfs/src/devfs/devfs_mknod.c b/cpukit/libfs/src/devfs/devfs_mknod.c
index a2ab08a9f3..eeee4d8f1f 100644
--- a/cpukit/libfs/src/devfs/devfs_mknod.c
+++ b/cpukit/libfs/src/devfs/devfs_mknod.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Creates an item in the main device table.
+ * @ingroup DevFsDeviceTable Define Device Table Type
+ */
+
/*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/cpukit/libfs/src/devfs/devfs_node_type.c b/cpukit/libfs/src/devfs/devfs_node_type.c
index db92c6c5d0..ed9ee8629f 100644
--- a/cpukit/libfs/src/devfs/devfs_node_type.c
+++ b/cpukit/libfs/src/devfs/devfs_node_type.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Invoked upon Determination of a Node Type
+ * @ingroup DevFsDeviceTable Define Device Table Type
+ */
+
/*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/cpukit/libfs/src/devfs/devioctl.c b/cpukit/libfs/src/devfs/devioctl.c
index e1d62c4d78..2c5e7dbb2d 100644
--- a/cpukit/libfs/src/devfs/devioctl.c
+++ b/cpukit/libfs/src/devfs/devioctl.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Maps ioctl Operation to rtems_io_ioctl
+ * @ingroup DevFsDeviceTable Define Device Table Type
+ */
+
/*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/cpukit/libfs/src/devfs/devopen.c b/cpukit/libfs/src/devfs/devopen.c
index 26450ab26b..2bd68a5d54 100644
--- a/cpukit/libfs/src/devfs/devopen.c
+++ b/cpukit/libfs/src/devfs/devopen.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Maps Open Operation to rtems_io_open
+ * @ingroup DevFsDeviceTable Define Device Table Type
+ */
+
/*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/cpukit/libfs/src/devfs/devread.c b/cpukit/libfs/src/devfs/devread.c
index 25d69b0284..dac88e1946 100644
--- a/cpukit/libfs/src/devfs/devread.c
+++ b/cpukit/libfs/src/devfs/devread.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief DevFS Read
+ * @ingroup Read Operation to rtems_io_read
+ */
+
/*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/cpukit/libfs/src/devfs/devwrite.c b/cpukit/libfs/src/devfs/devwrite.c
index 57e7fdb221..93087e271e 100644
--- a/cpukit/libfs/src/devfs/devwrite.c
+++ b/cpukit/libfs/src/devfs/devwrite.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Writes Operation to rtems_io_write
+ * @ingroup DevFsDeviceTable Define Device Table Type
+ */
+
/*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
diff --git a/cpukit/libfs/src/dosfs/dosfs.h b/cpukit/libfs/src/dosfs/dosfs.h
index 48574664ea..2374e63f2b 100644
--- a/cpukit/libfs/src/dosfs/dosfs.h
+++ b/cpukit/libfs/src/dosfs/dosfs.h
@@ -95,6 +95,11 @@ typedef struct {
bool skip_alignment;
/**
+ * @brief Synchronize device after write operations.
+ */
+ bool sync_device;
+
+ /**
* @brief The amount of info to output.
*/
int info_level;
diff --git a/cpukit/libfs/src/dosfs/msdos_format.c b/cpukit/libfs/src/dosfs/msdos_format.c
index 0afe6c4cb2..0b30caf030 100644
--- a/cpukit/libfs/src/dosfs/msdos_format.c
+++ b/cpukit/libfs/src/dosfs/msdos_format.c
@@ -376,26 +376,105 @@ static int msdos_format_eval_sectors_per_cluster
*/
if (fattype == FAT_FAT12) {
if (MS_BYTES_PER_CLUSTER_LIMIT_FAT12 < (sectors_per_cluster * bytes_per_sector)) {
- ret_val = EINVAL;
finished = true;
}
} else if ((sectors_per_cluster * bytes_per_sector)
> MS_BYTES_PER_CLUSTER_LIMIT) {
- ret_val = EINVAL;
finished = true;
}
} while (!finished);
+ *sectors_per_cluster_adj = sectors_per_cluster;
+ *sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
+
if (ret_val != 0) {
- rtems_set_errno_and_return_minus_one(ret_val);
+ errno = EINVAL;
}
- *sectors_per_cluster_adj = sectors_per_cluster;
- *sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
+ return ret_val;
+}
- return 0;
+static uint8_t
+msdos_get_fat_type( const uint32_t bytes_per_sector,
+ const uint32_t sectors_per_cluster,
+ const uint32_t number_of_clusters )
+{
+ uint32_t ms_sectors_per_cluster_limit_FAT12 =
+ ( MS_BYTES_PER_CLUSTER_LIMIT_FAT12 +1 ) / bytes_per_sector;
+ uint32_t ms_sectors_per_cluster_limit_FAT16 =
+ ( MS_BYTES_PER_CLUSTER_LIMIT +1 ) / bytes_per_sector;
+ uint8_t fattype = FAT_FAT32;
+
+ if ( number_of_clusters < FAT_FAT12_MAX_CLN
+ && sectors_per_cluster <= ms_sectors_per_cluster_limit_FAT12 ) {
+ fattype = FAT_FAT12;
+ }
+ else if ( number_of_clusters < FAT_FAT16_MAX_CLN
+ && sectors_per_cluster <= ms_sectors_per_cluster_limit_FAT16 ) {
+ fattype = FAT_FAT16;
+ }
+
+ return fattype;
}
+static int
+msdos_set_sectors_per_cluster_from_request(
+ const msdos_format_request_param_t *rqdata,
+ msdos_format_param_t *fmt_params )
+{
+ int ret_val = -1;
+ uint32_t onebit;
+
+ if ( rqdata != NULL && rqdata->sectors_per_cluster > 0 ) {
+ fmt_params->sectors_per_cluster = rqdata->sectors_per_cluster;
+ }
+ /*
+ * check sectors per cluster.
+ * must be power of 2
+ * must be smaller than or equal to 128
+ * sectors_per_cluster*bytes_per_sector must not be bigger than 32K
+ */
+ for ( onebit = 128; onebit >= 1; onebit = onebit >> 1 ) {
+ if ( fmt_params->sectors_per_cluster >= onebit ) {
+ fmt_params->sectors_per_cluster = onebit;
+ if ( fmt_params->sectors_per_cluster
+ <= 32768L / fmt_params->bytes_per_sector ) {
+ /* value is small enough so this value is ok */
+ onebit = 1;
+ ret_val = 0;
+ }
+ }
+ }
+
+ if (ret_val != 0) {
+ errno = EINVAL;
+ }
+
+ return ret_val;
+}
+
+static void
+msdos_set_default_sectors_per_cluster_for_fattype(
+ msdos_format_param_t *fmt_params,
+ const uint64_t total_size )
+{
+ if ( fmt_params->fattype == FAT_FAT12
+ || fmt_params->fattype == FAT_FAT16 ) {
+ /* start trying with small clusters */
+ fmt_params->sectors_per_cluster = 2;
+ }
+ else {
+ #define ONE_GB ( 1024L * 1024L * 1024L )
+ uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
+ int b;
+ /* scale with the size of disk... */
+ for ( b = 31; b > 0; b-- ) {
+ if ( (gigs & ( 1 << b) ) != 0 )
+ break;
+ }
+ fmt_params->sectors_per_cluster = 1 << b;
+ }
+}
/*=========================================================================*\
| Function: |
@@ -418,7 +497,6 @@ static int msdos_format_determine_fmt_params
\*=========================================================================*/
{
int ret_val = 0;
- uint32_t onebit;
uint32_t sectors_per_cluster_adj = 0;
uint64_t total_size = 0;
uint32_t data_clusters_cnt;
@@ -433,7 +511,6 @@ static int msdos_format_determine_fmt_params
*/
if (ret_val == 0) {
ret_val = rtems_disk_fd_get_media_block_size(fd, &fmt_params->bytes_per_sector);
-
}
if (ret_val == 0) {
ret_val = rtems_disk_fd_get_block_count(fd, &fmt_params->totl_sector_cnt);
@@ -457,7 +534,8 @@ static int msdos_format_determine_fmt_params
fmt_params->fat_num = rqdata->fat_num;
}
else {
- ret_val = EINVAL;
+ errno = EINVAL;
+ ret_val = -1;
}
}
@@ -536,38 +614,23 @@ static int msdos_format_determine_fmt_params
fmt_params->sectors_per_cluster = 1 << b;
}
- while (ret_val == 0 && fmt_params->fattype != fat_type) {
- /*
- * try to use user requested cluster size
- */
- if (rqdata != NULL && rqdata->sectors_per_cluster > 0) {
- fmt_params->sectors_per_cluster = rqdata->sectors_per_cluster;
- }
- /*
- * check sectors per cluster.
- * must be power of 2
- * must be smaller than or equal to 128
- * sectors_per_cluster*bytes_per_sector must not be bigger than 32K
- */
- for (onebit = 128; onebit >= 1; onebit = onebit >> 1) {
- if (fmt_params->sectors_per_cluster >= onebit) {
- fmt_params->sectors_per_cluster = onebit;
- if (fmt_params->sectors_per_cluster <= 32768L / fmt_params->bytes_per_sector) {
- /* value is small enough so this value is ok */
- onebit = 1;
- }
- }
- }
+ ret_val = msdos_set_sectors_per_cluster_from_request( rqdata, fmt_params );
+ /* For now we will estimate the number of data clusters to the total number
+ * of clusters */
+ if (ret_val == 0) {
+ data_clusters_cnt =
+ fmt_params->totl_sector_cnt / fmt_params->sectors_per_cluster;
+ }
+
+ while( ret_val == 0
+ && fmt_params->fattype != fat_type
+ && fmt_params->totl_sector_cnt > 0 ) {
/*
* Skip aligning structures or d align them
*/
if (ret_val == 0 && rqdata != NULL)
- {
fmt_params->skip_alignment = rqdata->skip_alignment;
- if (fmt_params->skip_alignment)
- fmt_params->sectors_per_cluster = 1;
- }
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
@@ -633,31 +696,19 @@ static int msdos_format_determine_fmt_params
&data_clusters_cnt);
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
fat_type = fmt_params->fattype;
- if (data_clusters_cnt < FAT_FAT12_MAX_CLN ) {
- fmt_params->fattype = FAT_FAT12;
- if (fat_type != fmt_params->fattype) {
- /* start trying with small clusters */
- fmt_params->sectors_per_cluster = 2;
- }
- }
- else if (data_clusters_cnt < FAT_FAT16_MAX_CLN) {
- fmt_params->fattype = FAT_FAT16;
- if (fat_type != fmt_params->fattype) {
- /* start trying with small clusters */
- fmt_params->sectors_per_cluster = 2;
- }
- }
- else {
- fmt_params->fattype = FAT_FAT32;
+
+ /* Correct the FAT type according to the new data cluster count */
+ if ( ret_val == 0 ) {
+ fmt_params->fattype = msdos_get_fat_type(
+ fmt_params->bytes_per_sector,
+ fmt_params->sectors_per_cluster,
+ data_clusters_cnt );
+ /* Correct sectors per cluster to the fat type specific default value */
if (fat_type != fmt_params->fattype) {
- #define ONE_GB (1024L * 1024L * 1024L)
- uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
- int b;
- /* scale with the size of disk... */
- for (b = 31; b > 0; b--)
- if ((gigs & (1 << b)) != 0)
- break;
- fmt_params->sectors_per_cluster = 1 << b;
+ msdos_set_default_sectors_per_cluster_for_fattype( fmt_params,
+ total_size );
+ ret_val = msdos_set_sectors_per_cluster_from_request( rqdata,
+ fmt_params );
}
}
if (fat_type != fmt_params->fattype && 1 < iteration_cnt) {
@@ -669,6 +720,11 @@ static int msdos_format_determine_fmt_params
++iteration_cnt;
}
}
+ if ( fmt_params->totl_sector_cnt == 0 )
+ {
+ errno = EINVAL;
+ ret_val = -1;
+ }
if (0 == ret_val)
{
@@ -796,12 +852,7 @@ static int msdos_format_determine_fmt_params
/*
* Phuuu.... That's it.
*/
- if (ret_val != 0) {
- rtems_set_errno_and_return_minus_one(ret_val);
- }
- else {
- return 0;
- }
+ return ret_val;
}
/*=========================================================================*\
@@ -982,7 +1033,6 @@ int msdos_format
\*=========================================================================*/
{
char tmp_sec[FAT_TOTAL_MBR_SIZE];
- int rc;
struct stat stat_buf;
int ret_val = 0;
int fd = -1;
@@ -1004,8 +1054,7 @@ int msdos_format
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"stat check: %s\n", devname);
if (ret_val == 0) {
- rc = fstat(fd, &stat_buf);
- ret_val = rc;
+ ret_val = fstat(fd, &stat_buf);
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
@@ -1202,6 +1251,11 @@ int msdos_format
tmp_sec);
}
}
+
+ if (ret_val == 0 && rqdata != NULL && rqdata->sync_device) {
+ ret_val = rtems_disk_fd_sync(fd);
+ }
+
/*
* cleanup:
* sync and unlock disk
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.h b/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.h
index 908de55ede..01d4f0f28c 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.h
@@ -1,13 +1,8 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief RTEMS File Systems Bitmap Routines
+ *
* @ingroup rtems-rfs
*
* RTEMS File Systems Bitmap Routines.
@@ -18,6 +13,15 @@
* search bits can checked in a test.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+
#if !defined (_RTEMS_RFS_BITMAPS_H_)
#define _RTEMS_RFS_BITMAPS_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-block-pos.h b/cpukit/libfs/src/rfs/rtems-rfs-block-pos.h
index 6355e2f190..b0de7c1846 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-block-pos.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-block-pos.h
@@ -1,13 +1,8 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief RTEMS File Systems Block Position and Size Management
+ *
* @ingroup rtems-rfs
*
* RTEMS File Systems Block Position and Size Management.
@@ -23,6 +18,14 @@
* which set of rules are in use and the reason for this file.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
#if !defined (_RTEMS_RFS_BLOCK_POS_H_)
#define _RTEMS_RFS_BLOCK_POS_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-block.h b/cpukit/libfs/src/rfs/rtems-rfs-block.h
index dc7b4652d0..c93cb20b24 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-block.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-block.h
@@ -1,13 +1,8 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief RTEMS File Systems Block Management
+ *
* @ingroup rtems-rfs
*
* RTEMS File Systems Block Management.
@@ -15,6 +10,15 @@
* These functions manage the blocks used in the file system.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+
#if !defined (_RTEMS_RFS_BLOCK_H_)
#define _RTEMS_RFS_BLOCK_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-buffer.h b/cpukit/libfs/src/rfs/rtems-rfs-buffer.h
index 335274a969..c6b1f05c53 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-buffer.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-buffer.h
@@ -1,20 +1,22 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
* @ingroup rtems-rfs
*
- * RTEMS File Systems Buffer Management.
+ * @brief Maps Blocks to the Media Interface Layers
*
* These functions map blocks to the media interface layers.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+
#if !defined (_RTEMS_RFS_BUFFER_H_)
#define _RTEMS_RFS_BUFFER_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-data.h b/cpukit/libfs/src/rfs/rtems-rfs-data.h
index 60d1e6b250..0e20423adc 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-data.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-data.h
@@ -1,13 +1,8 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief RTEMS File System Data
+ *
* @ingroup rtems-rfs
*
* RTEMS File System Data.
@@ -18,6 +13,15 @@
* @todo Make direct access on matching byte ordered targets.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+
#if !defined (_RTEMS_RFS_DATA_H_)
#define _RTEMS_RFS_DATA_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.h b/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.h
index 53244d4d87..f7908d8716 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.h
@@ -1,19 +1,22 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief Provides a 32bit Hash of a String used to Search a Directory
+ *
* @ingroup rtems-rfs
*
* RTEMS File Systems Directory Hash provides a 32bit hash of a string. This is
* used to search a directory.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
#if !defined (_RTEMS_RFS_DIR_HASH_H_)
#define _RTEMS_RFS_DIR_HAS_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-dir.h b/cpukit/libfs/src/rfs/rtems-rfs-dir.h
index 76414f827e..50c89eccc5 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-dir.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-dir.h
@@ -1,13 +1,8 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief RTEMS File System Directory Support
+ *
* @ingroup rtems-rfs
*
* RTEMS File System Directory Support
@@ -15,6 +10,14 @@
* This file provides the directory support functions.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
#if !defined (_RTEMS_RFS_DIR_H_)
#define _RTEMS_RFS_DIR_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-file-system-fwd.h b/cpukit/libfs/src/rfs/rtems-rfs-file-system-fwd.h
index 1a707d97d9..ae45acf55e 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-file-system-fwd.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-file-system-fwd.h
@@ -1,18 +1,22 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief RTEMS File Systems Data forward decl
+ *
* @ingroup rtems-rfs
*
* RTEMS File Systems Data forward decl.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+
#if !defined (_RTEMS_RFS_FILE_SYSTEM_FWD_H_)
#define _RTEMS_RFS_FILE_SYSTEM_FWD_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-file-system.h b/cpukit/libfs/src/rfs/rtems-rfs-file-system.h
index 9d54f64a1f..c1f3dd7465 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-file-system.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-file-system.h
@@ -1,13 +1,8 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief RTEMS File System Data
+ *
* @ingroup rtems-rfs
*
* RTEMS File System Data
@@ -15,6 +10,14 @@
* This file defines the file system data.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
#if !defined (_RTEMS_RFS_FILE_SYSTEM_H_)
#define _RTEMS_RFS_FILE_SYSTEM_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-file.h b/cpukit/libfs/src/rfs/rtems-rfs-file.h
index 9251fe439f..f39f02a985 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-file.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-file.h
@@ -1,13 +1,8 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief RTEMS File System File Support
+ *
* @ingroup rtems-rfs
*
* RTEMS File System File Support
@@ -15,6 +10,14 @@
* This file provides the support functions.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
#if !defined (_RTEMS_RFS_FILE_H_)
#define _RTEMS_RFS_FILE_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-group.h b/cpukit/libfs/src/rfs/rtems-rfs-group.h
index adec1c26d8..257eb49f34 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-group.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-group.h
@@ -1,13 +1,8 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief RTEMS File Systems Group Management
+ *
* @ingroup rtems-rfs
*
* RTEMS File Systems Group Management.
@@ -15,6 +10,15 @@
* These functions manage the groups used in the file system.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+
#if !defined (_RTEMS_RFS_GROUP_H_)
#define _RTEMS_RFS_GROUP_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-inode.h b/cpukit/libfs/src/rfs/rtems-rfs-inode.h
index a18940e23d..a26232fdc3 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-inode.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-inode.h
@@ -1,13 +1,8 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief RTEMS File System Information Node
+ *
* @ingroup rtems-rfs
*
* RTEMS File System Information Node.
@@ -15,6 +10,15 @@
* The information nodes hold the data about all nodes in the file system.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+
#if !defined (_RTEMS_RFS_INODE_H_)
#define _RTEMS_RFS_INODE_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-link.h b/cpukit/libfs/src/rfs/rtems-rfs-link.h
index e7fc3b1206..0f473f2200 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-link.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-link.h
@@ -1,13 +1,8 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief RTEMS File System Link Support
+ *
* @ingroup rtems-rfs
*
* RTEMS File System Link Support
@@ -15,6 +10,15 @@
* This file provides the link support functions.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+
#if !defined (_RTEMS_RFS_LINK_H_)
#define _RTEMS_RFS_LINK_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-mutex.h b/cpukit/libfs/src/rfs/rtems-rfs-mutex.h
index 1b5dde812c..ac04aeea1a 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-mutex.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-mutex.h
@@ -1,13 +1,8 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief RTEMS File System Mutex
+ *
* @ingroup rtems-rfs
*
* RTEMS File System Mutex.
@@ -16,6 +11,14 @@
* is designed to be run on host operating systems.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
#if !defined (_RTEMS_RFS_MUTEX_H_)
#define _RTEMS_RFS_MUTEX_H_
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-trace.h b/cpukit/libfs/src/rfs/rtems-rfs-trace.h
index 6a4ca7bafa..09273a5939 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-trace.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-trace.h
@@ -1,13 +1,8 @@
-/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.com/license/LICENSE.
- */
/**
* @file
*
+ * @brief Manages the Trace and Debugging Features of the RTEMS RFS File System
+ *
* @ingroup rtems-rfs
*
* RTEMS File Systems Trace manages the trace and debugging features of the
@@ -15,6 +10,15 @@
* removed from the target code for small footprint systems.
*/
+/*
+ * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+
#if !defined (_RTEMS_RFS_TRACE_H_)
#define _RTEMS_RFS_TRACE_H_
diff --git a/cpukit/posix/include/mqueue.h b/cpukit/posix/include/mqueue.h
index 1472983593..56a97a0c7a 100644
--- a/cpukit/posix/include/mqueue.h
+++ b/cpukit/posix/include/mqueue.h
@@ -26,6 +26,13 @@
#include <rtems/system.h>
#include <rtems/score/object.h>
+/**
+ * @defgroup POSIX_MQUEUE Message Queues
+ *
+ * @ingroup POSIX
+ */
+/**@{*/
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -72,7 +79,21 @@ int mq_close(
);
/**
+ * @brief Remove a Message Queue
+ *
* 15.2.2 Remove a Message Queue, P1003.1b-1993, p. 276
+ *
+ * NOTE: The structure of the routines is identical to that of POSIX
+ * Message_queues to leave the option of having unnamed message
+ * queues at a future date. They are currently not part of the
+ * POSIX standard but unnamed message_queues are. This is also
+ * the reason for the apparently unnecessary tracking of
+ * the process_shared attribute. [In addition to the fact that
+ * it would be trivial to add pshared to the mq_attr structure
+ * and have process private message queues.]
+ *
+ * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
+ * time.
*/
int mq_unlink(
const char *name
@@ -167,6 +188,6 @@ int mq_getattr(
#endif
#endif /* _POSIX_MESSAGE_PASSING */
-
+/**@}*/
#endif
/* end of include file */
diff --git a/cpukit/posix/include/rtems/posix/cond.h b/cpukit/posix/include/rtems/posix/cond.h
index 4b22dff942..b089abe4a9 100644
--- a/cpukit/posix/include/rtems/posix/cond.h
+++ b/cpukit/posix/include/rtems/posix/cond.h
@@ -17,6 +17,12 @@
#ifndef _RTEMS_POSIX_COND_H
#define _RTEMS_POSIX_COND_H
+/**
+ * @defgroup POSIX_COND_VARS Condition Variables
+ *
+ * @ingroup POSIX
+ */
+/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
@@ -56,6 +62,8 @@ POSIX_EXTERN Objects_Information _POSIX_Condition_variables_Information;
extern const pthread_condattr_t _POSIX_Condition_variables_Default_attributes;
/*
+ * @brief Initialization Necessary for this Manager
+ *
* _POSIX_Condition_variables_Manager_initialization
*
* DESCRIPTION:
@@ -125,6 +133,8 @@ RTEMS_INLINE_ROUTINE bool _POSIX_Condition_variables_Is_null (
);
/*
+ * @brief Implements wake up version of the "signal" operation
+ *
* _POSIX_Condition_variables_Signal_support
*
* DESCRIPTION:
@@ -174,6 +184,6 @@ POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
#ifdef __cplusplus
}
#endif
-
+/**@}*/
#endif
/* end of include file */
diff --git a/cpukit/posix/include/rtems/posix/key.h b/cpukit/posix/include/rtems/posix/key.h
index e056d8d89a..ce4f093b13 100644
--- a/cpukit/posix/include/rtems/posix/key.h
+++ b/cpukit/posix/include/rtems/posix/key.h
@@ -19,6 +19,12 @@
#include <rtems/score/object.h>
+/**
+ * @defgroup POSIX_KEY Key
+ *
+ * @ingroup POSIX
+ */
+/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
@@ -45,7 +51,7 @@ typedef struct {
POSIX_EXTERN Objects_Information _POSIX_Keys_Information;
/**
- * @brief _POSIX_Keys_Manager_initialization
+ * @brief POSIX Keys Manager Initialization
*
* This routine performs the initialization necessary for this manager.
*/
@@ -95,6 +101,6 @@ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
#ifdef __cplusplus
}
#endif
-
+/**@}*/
#endif
/* end of include file */
diff --git a/cpukit/posix/include/rtems/posix/ptimer.h b/cpukit/posix/include/rtems/posix/ptimer.h
index 046a7af477..a7c083711a 100644
--- a/cpukit/posix/include/rtems/posix/ptimer.h
+++ b/cpukit/posix/include/rtems/posix/ptimer.h
@@ -20,6 +20,12 @@
#ifndef _RTEMS_POSIX_PTIMER_H
#define _RTEMS_POSIX_PTIMER_H
+/**
+ * @defgroup POSIX_PRIV_TIMERS Timers
+ *
+ * @ingroup POSIX
+ */
+/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
@@ -37,6 +43,8 @@ extern "C" {
void _POSIX_Timer_Manager_initialization(void);
/*
+ * @brief Create a Per-Process Timer
+ *
* 14.2.2 Create a Per-Process Timer, P1003.1b-1993, p. 264
*
* timer_create
@@ -90,5 +98,5 @@ int timer_gettime(
int timer_getoverrun(
timer_t timerid
);
-
+/**@}*/
#endif
diff --git a/cpukit/posix/include/rtems/posix/threadsup.h b/cpukit/posix/include/rtems/posix/threadsup.h
index 82f82b40c3..c5a2e3db7e 100644
--- a/cpukit/posix/include/rtems/posix/threadsup.h
+++ b/cpukit/posix/include/rtems/posix/threadsup.h
@@ -20,6 +20,12 @@
#include <rtems/score/coresem.h>
#include <rtems/score/tqdata.h>
+/**
+ * @defgroup POSIX_THREAD Thread API Extension
+ *
+ * @ingroup POSIX
+ */
+/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
@@ -75,12 +81,17 @@ typedef struct {
/*!
* @brief POSIX Thread Exit Shared Helper
*
+ * 16.1.5.1 Thread Termination, p1003.1c/Draft 10, p. 150
+ *
* This method is a helper routine which ensures that all
* POSIX thread calls which result in a thread exiting will
* do so in the same manner.
*
* @param[in] the_thread is the thread exiting or being canceled
* @param[in] value_ptr is the value to be returned by the thread
+ *
+ * NOTE: Key destructors are executed in the POSIX api delete extension.
+ *
*/
void _POSIX_Thread_Exit(
Thread_Control *the_thread,
@@ -90,6 +101,6 @@ void _POSIX_Thread_Exit(
#ifdef __cplusplus
}
#endif
-
+/**@}*/
#endif
/* end of include file */
diff --git a/cpukit/posix/include/rtems/posix/time.h b/cpukit/posix/include/rtems/posix/time.h
index 104997fcf8..d0dc4a27fe 100644
--- a/cpukit/posix/include/rtems/posix/time.h
+++ b/cpukit/posix/include/rtems/posix/time.h
@@ -19,6 +19,12 @@
#include <rtems/score/timespec.h>
#include <rtems/score/watchdog.h>
+/**
+ * @defgroup POSIX_TIMETYPES Time Types
+ *
+ * @ingroup POSIX
+ */
+/**@{*/
/**
* @brief Absolute Timeout Conversion Results
@@ -59,3 +65,4 @@ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
);
#endif
+/**@}*/
diff --git a/cpukit/posix/include/rtems/posix/timer.h b/cpukit/posix/include/rtems/posix/timer.h
index d193a88b87..1298178e95 100644
--- a/cpukit/posix/include/rtems/posix/timer.h
+++ b/cpukit/posix/include/rtems/posix/timer.h
@@ -21,6 +21,12 @@
#include <rtems/score/object.h>
#include <rtems/score/watchdog.h> /* Watchdog_Control */
+/**
+ * @defgroup POSIX_INTERNAL_TIMERS Timers
+ *
+ * @ingroup POSIX
+ */
+/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
@@ -75,6 +81,8 @@ typedef struct {
void _POSIX_Timer_Manager_initialization(void);
/*
+ * @brief Operation that is run when a timer expires
+ *
* Timer TSR
*/
void _POSIX_Timer_TSR(Objects_Id timer, void *data);
@@ -103,6 +111,6 @@ POSIX_EXTERN Objects_Information _POSIX_Timer_Information;
#ifdef __cplusplus
}
#endif
-
+/**@}*/
#endif
/* end of include file */
diff --git a/cpukit/posix/src/barrierattrgetpshared.c b/cpukit/posix/src/barrierattrgetpshared.c
index 837c050ef5..1141fa5a5c 100644
--- a/cpukit/posix/src/barrierattrgetpshared.c
+++ b/cpukit/posix/src/barrierattrgetpshared.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Barrier Attributes Get Process Shared
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/cleanuppush.c b/cpukit/posix/src/cleanuppush.c
index 23f022e1d1..87df540555 100644
--- a/cpukit/posix/src/cleanuppush.c
+++ b/cpukit/posix/src/cleanuppush.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Establishing Cancellation Handlers
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/clocksettime.c b/cpukit/posix/src/clocksettime.c
index de2c20de50..7e7edb4f56 100644
--- a/cpukit/posix/src/clocksettime.c
+++ b/cpukit/posix/src/clocksettime.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Set Time of Clock
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/cond.c b/cpukit/posix/src/cond.c
index b66509f8da..d2f3b81618 100644
--- a/cpukit/posix/src/cond.c
+++ b/cpukit/posix/src/cond.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Initialization Necessary for this Manager
+ * @ingroup POSIX_COND_VARS Condition Variables
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/condsignalsupp.c b/cpukit/posix/src/condsignalsupp.c
index 5ab6e9de95..36bb60ebb2 100644
--- a/cpukit/posix/src/condsignalsupp.c
+++ b/cpukit/posix/src/condsignalsupp.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Implements wake up version of the "signal" operation
+ * @ingroup POSIX_COND_VARS Condition Variables
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/condtimedwait.c b/cpukit/posix/src/condtimedwait.c
index 2789e210c1..031376cfea 100644
--- a/cpukit/posix/src/condtimedwait.c
+++ b/cpukit/posix/src/condtimedwait.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Waiting on a Condition
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/key.c b/cpukit/posix/src/key.c
index ee8b496b2f..6eace26eed 100644
--- a/cpukit/posix/src/key.c
+++ b/cpukit/posix/src/key.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Keys Manager Initialization
+ * @ingroup POSIX_KEY Key
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mprotect.c b/cpukit/posix/src/mprotect.c
index 9d3c0eb09a..32de472a21 100644
--- a/cpukit/posix/src/mprotect.c
+++ b/cpukit/posix/src/mprotect.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Change Memory Protection
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mqueueunlink.c b/cpukit/posix/src/mqueueunlink.c
index 8e48ffe669..0f68ae727a 100644
--- a/cpukit/posix/src/mqueueunlink.c
+++ b/cpukit/posix/src/mqueueunlink.c
@@ -1,16 +1,11 @@
-/*
- * NOTE: The structure of the routines is identical to that of POSIX
- * Message_queues to leave the option of having unnamed message
- * queues at a future date. They are currently not part of the
- * POSIX standard but unnamed message_queues are. This is also
- * the reason for the apparently unnecessary tracking of
- * the process_shared attribute. [In addition to the fact that
- * it would be trivial to add pshared to the mq_attr structure
- * and have process private message queues.]
- *
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
+/**
+ * @file
*
+ * @brief Remove a Message Queue
+ * @ingroup POSIX_MQUEUE Message Queues
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/mutexattrgetprioceiling.c b/cpukit/posix/src/mutexattrgetprioceiling.c
index a571ad5ba2..949fd3b32c 100644
--- a/cpukit/posix/src/mutexattrgetprioceiling.c
+++ b/cpukit/posix/src/mutexattrgetprioceiling.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Mutex Initialization Scheduling Attributes
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/posixtimespecabsolutetimeout.c b/cpukit/posix/src/posixtimespecabsolutetimeout.c
index 24362c5aa3..e94805e692 100644
--- a/cpukit/posix/src/posixtimespecabsolutetimeout.c
+++ b/cpukit/posix/src/posixtimespecabsolutetimeout.c
@@ -1,5 +1,8 @@
-/*
- * Convert abstime timeout to ticks
+/**
+ * @file
+ *
+ * @brief Convert Absolute Timeout to Ticks
+ * @ingroup POSIX_TIMETYPES Time Types
*/
/*
diff --git a/cpukit/posix/src/prwlocktrywrlock.c b/cpukit/posix/src/prwlocktrywrlock.c
index 06a3cbb2e5..f8857a831b 100644
--- a/cpukit/posix/src/prwlocktrywrlock.c
+++ b/cpukit/posix/src/prwlocktrywrlock.c
@@ -1,6 +1,11 @@
-/*
- * POSIX RWLock Manager -- Attempt to Obtain a Write Lock on a RWLock Instance
+/**
+ * @file
*
+ * @brief Attempt to Obtain a Write Lock on a RWLock Instance
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/pspintrylock.c b/cpukit/posix/src/pspintrylock.c
index e3f2659735..de89b4e579 100644
--- a/cpukit/posix/src/pspintrylock.c
+++ b/cpukit/posix/src/pspintrylock.c
@@ -1,6 +1,11 @@
-/*
- * POSIX Spinlock Manager -- Wait at a Spinlock
+/**
+ * @file
*
+ * @brief Wait at a Spinlock
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/pthreadexit.c b/cpukit/posix/src/pthreadexit.c
index e89ed855c3..2e995c49bc 100644
--- a/cpukit/posix/src/pthreadexit.c
+++ b/cpukit/posix/src/pthreadexit.c
@@ -1,8 +1,11 @@
-/*
- * 16.1.5.1 Thread Termination, p1003.1c/Draft 10, p. 150
- *
- * NOTE: Key destructors are executed in the POSIX api delete extension.
+/**
+ * @file
*
+ * @brief POSIX Thread Exit Shared Helper
+ * @ingroup POSIX_THREAD Thread API Extension
+ */
+
+/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/setcancelstate.c b/cpukit/posix/src/setcancelstate.c
index a5356aa945..31bef65eff 100644
--- a/cpukit/posix/src/setcancelstate.c
+++ b/cpukit/posix/src/setcancelstate.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Setting Cancelability State
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/sigemptyset.c b/cpukit/posix/src/sigemptyset.c
index 245639e896..5cfc310ba1 100644
--- a/cpukit/posix/src/sigemptyset.c
+++ b/cpukit/posix/src/sigemptyset.c
@@ -1,6 +1,11 @@
-/*
- * 3.3.3 Manipulate Signal Sets, P1003.1b-1993, p. 69
+/**
+ * @file
*
+ * @brief Manipulate Signal Sets
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/sigpending.c b/cpukit/posix/src/sigpending.c
index 9145c988e4..c62d878b6b 100644
--- a/cpukit/posix/src/sigpending.c
+++ b/cpukit/posix/src/sigpending.c
@@ -1,6 +1,11 @@
-/*
- * 3.3.6 Examine Pending Signals, P1003.1b-1993, p. 75
+/**
+ * @file
*
+ * @brief Examine Pending Signals
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/sysconf.c b/cpukit/posix/src/sysconf.c
index e6c73de2ec..fb0939fbe2 100644
--- a/cpukit/posix/src/sysconf.c
+++ b/cpukit/posix/src/sysconf.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get Configurable System Variables
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/timercreate.c b/cpukit/posix/src/timercreate.c
index 6dfa75b9c8..bd52f87fe9 100644
--- a/cpukit/posix/src/timercreate.c
+++ b/cpukit/posix/src/timercreate.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Create a Per-Process Timer
+ * @ingroup POSIX_PRIV_TIMERS Timers
+ */
+
/*
* 14.2.2 Create a Per-Process Timer, P1003.1b-1993, p. 264
*
diff --git a/cpukit/posix/src/timertsr.c b/cpukit/posix/src/timertsr.c
index 0ef40ffdfe..ad17ae91c2 100644
--- a/cpukit/posix/src/timertsr.c
+++ b/cpukit/posix/src/timertsr.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Operation that is run when a timer expires
+ * @ingroup POSIX_INTERNAL_TIMERS Timers
+ */
+
/*
* _POSIX_Timer_TSR
*
diff --git a/cpukit/rtems/include/rtems/rtems/asr.h b/cpukit/rtems/include/rtems/rtems/asr.h
index dae0dd8474..372f4c7073 100644
--- a/cpukit/rtems/include/rtems/rtems/asr.h
+++ b/cpukit/rtems/include/rtems/rtems/asr.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/asr.h
*
+ * @brief Constants and Structures Associated with the Asynchronous Signal Handler
+ *
* This include file contains all the constants and structures associated
* with the Asynchronous Signal Handler. This Handler provides the low-level
* support required by the Signal Manager.
diff --git a/cpukit/rtems/include/rtems/rtems/barrier.h b/cpukit/rtems/include/rtems/rtems/barrier.h
index 340c6a16ac..b7e74839a5 100644
--- a/cpukit/rtems/include/rtems/rtems/barrier.h
+++ b/cpukit/rtems/include/rtems/rtems/barrier.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/barrier.h
*
+ * @brief Constants and Structures Associated with the Barrier Manager
+ *
* This include file contains all the constants and structures associated
* with the Barrier Manager.
*
diff --git a/cpukit/rtems/include/rtems/rtems/cache.h b/cpukit/rtems/include/rtems/rtems/cache.h
index 2c266c5774..95cf14f741 100644
--- a/cpukit/rtems/include/rtems/rtems/cache.h
+++ b/cpukit/rtems/include/rtems/rtems/cache.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/cache.h
*
+ * @brief Functionality Associated with the Cache Manager
+ *
* Cache Manager
*/
@@ -152,7 +154,7 @@ void rtems_cache_disable_instruction( void );
* integral number of cache blocks.
*/
void *rtems_cache_aligned_malloc ( size_t nbytes );
-
+
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/rtems/include/rtems/rtems/clock.h b/cpukit/rtems/include/rtems/rtems/clock.h
index 7eaa2cbf3e..549dc798c9 100644
--- a/cpukit/rtems/include/rtems/rtems/clock.h
+++ b/cpukit/rtems/include/rtems/rtems/clock.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/clock.h
*
+ * @brief Constants and Structures Associated with the Clock Manager
+ *
* This include file contains all the constants and structures associated
* with the Clock Manager. This manager provides facilities to set, obtain,
* and continually update the current date and time.
@@ -257,7 +259,7 @@ time_t rtems_clock_get_uptime_seconds( void );
* @param[in] the_tod is the TOD structure to validate
*
* @return This method returns true if the TOD is valid and false otherwise.
- *
+ *
* @note This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
diff --git a/cpukit/rtems/include/rtems/rtems/config.h b/cpukit/rtems/include/rtems/rtems/config.h
index be3a14248c..e4ac509d88 100644
--- a/cpukit/rtems/include/rtems/rtems/config.h
+++ b/cpukit/rtems/include/rtems/rtems/config.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/config.h
*
+ * @brief Records Which Define the Configuration Table
+ *
* This include file contains the table of user defined configuration
* parameters specific for the RTEMS API.
*/
diff --git a/cpukit/rtems/include/rtems/rtems/event.h b/cpukit/rtems/include/rtems/rtems/event.h
index c099f9b88e..6c265c3f40 100644
--- a/cpukit/rtems/include/rtems/rtems/event.h
+++ b/cpukit/rtems/include/rtems/rtems/event.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/event.h
*
+ * @brief Information Related to the Event Manager
+ *
* This include file contains the information pertaining to the Event
* Manager. This manager provides a high performance method of communication
* and synchronization.
diff --git a/cpukit/rtems/include/rtems/rtems/eventset.h b/cpukit/rtems/include/rtems/rtems/eventset.h
index d543ba5583..632e217c79 100644
--- a/cpukit/rtems/include/rtems/rtems/eventset.h
+++ b/cpukit/rtems/include/rtems/rtems/eventset.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/eventset.h
*
+ * @brief Information Related to the Event Sets Handler
+ *
* This include file contains the information pertaining to the
* Event Sets Handler. This handler provides methods for the manipulation
* of event sets which will be sent and received by tasks.
diff --git a/cpukit/rtems/include/rtems/rtems/message.h b/cpukit/rtems/include/rtems/rtems/message.h
index 4f44f730b1..9ad1e9b9ef 100644
--- a/cpukit/rtems/include/rtems/rtems/message.h
+++ b/cpukit/rtems/include/rtems/rtems/message.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/message.h
*
+ * @brief Constants and Structures Associated with the Message Queue Manager
+ *
* This include file contains all the constants and structures associated
* with the Message Queue Manager. This manager provides a mechanism for
* communication and synchronization between tasks using messages.
diff --git a/cpukit/rtems/include/rtems/rtems/modes.h b/cpukit/rtems/include/rtems/rtems/modes.h
index f80cb449cc..6ac7d15773 100644
--- a/cpukit/rtems/include/rtems/rtems/modes.h
+++ b/cpukit/rtems/include/rtems/rtems/modes.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/modes.h
*
+ * @brief Constants and Structures Associated with the RTEMS thread and RTEMS_ASR modes
+ *
* This include file contains all constants and structures associated
* with the RTEMS thread and RTEMS_ASR modes.
*/
diff --git a/cpukit/rtems/include/rtems/rtems/options.h b/cpukit/rtems/include/rtems/rtems/options.h
index 8746e5516e..6b30cc3044 100644
--- a/cpukit/rtems/include/rtems/rtems/options.h
+++ b/cpukit/rtems/include/rtems/rtems/options.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/options.h
*
+ * @brief Information Which Defines the Options Available on Many Directives.
+ *
* This include file contains information which defines the
* options available on many directives.
*/
diff --git a/cpukit/rtems/include/rtems/rtems/part.h b/cpukit/rtems/include/rtems/rtems/part.h
index e62e9043fc..ff1cedd823 100644
--- a/cpukit/rtems/include/rtems/rtems/part.h
+++ b/cpukit/rtems/include/rtems/rtems/part.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/part.h
*
+ * @brief Constants and Structures Associated with the Partition Manager
+ *
* This include file contains all the constants and structures associated
* with the Partition Manager. This manager provides facilities to
* dynamically allocate memory in fixed-sized units which are returned
diff --git a/cpukit/rtems/include/rtems/rtems/ratemon.h b/cpukit/rtems/include/rtems/rtems/ratemon.h
index 475a90a5be..2ea3d23a13 100644
--- a/cpukit/rtems/include/rtems/rtems/ratemon.h
+++ b/cpukit/rtems/include/rtems/rtems/ratemon.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/ratemon.h
*
+ * @brief Constants, Structures, and Prototypes Associated to the Classic API Rate Monotonic Manager.
+ *
* This include file contains all the constants, structures, and
* prototypes associated with the Rate Monotonic Manager. This manager
* provides facilities to implement threads which execute in a periodic
diff --git a/cpukit/rtems/include/rtems/rtems/region.h b/cpukit/rtems/include/rtems/rtems/region.h
index 5ab0e47347..73d66d290d 100644
--- a/cpukit/rtems/include/rtems/rtems/region.h
+++ b/cpukit/rtems/include/rtems/rtems/region.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/region.h
*
+ * @brief Constants and Structures Associated with the Region Manager
+ *
* This include file contains all the constants and structures associated
* with the Region Manager. This manager provides facilities to dynamically
* allocate memory in variable sized units which are returned as segments.
@@ -123,11 +125,11 @@ rtems_status_code rtems_region_create(
* region will have the name name. The memory area managed by
* the region will be attempted to be grown by length bytes using
* the memory starting at starting_address.
- *
+ *
* @param[in] id is the id of region to grow
* @param[in] starting_address starting address of memory area for extension
* @param[in] length is the physical length in bytes to grow the region
- *
+ *
* @return This method returns RTEMS_SUCCESSFUL if there was not an
* error. Otherwise, a status code is returned indicating the
* source of the error.
@@ -145,10 +147,10 @@ rtems_status_code rtems_region_extend(
* This directive returns the region ID associated with name.
* If more than one region is named name, then the region
* to which the ID belongs is arbitrary.
- *
+ *
* @param[in] name is the user defined region name
* @param[in] id is the pointer to region id
- *
+ *
* @return This method returns RTEMS_SUCCESSFUL if there was not an
* error. Otherwise, a status code is returned indicating the
* source of the error. If successful, the id will
@@ -184,10 +186,10 @@ rtems_status_code rtems_region_get_information(
* This directive returns information about the free blocks in the
* heap associated with this region. Information about the used blocks
* will be returned as zero.
- *
+ *
* @param[in] id is the region id
* @param[in] the_info is the pointer to region information block
- *
+ *
* @return This method returns RTEMS_SUCCESSFUL if there was not an
* error. Otherwise, a status code is returned indicating the
* source of the error. If successful, the the_info will
@@ -204,9 +206,9 @@ rtems_status_code rtems_region_get_free_information(
* This routine implements the rtems_region_delete directive. The
* region indicated by ID is deleted, provided that none of its segments are
* still allocated.
- *
+ *
* @param[in] id is the region id
- *
+ *
* @return This method returns RTEMS_SUCCESSFUL if there was not an
* error. Otherwise, a status code is returned indicating the
* source of the error.
@@ -225,17 +227,17 @@ rtems_status_code rtems_region_delete(
* may return immediately or block waiting for a segment with an optional
* timeout of @a timeout clock ticks. Whether the task blocks or returns
* immediately is based on the no_wait option in the @a option_set.
- *
+ *
* @param[in] id is the region id
* @param[in] size is the segment size in bytes
* @param[in] option_set is the wait option
* @param[in] timeout is the number of ticks to wait (0 means wait forever)
* @param[in] segment is the pointer to segment address
- *
+ *
* @return This method returns RTEMS_SUCCESSFUL if there was not an
* error. Otherwise, a status code is returned indicating the
* source of the error. If successful, the segment will
- * be filled in with the segment address.
+ * be filled in with the segment address.
*/
rtems_status_code rtems_region_get_segment(
rtems_id id,
@@ -250,11 +252,11 @@ rtems_status_code rtems_region_get_segment(
*
* This routine implements the rtems_region_get_segment_size directive. It
* returns the size in bytes of the specified user memory area.
- *
+ *
* @param[in] id is the region id
* @param[in] segment is the segment address
* @param[in] size is the pointer to segment size in bytes
- *
+ *
* @return This method returns RTEMS_SUCCESSFUL if there was not an
* error. Otherwise, a status code is returned indicating the
* source of the error. If successful, the size will
@@ -276,10 +278,10 @@ rtems_status_code rtems_region_get_segment_size(
* rtems_region_get_segment of the first blocked task, then that task and as
* many subsequent tasks as possible will be unblocked with their requests
* satisfied.
- *
+ *
* @param[in] id is the region id
* @param[in] segment is the pointer to segment address
- *
+ *
* @return RTEMS_SUCCESSFUL if successful or error code if unsuccessful
*/
rtems_status_code rtems_region_return_segment(
diff --git a/cpukit/rtems/include/rtems/rtems/status.h b/cpukit/rtems/include/rtems/rtems/status.h
index bb2646e24e..98923a0d53 100644
--- a/cpukit/rtems/include/rtems/rtems/status.h
+++ b/cpukit/rtems/include/rtems/rtems/status.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/status.h
*
+ * @brief Status Codes Returned from the Executive Directives
+ *
* This include file contains the status codes returned from the
* executive directives.
*/
@@ -184,7 +186,7 @@ typedef enum {
/**
* @brief Status Object Name Errors to Status Array
- *
+ *
* This array is used to map SuperCore Object Handler return
* codes to Classic API status codes.
*/
diff --git a/cpukit/rtems/include/rtems/rtems/timer.h b/cpukit/rtems/include/rtems/rtems/timer.h
index d8c7760403..29c9f092ec 100644
--- a/cpukit/rtems/include/rtems/rtems/timer.h
+++ b/cpukit/rtems/include/rtems/rtems/timer.h
@@ -1,6 +1,8 @@
/**
* @file rtems/rtems/timer.h
*
+ * @brief Constants, Structures, and Prototypes Associated with the Timer Manager
+ *
* This include file contains all the constants, structures, and
* prototypes associated with the Timer Manager. This manager provides
* facilities to configure, initiate, cancel, and delete timers which will
diff --git a/cpukit/sapi/include/rtems/rbheap.h b/cpukit/sapi/include/rtems/rbheap.h
index 5481e8954f..39bbc69a3f 100644
--- a/cpukit/sapi/include/rtems/rbheap.h
+++ b/cpukit/sapi/include/rtems/rbheap.h
@@ -1,9 +1,9 @@
/**
* @file
*
- * @ingroup RBHeap
+ * @brief Red-Black Tree Heap API
*
- * @brief Red-Black Tree Heap API.
+ * @ingroup RBHeap
*/
/*
diff --git a/cpukit/score/include/rtems/debug.h b/cpukit/score/include/rtems/debug.h
index 4087e4ae94..101aea1478 100644
--- a/cpukit/score/include/rtems/debug.h
+++ b/cpukit/score/include/rtems/debug.h
@@ -1,6 +1,8 @@
/**
* @file rtems/debug.h
*
+ * @brief Information Related to the Debug Support Within RTEMS
+ *
* This include file contains the information pertaining to the debug
* support within RTEMS. It is currently cast in the form of a
* Manager since it is externally accessible.
@@ -65,7 +67,7 @@ void rtems_debug_disable(
/**
* @brief Check if Debug is Enabled
- *
+ *
* This routine returns TRUE if the requested debug level is
* enabled, and FALSE otherwise.
*/
diff --git a/testsuites/fstests/fsdosfsformat01/init.c b/testsuites/fstests/fsdosfsformat01/init.c
index 1af9be8cf5..6299c9b50a 100644
--- a/testsuites/fstests/fsdosfsformat01/init.c
+++ b/testsuites/fstests/fsdosfsformat01/init.c
@@ -159,7 +159,7 @@ static void test( void )
const char dev_name[] = "/dev/rda";
const char mount_dir[] = "/mnt";
msdos_format_request_param_t rqdata;
-
+ rtems_blkdev_bnum media_block_count;
memset( &rqdata, 0, sizeof( rqdata ) );
@@ -217,23 +217,30 @@ static void test( void )
rv = msdos_format( dev_name, &rqdata );
rtems_test_assert( rv != 0 );
+ /* Optimized for read/write speed */
rqdata.OEMName = NULL;
rqdata.VolLabel = NULL;
- rqdata.sectors_per_cluster = 16; /* Invalid number of sectors per cluster for FAT12 */
- rqdata.fat_num = 1;
- rqdata.files_per_root_dir = 32;
+ rqdata.sectors_per_cluster = 8;
+ rqdata.fat_num = 0;
+ rqdata.files_per_root_dir = 0;
rqdata.media = 0; /* Media code. 0 == Default */
rqdata.quick_format = true;
rqdata.skip_alignment = false;
rv = msdos_format( dev_name, &rqdata );
- rtems_test_assert( rv != 0 );
+ rtems_test_assert( rv == 0 );
+ test_disk_params( dev_name,
+ mount_dir,
+ SECTOR_SIZE,
+ SECTOR_SIZE * rqdata.sectors_per_cluster,
+ rqdata.sectors_per_cluster );
- /* Optimized for read/write speed */
+ /* The same disk formatted with FAT16 because sectors per cluster is too high
+ * for FAT12 */
rqdata.OEMName = NULL;
rqdata.VolLabel = NULL;
- rqdata.sectors_per_cluster = 8;
- rqdata.fat_num = 0;
- rqdata.files_per_root_dir = 0;
+ rqdata.sectors_per_cluster = 16;
+ rqdata.fat_num = 1;
+ rqdata.files_per_root_dir = 32;
rqdata.media = 0; /* Media code. 0 == Default */
rqdata.quick_format = true;
rqdata.skip_alignment = false;
@@ -275,7 +282,7 @@ static void test( void )
dev_name,
SECTOR_SIZE,
1024,
- ( FAT16_MAX_CLN * FAT16_DEFAULT_SECTORS_PER_CLUSTER ) - 1L,
+ ( FAT12_MAX_CLN * FAT12_DEFAULT_SECTORS_PER_CLUSTER ) + 1L,
0
);
rtems_test_assert( RTEMS_SUCCESSFUL == sc );
@@ -291,7 +298,11 @@ static void test( void )
rqdata.skip_alignment = true;
rv = msdos_format( dev_name, &rqdata );
rtems_test_assert( rv == 0 );
- test_disk_params( dev_name, mount_dir, SECTOR_SIZE, SECTOR_SIZE, 1 );
+ test_disk_params( dev_name,
+ mount_dir,
+ SECTOR_SIZE,
+ rqdata.sectors_per_cluster * SECTOR_SIZE,
+ rqdata.sectors_per_cluster );
rv = unlink( dev_name );
rtems_test_assert( rv == 0 );
@@ -361,6 +372,44 @@ static void test( void )
rv = unlink( dev_name );
rtems_test_assert( rv == 0 );
+ /* Format some disks from 1MB up to 128GB */
+ rqdata.OEMName = NULL;
+ rqdata.VolLabel = NULL;
+ rqdata.sectors_per_cluster = 64;
+ rqdata.fat_num = 0;
+ rqdata.files_per_root_dir = 0;
+ rqdata.media = 0;
+ rqdata.quick_format = true;
+ rqdata.skip_alignment = false;
+ for (
+ media_block_count = 1 * 1024 * ( 1024 / SECTOR_SIZE );
+ media_block_count <= 128 * 1024 * 1024 * ( 1024 / SECTOR_SIZE );
+ media_block_count *= 2
+ ) {
+ sc = rtems_sparse_disk_create_and_register(
+ dev_name,
+ SECTOR_SIZE,
+ 64,
+ media_block_count,
+ 0
+ );
+ rtems_test_assert( sc == RTEMS_SUCCESSFUL );
+
+ rv = msdos_format( dev_name, &rqdata );
+ rtems_test_assert( rv == 0 );
+
+ test_disk_params(
+ dev_name,
+ mount_dir,
+ SECTOR_SIZE,
+ SECTOR_SIZE * rqdata.sectors_per_cluster,
+ rqdata.sectors_per_cluster
+ );
+
+ rv = unlink( dev_name );
+ rtems_test_assert( rv == 0 );
+ }
+
/* FAT32 */
sc = rtems_sparse_disk_create_and_register(
diff --git a/testsuites/fstests/fsdosfssync01/init.c b/testsuites/fstests/fsdosfssync01/init.c
index 72481b29b8..fc38e2cfd9 100644
--- a/testsuites/fstests/fsdosfssync01/init.c
+++ b/testsuites/fstests/fsdosfssync01/init.c
@@ -89,6 +89,11 @@ static void check_file_size(const char *file, off_t size)
static void test(const char *rda, const char *mnt, const char *file)
{
+ static const msdos_format_request_param_t rqdata = {
+ .quick_format = true,
+ .sync_device = true
+ };
+
rtems_status_code sc;
int disk_fd;
int rv;
@@ -99,7 +104,7 @@ static void test(const char *rda, const char *mnt, const char *file)
disk_fd = open(rda, O_RDWR);
rtems_test_assert(disk_fd >= 0);
- rv = msdos_format(rda, NULL);
+ rv = msdos_format(rda, &rqdata);
rtems_test_assert(rv == 0);
rv = mount_and_make_target_path(
diff --git a/testsuites/libtests/termios02/init.c b/testsuites/libtests/termios02/init.c
index 7659314960..e944bca9af 100644
--- a/testsuites/libtests/termios02/init.c
+++ b/testsuites/libtests/termios02/init.c
@@ -47,56 +47,63 @@ rtems_task Init(
tcdrain(2);
rtems_test_assert( !sc );
- puts( "" );
+ puts( "" );
/***** TEST TCFLOW *****/
puts( "tcflow(stdin, TCOOFF) - ENOTSUP" );
+ errno = 0;
sc = tcflow( 0, TCOOFF );
rtems_test_assert( sc == -1 );
- rtems_test_assert( errno = ENOTSUP );
+ rtems_test_assert( errno == ENOTSUP );
puts( "tcflow(stdin, TCOON) - ENOTSUP" );
+ errno = 0;
sc = tcflow( 0, TCOON );
rtems_test_assert( sc == -1 );
- rtems_test_assert( errno = ENOTSUP );
+ rtems_test_assert( errno == ENOTSUP );
puts( "tcflow(stdin, TCIOFF) - ENOTSUP" );
+ errno = 0;
sc = tcflow( 0, TCIOFF );
rtems_test_assert( sc == -1 );
- rtems_test_assert( errno = ENOTSUP );
+ rtems_test_assert( errno == ENOTSUP );
puts( "tcflow(stdin, TCION) - ENOTSUP" );
+ errno = 0;
sc = tcflow( 0, TCION );
rtems_test_assert( sc == -1 );
- rtems_test_assert( errno = ENOTSUP );
+ rtems_test_assert( errno == ENOTSUP );
puts( "tcflow(stdin, 22) - EINVAL" );
+ errno = 0;
sc = tcflow( 0, 22 );
rtems_test_assert( sc == -1 );
- rtems_test_assert( errno = EINVAL );
+ rtems_test_assert( errno == EINVAL );
- puts( "" );
+ puts( "" );
/***** TEST TCFLUSH *****/
- puts( "tcflush(stdin, TCIFLUSH) - ENOTSUP" );
+ puts( "tcflush(stdin, TCIFLUSH) - OK" );
+ errno = 0;
sc = tcflush( 0, TCIFLUSH );
- rtems_test_assert( sc == -1 );
- rtems_test_assert( errno = ENOTSUP );
+ rtems_test_assert( sc == 0 );
+ rtems_test_assert( errno == 0 );
- puts( "tcflush(stdin, TCOFLUSH) - ENOTSUP" );
+ puts( "tcflush(stdin, TCOFLUSH) - OK" );
sc = tcflush( 0, TCOFLUSH );
- rtems_test_assert( sc == -1 );
- rtems_test_assert( errno = ENOTSUP );
+ rtems_test_assert( sc == 0 );
+ rtems_test_assert( errno == 0 );
- puts( "tcflush(stdin, TCIOFLUSH) - ENOTSUP" );
+ puts( "tcflush(stdin, TCIOFLUSH) - OK" );
sc = tcflush( 0, TCIOFLUSH );
- rtems_test_assert( sc == -1 );
- rtems_test_assert( errno = ENOTSUP );
+ rtems_test_assert( sc == 0 );
+ rtems_test_assert( errno == 0 );
puts( "tcflush(stdin, 22) - EINVAL" );
+ errno = 0;
sc = tcflush( 0, 22 );
rtems_test_assert( sc == -1 );
- rtems_test_assert( errno = EINVAL );
+ rtems_test_assert( errno == EINVAL );
puts( "" );
diff --git a/testsuites/libtests/termios02/termios02.scn b/testsuites/libtests/termios02/termios02.scn
index 5e29a9cc65..9b38d69ba1 100644
--- a/testsuites/libtests/termios02/termios02.scn
+++ b/testsuites/libtests/termios02/termios02.scn
@@ -10,9 +10,9 @@ tcflow(stdin, TCIOFF) - ENOTSUP
tcflow(stdin, TCION) - ENOTSUP
tcflow(stdin, 22) - EINVAL
-tcflush(stdin, TCIFLUSH) - ENOTSUP
-tcflush(stdin, TCOFLUSH) - ENOTSUP
-tcflush(stdin, TCIOFLUSH) - ENOTSUP
+tcflush(stdin, TCIFLUSH) - OK
+tcflush(stdin, TCOFLUSH) - OK
+tcflush(stdin, TCIOFLUSH) - OK
tcflush(stdin, 22) - EINVAL
tcgetpgrp( 1 ) - OK