summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2012-12-20 04:10:01 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2012-12-20 04:10:01 -0600
commit4e663ae7b5f896be300acf5c31d18d582ae44604 (patch)
tree4e7c41687150824dab00588c2f0c7ae4b8c5b1e4
parentMerge branch 'master' of ssh://git.rtems.org/data/git/rtems (diff)
parentlibfs: Doxygen Enhancement Task #1 (diff)
downloadrtems-4e663ae7b5f896be300acf5c31d18d582ae44604.tar.bz2
Merge branch 'master' of ssh://git.rtems.org/data/git/rtems
-rw-r--r--c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h5
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/Makefile.am1
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/console/console-config.c15
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/include/bsp.h4
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/include/lpc-ethernet-config.h5
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/misc/idle-thread.c34
-rw-r--r--c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c1
-rw-r--r--c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c661
-rwxr-xr-xconfig.sub8
-rw-r--r--cpukit/libblock/include/rtems/blkdev.h2
-rw-r--r--cpukit/libcsupport/include/rtems/assoc.h3
-rw-r--r--cpukit/libcsupport/include/rtems/libcsupport.h6
-rw-r--r--cpukit/libcsupport/include/rtems/libio.h139
-rw-r--r--cpukit/libcsupport/include/rtems/libio_.h26
-rw-r--r--cpukit/libcsupport/include/rtems/malloc.h2
-rw-r--r--cpukit/libcsupport/include/sys/termios.h4
-rw-r--r--cpukit/libcsupport/src/__gettod.c22
-rw-r--r--cpukit/libcsupport/src/__times.c26
-rw-r--r--cpukit/libcsupport/src/assocnamebyremote.c8
-rw-r--r--cpukit/libcsupport/src/cfgetispeed.c9
-rw-r--r--cpukit/libcsupport/src/freenode.c8
-rw-r--r--cpukit/libcsupport/src/getchark.c7
-rw-r--r--cpukit/libcsupport/src/getlogin.c15
-rw-r--r--cpukit/libcsupport/src/libio.c37
-rw-r--r--cpukit/libcsupport/src/libio_init.c17
-rw-r--r--cpukit/libcsupport/src/malloc_dirtier.c9
-rw-r--r--cpukit/libcsupport/src/malloc_get_statistics.c9
-rw-r--r--cpukit/libcsupport/src/mallocfreespace.c10
-rw-r--r--cpukit/libcsupport/src/readv.c20
-rw-r--r--cpukit/libcsupport/src/setsid.c10
-rw-r--r--cpukit/libcsupport/src/stat.c25
-rw-r--r--cpukit/libcsupport/src/sup_fs_check_permissions.c7
-rw-r--r--cpukit/libcsupport/src/sup_fs_location.c7
-rw-r--r--cpukit/libcsupport/src/termios_setinitialbaud.c7
-rw-r--r--cpukit/libcsupport/src/ttyname.c12
-rw-r--r--cpukit/libcsupport/src/utime.c12
-rw-r--r--cpukit/libfs/src/devfs/devclose.c7
-rw-r--r--cpukit/libfs/src/devfs/devfs.h6
-rw-r--r--cpukit/libfs/src/devfs/devfs_show.c7
-rw-r--r--cpukit/libfs/src/devfs/devstat.c7
-rw-r--r--cpukit/libfs/src/dosfs/fat.c15
-rw-r--r--cpukit/libfs/src/dosfs/fat_fat_operations.c11
-rw-r--r--cpukit/libfs/src/dosfs/fat_fat_operations.h8
-rw-r--r--cpukit/libfs/src/dosfs/fat_file.c11
-rw-r--r--cpukit/libfs/src/dosfs/fat_file.h8
-rw-r--r--cpukit/libfs/src/dosfs/msdos.h46
-rw-r--r--cpukit/libfs/src/dosfs/msdos_conv.c12
-rw-r--r--cpukit/libfs/src/dosfs/msdos_create.c9
-rw-r--r--cpukit/libfs/src/dosfs/msdos_dir.c9
-rw-r--r--cpukit/libfs/src/dosfs/msdos_file.c9
-rw-r--r--cpukit/libfs/src/dosfs/msdos_format.c42
-rw-r--r--cpukit/libfs/src/dosfs/msdos_free.c10
-rw-r--r--cpukit/libfs/src/dosfs/msdos_fsunmount.c9
-rw-r--r--cpukit/libfs/src/dosfs/msdos_handlers_dir.c9
-rw-r--r--cpukit/libfs/src/dosfs/msdos_handlers_file.c9
-rw-r--r--cpukit/libfs/src/dosfs/msdos_init.c9
-rw-r--r--cpukit/libfs/src/dosfs/msdos_initsupp.c9
-rw-r--r--cpukit/libfs/src/dosfs/msdos_misc.c9
-rw-r--r--cpukit/libfs/src/dosfs/msdos_node_type.c9
-rw-r--r--cpukit/libfs/src/dosfs/msdos_rename.c9
-rw-r--r--cpukit/libfs/src/dosfs/msdos_rmnod.c9
-rw-r--r--cpukit/libfs/src/imfs/deviceio.c12
-rw-r--r--cpukit/libfs/src/imfs/imfs.h243
-rw-r--r--cpukit/libfs/src/imfs/imfs_chown.c12
-rw-r--r--cpukit/libfs/src/imfs/imfs_config.c7
-rw-r--r--cpukit/libfs/src/imfs/imfs_creat.c14
-rw-r--r--cpukit/libfs/src/imfs/imfs_debug.c26
-rw-r--r--cpukit/libfs/src/imfs/imfs_directory.c24
-rw-r--r--cpukit/libfs/src/imfs/imfs_eval.c9
-rw-r--r--cpukit/libfs/src/imfs/imfs_fchmod.c9
-rw-r--r--cpukit/libfs/src/imfs/imfs_fifo.c9
-rw-r--r--cpukit/libfs/src/imfs/imfs_fsunmount.c13
-rw-r--r--cpukit/libfs/src/imfs/imfs_handlers_device.c9
-rw-r--r--cpukit/libfs/src/imfs/imfs_handlers_directory.c9
-rw-r--r--cpukit/libfs/src/imfs/imfs_handlers_link.c9
-rw-r--r--cpukit/libfs/src/imfs/imfs_handlers_memfile.c9
-rw-r--r--cpukit/libfs/src/imfs/imfs_initsupp.c9
-rw-r--r--cpukit/libfs/src/imfs/imfs_link.c13
-rw-r--r--cpukit/libfs/src/imfs/imfs_load_tar.c57
-rw-r--r--cpukit/libfs/src/imfs/imfs_make_generic_node.c7
-rw-r--r--cpukit/libfs/src/imfs/imfs_mknod.c11
-rw-r--r--cpukit/libfs/src/imfs/imfs_mount.c9
-rw-r--r--cpukit/libfs/src/imfs/imfs_ntype.c12
-rw-r--r--cpukit/libfs/src/imfs/imfs_readlink.c12
-rw-r--r--cpukit/libfs/src/imfs/imfs_rename.c12
-rw-r--r--cpukit/libfs/src/imfs/imfs_rmnod.c12
-rw-r--r--cpukit/libfs/src/imfs/imfs_stat.c11
-rw-r--r--cpukit/libfs/src/imfs/imfs_symlink.c13
-rw-r--r--cpukit/libfs/src/imfs/imfs_unmount.c9
-rw-r--r--cpukit/libfs/src/imfs/imfs_utime.c12
-rw-r--r--cpukit/libfs/src/imfs/ioman.c16
-rw-r--r--cpukit/libfs/src/imfs/memfile.c36
-rw-r--r--cpukit/libfs/src/pipe/fifo.c31
-rw-r--r--cpukit/libfs/src/pipe/pipe.c12
-rw-r--r--cpukit/libfs/src/pipe/pipe.h29
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c20
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-block.c30
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c3
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-inode.c19
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-link.c20
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-mutex.c13
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c19
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-rtems.c14
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-rtems.h2
-rw-r--r--cpukit/libmisc/shell/main_ifconfig.c4
-rw-r--r--cpukit/libmisc/stringto/stringto.h7
-rw-r--r--cpukit/libmisc/stringto/stringtodouble.c9
-rw-r--r--cpukit/libmisc/stringto/stringtoint.c9
-rw-r--r--cpukit/libmisc/stringto/stringtolong.c9
-rw-r--r--cpukit/libmisc/stringto/stringtolonglong.c9
-rw-r--r--cpukit/libmisc/stringto/stringtopointer.c7
-rw-r--r--cpukit/libmisc/stringto/stringtounsignedint.c9
-rw-r--r--cpukit/libmisc/stringto/stringtounsignedlong.c9
-rw-r--r--cpukit/libmisc/untar/untar.c13
-rw-r--r--cpukit/libmisc/untar/untar.h8
-rw-r--r--cpukit/libnetworking/rtems/rtems_bsdnet_internal.h2
-rw-r--r--cpukit/libnetworking/rtems/rtems_glue.c4
-rw-r--r--cpukit/posix/include/aio.h20
-rw-r--r--cpukit/posix/include/mqueue.h42
-rw-r--r--cpukit/posix/include/rtems/posix/cond.h11
-rw-r--r--cpukit/posix/include/rtems/posix/key.h2
-rw-r--r--cpukit/posix/include/rtems/posix/mqueue.h58
-rw-r--r--cpukit/posix/include/rtems/posix/mutex.h18
-rw-r--r--cpukit/posix/include/rtems/posix/priority.h10
-rw-r--r--cpukit/posix/include/rtems/posix/psignalimpl.h25
-rw-r--r--cpukit/posix/include/rtems/posix/pthread.h23
-rw-r--r--cpukit/posix/include/rtems/posix/ptimer.h12
-rw-r--r--cpukit/posix/include/rtems/posix/rwlock.h10
-rw-r--r--cpukit/posix/include/rtems/posix/semaphore.h17
-rw-r--r--cpukit/posix/include/rtems/posix/spinlock.h10
-rw-r--r--cpukit/posix/include/semaphore.h55
-rw-r--r--cpukit/posix/src/_execve.c9
-rw-r--r--cpukit/posix/src/adjtime.c16
-rw-r--r--cpukit/posix/src/aio_cancel.c24
-rw-r--r--cpukit/posix/src/aio_error.c7
-rw-r--r--cpukit/posix/src/aio_fsync.c7
-rw-r--r--cpukit/posix/src/aio_misc.c7
-rw-r--r--cpukit/posix/src/aio_read.c7
-rw-r--r--cpukit/posix/src/aio_return.c7
-rw-r--r--cpukit/posix/src/aio_suspend.c7
-rw-r--r--cpukit/posix/src/aio_write.c7
-rw-r--r--cpukit/posix/src/alarm.c7
-rw-r--r--cpukit/posix/src/barrierattrdestroy.c7
-rw-r--r--cpukit/posix/src/barrierattrinit.c11
-rw-r--r--cpukit/posix/src/barrierattrsetpshared.c11
-rw-r--r--cpukit/posix/src/cancel.c7
-rw-r--r--cpukit/posix/src/canceleval.c7
-rw-r--r--cpukit/posix/src/cancelrun.c7
-rw-r--r--cpukit/posix/src/cleanuppop.c7
-rw-r--r--cpukit/posix/src/clockgetcpuclockid.c7
-rw-r--r--cpukit/posix/src/clockgetenableattr.c7
-rw-r--r--cpukit/posix/src/clockgetres.c7
-rw-r--r--cpukit/posix/src/clockgettime.c7
-rw-r--r--cpukit/posix/src/clocksetenableattr.c7
-rw-r--r--cpukit/posix/src/condattrdestroy.c7
-rw-r--r--cpukit/posix/src/condattrgetpshared.c10
-rw-r--r--cpukit/posix/src/condattrinit.c7
-rw-r--r--cpukit/posix/src/condattrsetpshared.c7
-rw-r--r--cpukit/posix/src/condbroadcast.c10
-rw-r--r--cpukit/posix/src/conddefaultattributes.c7
-rw-r--r--cpukit/posix/src/conddestroy.c10
-rw-r--r--cpukit/posix/src/condinit.c10
-rw-r--r--cpukit/posix/src/condsignal.c10
-rw-r--r--cpukit/posix/src/condwait.c7
-rw-r--r--cpukit/posix/src/condwaitsupp.c14
-rw-r--r--cpukit/posix/src/execl.c7
-rw-r--r--cpukit/posix/src/execle.c9
-rw-r--r--cpukit/posix/src/execlp.c9
-rw-r--r--cpukit/posix/src/execv.c7
-rw-r--r--cpukit/posix/src/execve.c12
-rw-r--r--cpukit/posix/src/execvp.c9
-rw-r--r--cpukit/posix/src/fork.c7
-rw-r--r--cpukit/posix/src/getitimer.c7
-rw-r--r--cpukit/posix/src/keycreate.c10
-rw-r--r--cpukit/posix/src/keydelete.c7
-rw-r--r--cpukit/posix/src/keyfreememory.c7
-rw-r--r--cpukit/posix/src/keygetspecific.c7
-rw-r--r--cpukit/posix/src/keyrundestructors.c7
-rw-r--r--cpukit/posix/src/keysetspecific.c7
-rw-r--r--cpukit/posix/src/kill.c9
-rw-r--r--cpukit/posix/src/kill_r.c7
-rw-r--r--cpukit/posix/src/killinfo.c7
-rw-r--r--cpukit/posix/src/lio_listio.c7
-rw-r--r--cpukit/posix/src/mqueue.c19
-rw-r--r--cpukit/posix/src/mqueueclose.c7
-rw-r--r--cpukit/posix/src/mqueuedeletesupp.c23
-rw-r--r--cpukit/posix/src/mqueuegetattr.c7
-rw-r--r--cpukit/posix/src/mqueuenotify.c24
-rw-r--r--cpukit/posix/src/mqueueopen.c7
-rw-r--r--cpukit/posix/src/mqueuereceive.c25
-rw-r--r--cpukit/posix/src/mqueuerecvsupp.c19
-rw-r--r--cpukit/posix/src/mqueuesend.c7
-rw-r--r--cpukit/posix/src/mqueuesendsupp.c7
-rw-r--r--cpukit/posix/src/mqueuesetattr.c23
-rw-r--r--cpukit/posix/src/mqueuetimedreceive.c7
-rw-r--r--cpukit/posix/src/mqueuetimedsend.c21
-rw-r--r--cpukit/posix/src/mqueuetranslatereturncode.c7
-rw-r--r--cpukit/posix/src/mutex.c7
-rw-r--r--cpukit/posix/src/mutexattrdestroy.c12
-rw-r--r--cpukit/posix/src/mutexattrgetprotocol.c7
-rw-r--r--cpukit/posix/src/mutexattrgetpshared.c7
-rw-r--r--cpukit/posix/src/mutexattrgettype.c7
-rw-r--r--cpukit/posix/src/mutexattrinit.c10
-rw-r--r--cpukit/posix/src/mutexattrsetprioceiling.c7
-rw-r--r--cpukit/posix/src/mutexattrsetprotocol.c7
-rw-r--r--cpukit/posix/src/mutexattrsetpshared.c7
-rw-r--r--cpukit/posix/src/mutexattrsettype.c7
-rw-r--r--cpukit/posix/src/mutexdestroy.c7
-rw-r--r--cpukit/posix/src/mutexget.c9
-rw-r--r--cpukit/posix/src/mutexgetprioceiling.c7
-rw-r--r--cpukit/posix/src/mutexinit.c15
-rw-r--r--cpukit/posix/src/mutexlock.c7
-rw-r--r--cpukit/posix/src/mutexlocksupp.c7
-rw-r--r--cpukit/posix/src/mutexsetprioceiling.c7
-rw-r--r--cpukit/posix/src/mutextimedlock.c14
-rw-r--r--cpukit/posix/src/mutextranslatereturncode.c20
-rw-r--r--cpukit/posix/src/mutextrylock.c14
-rw-r--r--cpukit/posix/src/mutexunlock.c7
-rw-r--r--cpukit/posix/src/nanosleep.c7
-rw-r--r--cpukit/posix/src/pause.c14
-rw-r--r--cpukit/posix/src/pbarrierdestroy.c25
-rw-r--r--cpukit/posix/src/pbarrierinit.c7
-rw-r--r--cpukit/posix/src/pbarriertranslatereturncode.c7
-rw-r--r--cpukit/posix/src/pbarrierwait.c25
-rw-r--r--cpukit/posix/src/prwlockdestroy.c22
-rw-r--r--cpukit/posix/src/prwlockinit.c7
-rw-r--r--cpukit/posix/src/prwlockrdlock.c23
-rw-r--r--cpukit/posix/src/prwlocktimedrdlock.c9
-rw-r--r--cpukit/posix/src/prwlocktimedwrlock.c7
-rw-r--r--cpukit/posix/src/prwlocktranslatereturncode.c20
-rw-r--r--cpukit/posix/src/prwlocktryrdlock.c9
-rw-r--r--cpukit/posix/src/prwlockunlock.c7
-rw-r--r--cpukit/posix/src/prwlockwrlock.c7
-rw-r--r--cpukit/posix/src/psignal.c11
-rw-r--r--cpukit/posix/src/psignalchecksignal.c12
-rw-r--r--cpukit/posix/src/psignalclearprocesssignals.c7
-rw-r--r--cpukit/posix/src/psignalclearsignals.c7
-rw-r--r--cpukit/posix/src/psignalsetprocesssignals.c11
-rw-r--r--cpukit/posix/src/psignalunblockthread.c13
-rw-r--r--cpukit/posix/src/pspindestroy.c23
-rw-r--r--cpukit/posix/src/pspininit.c7
-rw-r--r--cpukit/posix/src/pspinlock.c25
-rw-r--r--cpukit/posix/src/pspinlocktranslatereturncode.c20
-rw-r--r--cpukit/posix/src/pspinunlock.c7
-rw-r--r--cpukit/posix/src/psxnametoid.c7
-rw-r--r--cpukit/posix/src/psxpriorityisvalid.c7
-rw-r--r--cpukit/posix/src/psxtransschedparam.c10
-rw-r--r--cpukit/posix/src/pthread.c7
-rw-r--r--cpukit/posix/src/pthreadatfork.c30
-rw-r--r--cpukit/posix/src/pthreadattrdestroy.c9
-rw-r--r--cpukit/posix/src/pthreadattrgetdetachstate.c7
-rw-r--r--cpukit/posix/src/pthreadattrgetguardsize.c9
-rw-r--r--cpukit/posix/src/pthreadattrgetinheritsched.c9
-rw-r--r--cpukit/posix/src/pthreadattrgetschedparam.c7
-rw-r--r--cpukit/posix/src/pthreadattrgetschedpolicy.c12
-rw-r--r--cpukit/posix/src/pthreadattrgetscope.c7
-rw-r--r--cpukit/posix/src/pthreadattrgetstack.c7
-rw-r--r--cpukit/posix/src/pthreadattrgetstackaddr.c9
-rw-r--r--cpukit/posix/src/pthreadattrgetstacksize.c9
-rw-r--r--cpukit/posix/src/pthreadattrinit.c12
-rw-r--r--cpukit/posix/src/pthreadattrsetdetachstate.c9
-rw-r--r--cpukit/posix/src/pthreadattrsetguardsize.c9
-rw-r--r--cpukit/posix/src/pthreadattrsetinheritsched.c7
-rw-r--r--cpukit/posix/src/pthreadattrsetschedparam.c9
-rw-r--r--cpukit/posix/src/pthreadattrsetschedpolicy.c7
-rw-r--r--cpukit/posix/src/pthreadattrsetscope.c7
-rw-r--r--cpukit/posix/src/pthreadattrsetstack.c7
-rw-r--r--cpukit/posix/src/pthreadattrsetstackaddr.c7
-rw-r--r--cpukit/posix/src/pthreadattrsetstacksize.c7
-rw-r--r--cpukit/posix/src/pthreadcreate.c7
-rw-r--r--cpukit/posix/src/pthreaddetach.c12
-rw-r--r--cpukit/posix/src/pthreadequal.c9
-rw-r--r--cpukit/posix/src/pthreadgetcpuclockid.c7
-rw-r--r--cpukit/posix/src/pthreadgetschedparam.c7
-rw-r--r--cpukit/posix/src/pthreadinitthreads.c18
-rw-r--r--cpukit/posix/src/pthreadjoin.c7
-rw-r--r--cpukit/posix/src/pthreadkill.c7
-rw-r--r--cpukit/posix/src/pthreadonce.c7
-rw-r--r--cpukit/posix/src/pthreadself.c7
-rw-r--r--cpukit/posix/src/pthreadsetschedparam.c7
-rw-r--r--cpukit/posix/src/pthreadsigmask.c7
-rw-r--r--cpukit/posix/src/ptimer.c7
-rw-r--r--cpukit/posix/src/rwlockattrdestroy.c7
-rw-r--r--cpukit/posix/src/rwlockattrgetpshared.c11
-rw-r--r--cpukit/posix/src/rwlockattrinit.c7
-rw-r--r--cpukit/posix/src/rwlockattrsetpshared.c7
-rw-r--r--cpukit/posix/src/sched_getparam.c12
-rw-r--r--cpukit/posix/src/sched_getprioritymax.c7
-rw-r--r--cpukit/posix/src/sched_getprioritymin.c12
-rw-r--r--cpukit/posix/src/sched_getscheduler.c7
-rw-r--r--cpukit/posix/src/sched_rr_get_interval.c7
-rw-r--r--cpukit/posix/src/sched_setparam.c7
-rw-r--r--cpukit/posix/src/sched_setscheduler.c10
-rw-r--r--cpukit/posix/src/sched_yield.c9
-rw-r--r--cpukit/posix/src/semaphore.c7
-rw-r--r--cpukit/posix/src/semaphorecreatesupp.c7
-rw-r--r--cpukit/posix/src/semaphoredeletesupp.c11
-rw-r--r--cpukit/posix/src/semaphoretranslatereturncode.c7
-rw-r--r--cpukit/posix/src/semaphorewaitsupp.c7
-rw-r--r--cpukit/posix/src/semclose.c16
-rw-r--r--cpukit/posix/src/semdestroy.c11
-rw-r--r--cpukit/posix/src/semgetvalue.c11
-rw-r--r--cpukit/posix/src/seminit.c7
-rw-r--r--cpukit/posix/src/semopen.c7
-rw-r--r--cpukit/posix/src/sempost.c11
-rw-r--r--cpukit/posix/src/semtimedwait.c7
-rw-r--r--cpukit/posix/src/semtrywait.c13
-rw-r--r--cpukit/posix/src/semunlink.c16
-rw-r--r--cpukit/posix/src/semwait.c13
-rw-r--r--cpukit/posix/src/setcanceltype.c7
-rw-r--r--cpukit/posix/src/setitimer.c7
-rw-r--r--cpukit/posix/src/sigaction.c7
-rw-r--r--cpukit/posix/src/sigaddset.c7
-rw-r--r--cpukit/posix/src/sigdelset.c7
-rw-r--r--cpukit/posix/src/sigfillset.c9
-rw-r--r--cpukit/posix/src/sigismember.c9
-rw-r--r--cpukit/posix/src/signal_2.c7
-rw-r--r--cpukit/posix/src/sigprocmask.c16
-rw-r--r--cpukit/posix/src/sigqueue.c9
-rw-r--r--cpukit/posix/src/sigsuspend.c7
-rw-r--r--cpukit/posix/src/sigtimedwait.c12
-rw-r--r--cpukit/posix/src/sigwait.c11
-rw-r--r--cpukit/posix/src/sigwaitinfo.c6
-rw-r--r--cpukit/posix/src/testcancel.c7
-rw-r--r--cpukit/posix/src/timerdelete.c7
-rw-r--r--cpukit/posix/src/timergetoverrun.c16
-rw-r--r--cpukit/posix/src/timergettime.c7
-rw-r--r--cpukit/posix/src/timerinserthelper.c7
-rw-r--r--cpukit/posix/src/timersettime.c7
-rw-r--r--cpukit/posix/src/ualarm.c9
-rw-r--r--cpukit/posix/src/vfork.c7
-rw-r--r--cpukit/posix/src/wait.c9
-rw-r--r--cpukit/posix/src/waitpid.c9
-rw-r--r--cpukit/sapi/include/rtems/io.h7
-rw-r--r--cpukit/score/include/rtems/score/heap.h2
-rw-r--r--cpukit/score/inline/rtems/score/rbtree.inl2
-rw-r--r--testsuites/libtests/Makefile.am1
-rw-r--r--testsuites/libtests/configure.ac1
-rw-r--r--testsuites/libtests/md501/Makefile.am19
-rw-r--r--testsuites/libtests/md501/init.c254
-rw-r--r--testsuites/libtests/md501/md501.doc14
-rw-r--r--testsuites/libtests/md501/md501.scn2
342 files changed, 3694 insertions, 1356 deletions
diff --git a/c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h b/c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h
index 8c787b75da..26482bfcda 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h
+++ b/c/src/lib/libbsp/arm/lpc24xx/include/lpc-ethernet-config.h
@@ -92,6 +92,11 @@ extern "C" {
}
#endif
+static void lpc_eth_config_module_disable(void)
+{
+ lpc24xx_module_disable(LPC24XX_MODULE_ETHERNET);
+}
+
static char *lpc_eth_config_alloc_table_area(size_t size)
{
if (size < LPC24XX_ETH_RAM_SIZE) {
diff --git a/c/src/lib/libbsp/arm/lpc32xx/Makefile.am b/c/src/lib/libbsp/arm/lpc32xx/Makefile.am
index 09c385d25a..37a4793b39 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/Makefile.am
+++ b/c/src/lib/libbsp/arm/lpc32xx/Makefile.am
@@ -137,6 +137,7 @@ libbsp_a_SOURCES += misc/restart.c
libbsp_a_SOURCES += misc/system-clocks.c
libbsp_a_SOURCES += misc/timer.c
libbsp_a_SOURCES += misc/nand-select.c
+libbsp_a_SOURCES += misc/idle-thread.c
# SSP
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 2428697604..738f5d86de 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/console/console-config.c
+++ b/c/src/lib/libbsp/arm/lpc32xx/console/console-config.c
@@ -28,14 +28,14 @@
extern console_fns lpc32xx_hsu_fns;
-static uint8_t lpc32xx_uart_get_register(uint32_t addr, uint8_t i)
+static uint8_t lpc32xx_uart_get_register(uintptr_t addr, uint8_t i)
{
volatile uint32_t *reg = (volatile uint32_t *) addr;
return (uint8_t) reg [i];
}
-static void lpc32xx_uart_set_register(uint32_t addr, uint8_t i, uint8_t val)
+static void lpc32xx_uart_set_register(uintptr_t addr, uint8_t i, uint8_t val)
{
volatile uint32_t *reg = (volatile uint32_t *) addr;
@@ -47,6 +47,7 @@ static void lpc32xx_uart_set_register(uint32_t addr, uint8_t i, uint8_t val)
{
LPC32XX_UARTCLK_CTRL |= 1U << 0;
LPC32XX_U3CLK = LPC32XX_CONFIG_U3CLK;
+ LPC32XX_UART_CLKMODE = BSP_FLD32SET(LPC32XX_UART_CLKMODE, 0x2, 4, 5);
return true;
}
@@ -55,8 +56,17 @@ static void lpc32xx_uart_set_register(uint32_t addr, uint8_t i, uint8_t val)
#ifdef LPC32XX_UART_4_BAUD
static bool lpc32xx_uart_probe_4(int minor)
{
+ volatile lpc32xx_gpio *gpio = &lpc32xx.gpio;
+
+ /*
+ * Set GPO_21/U4_TX/LCDVD[3] to U4_TX. This works only if LCD module is
+ * disabled.
+ */
+ gpio->p2_mux_set = BSP_BIT32(2);
+
LPC32XX_UARTCLK_CTRL |= 1U << 1;
LPC32XX_U4CLK = LPC32XX_CONFIG_U4CLK;
+ LPC32XX_UART_CLKMODE = BSP_FLD32SET(LPC32XX_UART_CLKMODE, 0x2, 6, 7);
return true;
}
@@ -67,6 +77,7 @@ static void lpc32xx_uart_set_register(uint32_t addr, uint8_t i, uint8_t val)
{
LPC32XX_UARTCLK_CTRL |= 1U << 3;
LPC32XX_U6CLK = LPC32XX_CONFIG_U6CLK;
+ LPC32XX_UART_CLKMODE = BSP_FLD32SET(LPC32XX_UART_CLKMODE, 0x2, 10, 11);
return true;
}
diff --git a/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h b/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h
index 5d9d18ac3b..5e6800f722 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h
+++ b/c/src/lib/libbsp/arm/lpc32xx/include/bsp.h
@@ -149,6 +149,10 @@ void lpc32xx_select_nand_controller(lpc32xx_nand_controller nand_controller);
void bsp_restart(void *addr);
+void *bsp_idle_thread(uintptr_t arg);
+
+#define BSP_IDLE_TASK_BODY bsp_idle_thread
+
#define BSP_CONSOLE_UART_BASE LPC32XX_BASE_UART_5
/**
diff --git a/c/src/lib/libbsp/arm/lpc32xx/include/lpc-ethernet-config.h b/c/src/lib/libbsp/arm/lpc32xx/include/lpc-ethernet-config.h
index 12dbd792f6..3dc1dc0f3c 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/include/lpc-ethernet-config.h
+++ b/c/src/lib/libbsp/arm/lpc32xx/include/lpc-ethernet-config.h
@@ -71,6 +71,11 @@ extern "C" {
}
#endif
+static void lpc_eth_config_module_disable(void)
+{
+ LPC32XX_MAC_CLK_CTRL = 0;
+}
+
#define LPC_ETH_CONFIG_USE_TRANSMIT_DMA
static char *lpc_eth_config_alloc_table_area(size_t size)
diff --git a/c/src/lib/libbsp/arm/lpc32xx/misc/idle-thread.c b/c/src/lib/libbsp/arm/lpc32xx/misc/idle-thread.c
new file mode 100644
index 0000000000..0ac51c0f46
--- /dev/null
+++ b/c/src/lib/libbsp/arm/lpc32xx/misc/idle-thread.c
@@ -0,0 +1,34 @@
+/**
+ * @file
+ *
+ * @ingroup lpc32xx
+ *
+ * @brief bsp_idle_thread() implementation.
+ */
+
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * 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.
+ */
+
+#include <bsp.h>
+
+#include <libcpu/arm-cp15.h>
+
+void *bsp_idle_thread(uintptr_t arg)
+{
+ while (true) {
+ arm_cp15_wait_for_interrupt();
+ }
+
+ return NULL;
+}
diff --git a/c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c b/c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c
index 21b49de53e..acc24e9cc5 100644
--- a/c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c
+++ b/c/src/lib/libbsp/arm/lpc32xx/startup/bspstarthooks.c
@@ -269,6 +269,7 @@ static BSP_START_TEXT_SECTION void setup_uarts(void)
#ifdef LPC32XX_UART_5_BAUD
LPC32XX_UARTCLK_CTRL |= 1U << 2;
LPC32XX_U5CLK = LPC32XX_CONFIG_U5CLK;
+ LPC32XX_UART_CLKMODE = BSP_FLD32SET(LPC32XX_UART_CLKMODE, 0x2, 8, 9);
BSP_CONSOLE_UART_INIT(0x01);
#endif
}
diff --git a/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c b/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c
index 56df8d4fef..3b2d5b6fa5 100644
--- a/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c
+++ b/c/src/lib/libbsp/arm/shared/lpc/network/lpc-ethernet.c
@@ -7,7 +7,7 @@
*/
/*
- * Copyright (c) 2009-2011 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2009-2012 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
* Obere Lagerstr. 30
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <assert.h>
#include <rtems.h>
#include <rtems/rtems_bsdnet.h>
@@ -50,8 +51,6 @@
#include <bsp/lpc-ethernet-config.h>
#include <bsp/utility.h>
-#include <rtems/status-checks.h>
-
#if MCLBYTES > (2 * 1024)
#error "MCLBYTES to large"
#endif
@@ -254,10 +253,12 @@ static volatile lpc_eth_controller *const lpc_eth =
#define LPC_ETH_EVENT_INITIALIZE RTEMS_EVENT_1
-#define LPC_ETH_EVENT_START RTEMS_EVENT_2
+#define LPC_ETH_EVENT_TXSTART RTEMS_EVENT_2
#define LPC_ETH_EVENT_INTERRUPT RTEMS_EVENT_3
+#define LPC_ETH_EVENT_STOP RTEMS_EVENT_4
+
/* Status */
#define LPC_ETH_INTERRUPT_RECEIVE \
@@ -292,10 +293,9 @@ static volatile lpc_eth_controller *const lpc_eth =
#endif
typedef enum {
- LPC_ETH_NOT_INITIALIZED,
- LPC_ETH_INITIALIZED,
- LPC_ETH_STARTED,
- LPC_ETH_RUNNING
+ LPC_ETH_STATE_NOT_INITIALIZED = 0,
+ LPC_ETH_STATE_DOWN,
+ LPC_ETH_STATE_UP
} lpc_eth_state;
typedef struct {
@@ -317,6 +317,7 @@ typedef struct {
unsigned receive_interrupts;
unsigned transmitted_frames;
unsigned transmit_interrupts;
+ unsigned receive_drop_errors;
unsigned receive_overrun_errors;
unsigned receive_fragment_errors;
unsigned receive_crc_errors;
@@ -332,13 +333,40 @@ typedef struct {
unsigned transmit_no_descriptor_errors;
unsigned transmit_overflow_errors;
unsigned transmit_fatal_errors;
+ uint32_t phy_id;
+ rtems_vector_number interrupt_number;
+ rtems_id control_task;
} lpc_eth_driver_entry;
-static lpc_eth_driver_entry lpc_eth_driver_data = {
- .state = LPC_ETH_NOT_INITIALIZED,
- .receive_task = RTEMS_ID_NONE,
- .transmit_task = RTEMS_ID_NONE
-};
+static lpc_eth_driver_entry lpc_eth_driver_data;
+
+static void lpc_eth_control_request_complete(const lpc_eth_driver_entry *e)
+{
+ rtems_status_code sc = rtems_event_transient_send(e->control_task);
+ assert(sc == RTEMS_SUCCESSFUL);
+}
+
+static void lpc_eth_control_request(
+ lpc_eth_driver_entry *e,
+ rtems_id task,
+ rtems_event_set event
+)
+{
+ rtems_status_code sc = RTEMS_SUCCESSFUL;
+ uint32_t nest_count = 0;
+
+ e->control_task = rtems_task_self();
+
+ sc = rtems_bsdnet_event_send(task, event);
+ assert(sc == RTEMS_SUCCESSFUL);
+
+ nest_count = rtems_bsdnet_semaphore_release_recursive();
+ sc = rtems_event_transient_receive(RTEMS_WAIT, RTEMS_NO_TIMEOUT);
+ assert(sc == RTEMS_SUCCESSFUL);
+ rtems_bsdnet_semaphore_obtain_recursive(nest_count);
+
+ e->control_task = 0;
+}
static inline uint32_t lpc_eth_increment(
uint32_t value,
@@ -528,25 +556,32 @@ static void lpc_eth_receive_task(void *arg)
uint32_t const index_max = e->rx_unit_count - 1;
uint32_t produce_index = 0;
uint32_t consume_index = 0;
- uint32_t receive_index = 0;
LPC_ETH_PRINTF("%s\n", __func__);
/* Main event loop */
while (true) {
- bool wait_for_mbuf = false;
-
/* Wait for events */
sc = rtems_bsdnet_event_receive(
- LPC_ETH_EVENT_INITIALIZE | LPC_ETH_EVENT_INTERRUPT,
+ LPC_ETH_EVENT_INITIALIZE
+ | LPC_ETH_EVENT_STOP
+ | LPC_ETH_EVENT_INTERRUPT,
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&events
);
- RTEMS_CLEANUP_SC(sc, cleanup, "wait for events");
+ assert(sc == RTEMS_SUCCESSFUL);
LPC_ETH_PRINTF("rx: wake up: 0x%08" PRIx32 "\n", events);
+ /* Stop receiver? */
+ if ((events & LPC_ETH_EVENT_STOP) != 0) {
+ lpc_eth_control_request_complete(e);
+
+ /* Wait for events */
+ continue;
+ }
+
/* Initialize receiver? */
if ((events & LPC_ETH_EVENT_INITIALIZE) != 0) {
/* Disable receive interrupts */
@@ -592,7 +627,6 @@ static void lpc_eth_receive_task(void *arg)
/* Initialize indices */
produce_index = lpc_eth->rxproduceindex;
consume_index = lpc_eth->rxconsumeindex;
- receive_index = consume_index;
/* Enable receiver */
lpc_eth->command |= ETH_CMD_RX_ENABLE;
@@ -600,6 +634,8 @@ static void lpc_eth_receive_task(void *arg)
/* Enable receive interrupts */
lpc_eth_enable_receive_interrupts();
+ lpc_eth_control_request_complete(e);
+
/* Wait for events */
continue;
}
@@ -611,49 +647,47 @@ static void lpc_eth_receive_task(void *arg)
/* Get current produce index */
produce_index = lpc_eth->rxproduceindex;
- if (receive_index != produce_index) {
+ if (consume_index != produce_index) {
uint32_t stat = 0;
- /* Fragment mbuf */
- struct mbuf *m = mbufs [receive_index];
-
/* Fragment status */
rtems_cache_invalidate_multiple_data_lines(
- (void *) &status [receive_index],
+ (void *) &status [consume_index],
sizeof(status [0])
);
- stat = status [receive_index].info;
-
- /* Remove mbuf from table */
- mbufs [receive_index] = NULL;
+ stat = status [consume_index].info;
if (
(stat & ETH_RX_STAT_LAST_FLAG) != 0
&& (stat & LPC_ETH_RX_STAT_ERRORS) == 0
) {
- /* Ethernet header */
- struct ether_header *eh = mtod(m, struct ether_header *);
+ /* Received mbuf */
+ struct mbuf *m = mbufs [consume_index];
- /* Discard Ethernet header and CRC */
- int sz = (int) (stat & ETH_RX_STAT_RXSIZE_MASK) + 1
- - ETHER_HDR_LEN - ETHER_CRC_LEN;
+ if (lpc_eth_add_new_mbuf(ifp, desc, mbufs, consume_index, false)) {
+ /* Ethernet header */
+ struct ether_header *eh = mtod(m, struct ether_header *);
- /* Update mbuf */
- m->m_len = sz;
- m->m_pkthdr.len = sz;
- m->m_data = mtod(m, char *) + ETHER_HDR_LEN;
+ /* Discard Ethernet header and CRC */
+ int sz = (int) (stat & ETH_RX_STAT_RXSIZE_MASK) + 1
+ - ETHER_HDR_LEN - ETHER_CRC_LEN;
- LPC_ETH_PRINTF("rx: %02" PRIu32 ": %u\n", receive_index, sz);
+ /* Update mbuf */
+ m->m_len = sz;
+ m->m_pkthdr.len = sz;
+ m->m_data = mtod(m, char *) + ETHER_HDR_LEN;
- /* Hand over */
- ether_input(ifp, eh, m);
+ LPC_ETH_PRINTF("rx: %02" PRIu32 ": %u\n", consume_index, sz);
- /* Increment received frames counter */
- ++e->received_frames;
- } else {
- /* Release mbuf */
- m_free(m);
+ /* Hand over */
+ ether_input(ifp, eh, m);
+ /* Increment received frames counter */
+ ++e->received_frames;
+ } else {
+ ++e->receive_drop_errors;
+ }
+ } else {
/* Update error counters */
if ((stat & ETH_RX_STAT_OVERRUN) != 0) {
++e->receive_overrun_errors;
@@ -678,49 +712,16 @@ static void lpc_eth_receive_task(void *arg)
}
}
- /* Increment receive index */
- receive_index = lpc_eth_increment(receive_index, index_max);
+ /* Increment and update consume index */
+ consume_index = lpc_eth_increment(consume_index, index_max);
+ lpc_eth->rxconsumeindex = consume_index;
} else {
/* Nothing to do, enable receive interrupts */
lpc_eth_enable_receive_interrupts();
break;
}
}
-
- /* Wait for mbuf? */
- wait_for_mbuf =
- lpc_eth_increment(produce_index, index_max) == consume_index;
-
- /* Fill queue with new mbufs */
- while (consume_index != produce_index) {
- /* Add new mbuf to queue */
- if (
- !lpc_eth_add_new_mbuf(ifp, desc, mbufs, consume_index, wait_for_mbuf)
- ) {
- break;
- }
-
- /* We wait for at most one mbuf */
- wait_for_mbuf = false;
-
- /* Increment consume index */
- consume_index = lpc_eth_increment(consume_index, index_max);
-
- /* Update consume indices */
- lpc_eth->rxconsumeindex = consume_index;
- }
}
-
-cleanup:
-
- /* Clear task ID */
- e->receive_task = RTEMS_ID_NONE;
-
- /* Release network semaphore */
- rtems_bsdnet_semaphore_release();
-
- /* Terminate self */
- (void) rtems_task_delete(RTEMS_SELF);
}
static struct mbuf *lpc_eth_next_fragment(
@@ -811,16 +812,25 @@ static void lpc_eth_transmit_task(void *arg)
/* Wait for events */
sc = rtems_bsdnet_event_receive(
LPC_ETH_EVENT_INITIALIZE
- | LPC_ETH_EVENT_START
+ | LPC_ETH_EVENT_STOP
+ | LPC_ETH_EVENT_TXSTART
| LPC_ETH_EVENT_INTERRUPT,
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&events
);
- RTEMS_CLEANUP_SC(sc, cleanup, "wait for events");
+ assert(sc == RTEMS_SUCCESSFUL);
LPC_ETH_PRINTF("tx: wake up: 0x%08" PRIx32 "\n", events);
+ /* Stop transmitter? */
+ if ((events & LPC_ETH_EVENT_STOP) != 0) {
+ lpc_eth_control_request_complete(e);
+
+ /* Wait for events */
+ continue;
+ }
+
/* Initialize transmitter? */
if ((events & LPC_ETH_EVENT_INITIALIZE) != 0) {
/* Disable transmit interrupts */
@@ -869,6 +879,8 @@ static void lpc_eth_transmit_task(void *arg)
/* Enable transmitter */
lpc_eth->command |= ETH_CMD_TX_ENABLE;
+
+ lpc_eth_control_request_complete(e);
}
/* Free consumed fragments */
@@ -1065,30 +1077,26 @@ static void lpc_eth_transmit_task(void *arg)
lpc_eth_enable_transmit_interrupts();
}
}
-
-cleanup:
-
- /* Clear task ID */
- e->transmit_task = RTEMS_ID_NONE;
-
- /* Release network semaphore */
- rtems_bsdnet_semaphore_release();
-
- /* Terminate self */
- (void) rtems_task_delete(RTEMS_SELF);
}
-static void lpc_eth_mdio_wait_for_not_busy(void)
+static int lpc_eth_mdio_wait_for_not_busy(void)
{
- while ((lpc_eth->mind & ETH_MIND_BUSY) != 0) {
- rtems_task_wake_after(2);
+ rtems_interval one_second = rtems_clock_get_ticks_per_second();
+ rtems_interval i = 0;
+
+ while ((lpc_eth->mind & ETH_MIND_BUSY) != 0 && i < one_second) {
+ rtems_task_wake_after(1);
+ ++i;
}
+
+ return i != one_second ? 0 : ETIMEDOUT;
}
static uint32_t lpc_eth_mdio_read_anlpar(void)
{
uint32_t madr = ETH_MADR_REG(MII_ANLPAR) | ETH_MADR_PHY(DEFAULT_PHY);
uint32_t anlpar = 0;
+ int eno = 0;
if (lpc_eth->madr != madr) {
lpc_eth->madr = madr;
@@ -1099,9 +1107,10 @@ static uint32_t lpc_eth_mdio_read_anlpar(void)
lpc_eth->mcmd = ETH_MCMD_READ;
}
- lpc_eth_mdio_wait_for_not_busy();
-
- anlpar = lpc_eth->mrdd;
+ eno = lpc_eth_mdio_wait_for_not_busy();
+ if (eno == 0) {
+ anlpar = lpc_eth->mrdd;
+ }
/* Start next read */
lpc_eth->mcmd = 0;
@@ -1111,7 +1120,7 @@ static uint32_t lpc_eth_mdio_read_anlpar(void)
}
static int lpc_eth_mdio_read(
- int phy __attribute__((unused)),
+ int phy,
void *arg __attribute__((unused)),
unsigned reg,
uint32_t *val
@@ -1123,8 +1132,11 @@ static int lpc_eth_mdio_read(
lpc_eth->madr = ETH_MADR_REG(reg) | ETH_MADR_PHY(DEFAULT_PHY);
lpc_eth->mcmd = 0;
lpc_eth->mcmd = ETH_MCMD_READ;
- lpc_eth_mdio_wait_for_not_busy();
- *val = lpc_eth->mrdd;
+ eno = lpc_eth_mdio_wait_for_not_busy();
+
+ if (eno == 0) {
+ *val = lpc_eth->mrdd;
+ }
} else {
eno = EINVAL;
}
@@ -1133,7 +1145,7 @@ static int lpc_eth_mdio_read(
}
static int lpc_eth_mdio_write(
- int phy __attribute__((unused)),
+ int phy,
void *arg __attribute__((unused)),
unsigned reg,
uint32_t val
@@ -1144,7 +1156,7 @@ static int lpc_eth_mdio_write(
if (phy == -1 || phy == 0) {
lpc_eth->madr = ETH_MADR_REG(reg) | ETH_MADR_PHY(DEFAULT_PHY);
lpc_eth->mwtd = val;
- lpc_eth_mdio_wait_for_not_busy();
+ eno = lpc_eth_mdio_wait_for_not_busy();
} else {
eno = EINVAL;
}
@@ -1152,110 +1164,269 @@ static int lpc_eth_mdio_write(
return eno;
}
-static void lpc_eth_interface_init(void *arg)
+static int lpc_eth_phy_get_id(uint32_t *id)
{
+ uint32_t id1 = 0;
+ int eno = lpc_eth_mdio_read(DEFAULT_PHY, NULL, MII_PHYIDR1, &id1);
+
+ if (eno == 0) {
+ uint32_t id2 = 0;
+
+ eno = lpc_eth_mdio_read(DEFAULT_PHY, NULL, MII_PHYIDR2, &id2);
+ if (eno == 0) {
+ *id = (id1 << 16) | (id2 & 0xfff0);
+ }
+ }
+
+ return eno;
+}
+
+#define PHY_KSZ80X1RNL 0x221550
+
+typedef struct {
+ unsigned reg;
+ uint32_t set;
+ uint32_t clear;
+} lpc_eth_phy_action;
+
+static int lpc_eth_phy_set_and_clear(
+ const lpc_eth_phy_action *actions,
+ size_t n
+)
+{
+ int eno = 0;
+ size_t i;
+
+ for (i = 0; eno == 0 && i < n; ++i) {
+ const lpc_eth_phy_action *action = &actions [i];
+ uint32_t val;
+
+ eno = lpc_eth_mdio_read(DEFAULT_PHY, NULL, action->reg, &val);
+ if (eno == 0) {
+ val |= action->set;
+ val &= ~action->clear;
+ eno = lpc_eth_mdio_write(DEFAULT_PHY, NULL, action->reg, val);
+ }
+ }
+
+ return eno;
+}
+
+static const lpc_eth_phy_action lpc_eth_phy_up_action_default [] = {
+ { MII_BMCR, 0, BMCR_PDOWN },
+ { MII_BMCR, BMCR_RESET, 0 },
+ { MII_BMCR, BMCR_AUTOEN, 0 }
+};
+
+static const lpc_eth_phy_action lpc_eth_phy_up_pre_action_KSZ80X1RNL [] = {
+ /* Disable slow oscillator mode */
+ { 0x11, 0, 0x10 }
+};
+
+static const lpc_eth_phy_action lpc_eth_phy_up_post_action_KSZ80X1RNL [] = {
+ /* Enable energy detect power down (EDPD) mode */
+ { 0x18, 0x0800, 0 },
+ /* Turn PLL of automatically in EDPD mode */
+ { 0x10, 0x10, 0 }
+};
+
+static int lpc_eth_phy_up(lpc_eth_driver_entry *e)
+{
+ int eno = lpc_eth_phy_get_id(&e->phy_id);
+
+ if (eno == 0) {
+ switch (e->phy_id) {
+ case PHY_KSZ80X1RNL:
+ eno = lpc_eth_phy_set_and_clear(
+ &lpc_eth_phy_up_pre_action_KSZ80X1RNL [0],
+ RTEMS_ARRAY_SIZE(lpc_eth_phy_up_pre_action_KSZ80X1RNL)
+ );
+ break;
+ case 0:
+ case 0xfffffff0:
+ eno = EIO;
+ break;
+ default:
+ break;
+ }
+
+ if (eno == 0) {
+ eno = lpc_eth_phy_set_and_clear(
+ &lpc_eth_phy_up_action_default [0],
+ RTEMS_ARRAY_SIZE(lpc_eth_phy_up_action_default)
+ );
+ }
+
+ if (eno == 0) {
+ switch (e->phy_id) {
+ case PHY_KSZ80X1RNL:
+ eno = lpc_eth_phy_set_and_clear(
+ &lpc_eth_phy_up_post_action_KSZ80X1RNL [0],
+ RTEMS_ARRAY_SIZE(lpc_eth_phy_up_post_action_KSZ80X1RNL)
+ );
+ break;
+ default:
+ break;
+ }
+ }
+ } else {
+ e->phy_id = 0;
+ }
+
+ return eno;
+}
+
+static const lpc_eth_phy_action lpc_eth_phy_down_action_default [] = {
+ { MII_BMCR, BMCR_PDOWN, 0 }
+};
+
+static const lpc_eth_phy_action lpc_eth_phy_down_post_action_KSZ80X1RNL [] = {
+ /* Enable slow oscillator mode */
+ { 0x11, 0x10, 0 }
+};
+
+static void lpc_eth_phy_down(lpc_eth_driver_entry *e)
+{
+ int eno = lpc_eth_phy_set_and_clear(
+ &lpc_eth_phy_down_action_default [0],
+ RTEMS_ARRAY_SIZE(lpc_eth_phy_down_action_default)
+ );
+
+ if (eno == 0) {
+ switch (e->phy_id) {
+ case PHY_KSZ80X1RNL:
+ eno = lpc_eth_phy_set_and_clear(
+ &lpc_eth_phy_down_post_action_KSZ80X1RNL [0],
+ RTEMS_ARRAY_SIZE(lpc_eth_phy_down_post_action_KSZ80X1RNL)
+ );
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+static void lpc_eth_soft_reset(void)
+{
+ lpc_eth->command = 0x38;
+ lpc_eth->mac1 = 0xcf00;
+ lpc_eth->mac1 = 0x0;
+}
+
+static int lpc_eth_up_or_down(lpc_eth_driver_entry *e, bool up)
+{
+ int eno = 0;
rtems_status_code sc = RTEMS_SUCCESSFUL;
- lpc_eth_driver_entry *e = (lpc_eth_driver_entry *) arg;
struct ifnet *ifp = &e->arpcom.ac_if;
- LPC_ETH_PRINTF("%s\n", __func__);
+ if (up && e->state == LPC_ETH_STATE_DOWN) {
- if (e->state == LPC_ETH_INITIALIZED) {
lpc_eth_config_module_enable();
- /* Soft reset */
-
- /* Do soft reset */
- lpc_eth->command = 0x38;
- lpc_eth->mac1 = 0xcf00;
- lpc_eth->mac1 = 0x0;
-
/* Initialize PHY */
lpc_eth->mcfg = ETH_MCFG_CLOCK_SELECT(0x7);
- /* TODO */
-
- /* Reinitialize registers */
- lpc_eth->mac2 = 0x31;
- lpc_eth->ipgt = 0x15;
- lpc_eth->ipgr = 0x12;
- lpc_eth->clrt = 0x370f;
- lpc_eth->maxf = 0x0600;
- lpc_eth->supp = ETH_SUPP_SPEED;
- lpc_eth->test = 0;
- #ifdef LPC_ETH_CONFIG_RMII
- lpc_eth->command = 0x0600;
- #else
- lpc_eth->command = 0x0400;
- #endif
- lpc_eth->intenable = 0;
- lpc_eth->intclear = 0x30ff;
- lpc_eth->powerdown = 0;
-
- /* MAC address */
- lpc_eth->sa0 = ((uint32_t) e->arpcom.ac_enaddr [5] << 8)
- | (uint32_t) e->arpcom.ac_enaddr [4];
- lpc_eth->sa1 = ((uint32_t) e->arpcom.ac_enaddr [3] << 8)
- | (uint32_t) e->arpcom.ac_enaddr [2];
- lpc_eth->sa2 = ((uint32_t) e->arpcom.ac_enaddr [1] << 8)
- | (uint32_t) e->arpcom.ac_enaddr [0];
-
- /* Enable receiver */
- lpc_eth->mac1 = 0x03;
-
- /* Start receive task */
- if (e->receive_task == RTEMS_ID_NONE) {
- e->receive_task = rtems_bsdnet_newproc(
- "ntrx",
- 4096,
- lpc_eth_receive_task,
- e
- );
- sc = rtems_bsdnet_event_send(e->receive_task, LPC_ETH_EVENT_INITIALIZE);
- RTEMS_SYSLOG_ERROR_SC(sc, "send receive initialize event");
- }
+ eno = lpc_eth_phy_up(e);
+
+ if (eno == 0) {
+ /*
+ * We must have a valid external clock from the PHY at this point,
+ * otherwise the system bus hangs and only a watchdog reset helps.
+ */
+ lpc_eth_soft_reset();
+
+ /* Reinitialize registers */
+ lpc_eth->mac2 = 0x31;
+ lpc_eth->ipgt = 0x15;
+ lpc_eth->ipgr = 0x12;
+ lpc_eth->clrt = 0x370f;
+ lpc_eth->maxf = 0x0600;
+ lpc_eth->supp = ETH_SUPP_SPEED;
+ lpc_eth->test = 0;
+ #ifdef LPC_ETH_CONFIG_RMII
+ lpc_eth->command = 0x0600;
+ #else
+ lpc_eth->command = 0x0400;
+ #endif
+ lpc_eth->intenable = ETH_INT_RX_OVERRUN | ETH_INT_TX_UNDERRUN;
+ lpc_eth->intclear = 0x30ff;
+ lpc_eth->powerdown = 0;
+
+ /* MAC address */
+ lpc_eth->sa0 = ((uint32_t) e->arpcom.ac_enaddr [5] << 8)
+ | (uint32_t) e->arpcom.ac_enaddr [4];
+ lpc_eth->sa1 = ((uint32_t) e->arpcom.ac_enaddr [3] << 8)
+ | (uint32_t) e->arpcom.ac_enaddr [2];
+ lpc_eth->sa2 = ((uint32_t) e->arpcom.ac_enaddr [1] << 8)
+ | (uint32_t) e->arpcom.ac_enaddr [0];
- /* Start transmit task */
- if (e->transmit_task == RTEMS_ID_NONE) {
- e->transmit_task = rtems_bsdnet_newproc(
- "nttx",
- 4096,
- lpc_eth_transmit_task,
+ /* Enable receiver */
+ lpc_eth->mac1 = 0x03;
+
+ /* Initialize tasks */
+ lpc_eth_control_request(e, e->receive_task, LPC_ETH_EVENT_INITIALIZE);
+ lpc_eth_control_request(e, e->transmit_task, LPC_ETH_EVENT_INITIALIZE);
+
+ /* Install interrupt handler */
+ sc = rtems_interrupt_handler_install(
+ e->interrupt_number,
+ "Ethernet",
+ RTEMS_INTERRUPT_UNIQUE,
+ lpc_eth_interrupt_handler,
e
);
- sc = rtems_bsdnet_event_send(e->transmit_task, LPC_ETH_EVENT_INITIALIZE);
- RTEMS_SYSLOG_ERROR_SC(sc, "send transmit initialize event");
- }
+ assert(sc == RTEMS_SUCCESSFUL);
- /* Change state */
- if (
- e->receive_task != RTEMS_ID_NONE && e->transmit_task != RTEMS_ID_NONE
- ) {
- e->state = LPC_ETH_STARTED;
+ /* Start watchdog timer */
+ ifp->if_timer = 1;
+
+ /* Change state */
+ e->state = LPC_ETH_STATE_UP;
}
- }
- if (e->state == LPC_ETH_STARTED) {
- /* Enable fatal interrupts */
- lpc_eth->intenable = ETH_INT_RX_OVERRUN | ETH_INT_TX_UNDERRUN;
+ if (eno != 0) {
+ ifp->if_flags &= ~IFF_UP;
+ }
+ } else if (!up && e->state == LPC_ETH_STATE_UP) {
+ /* Remove interrupt handler */
+ sc = rtems_interrupt_handler_remove(
+ e->interrupt_number,
+ lpc_eth_interrupt_handler,
+ e
+ );
+ assert(sc == RTEMS_SUCCESSFUL);
- /* Enable promiscous mode */
- lpc_eth_enable_promiscous_mode((ifp->if_flags & IFF_PROMISC) != 0);
+ /* Stop tasks */
+ lpc_eth_control_request(e, e->receive_task, LPC_ETH_EVENT_STOP);
+ lpc_eth_control_request(e, e->transmit_task, LPC_ETH_EVENT_STOP);
- /* Start watchdog timer */
- ifp->if_timer = 1;
+ lpc_eth_soft_reset();
+ lpc_eth_phy_down(e);
+ lpc_eth_config_module_disable();
- /* Set interface to running state */
- ifp->if_flags |= IFF_RUNNING;
+ /* Stop watchdog timer */
+ ifp->if_timer = 0;
/* Change state */
- e->state = LPC_ETH_RUNNING;
+ e->state = LPC_ETH_STATE_DOWN;
}
+
+ return eno;
+}
+
+static void lpc_eth_interface_init(void *arg)
+{
+ /* Nothing to do */
}
static void lpc_eth_interface_stats(lpc_eth_driver_entry *e)
{
- int media = IFM_MAKEWORD(0, 0, 0, 0);
- int eno = rtems_mii_ioctl(&e->mdio, e, SIOCGIFMEDIA, &media);
+ int eno = EIO;
+ int media = 0;
+
+ if (e->state == LPC_ETH_STATE_UP) {
+ media = IFM_MAKEWORD(0, 0, 0, 0);
+ eno = rtems_mii_ioctl(&e->mdio, e, SIOCGIFMEDIA, &media);
+ }
rtems_bsdnet_semaphore_release();
@@ -1268,6 +1439,7 @@ static void lpc_eth_interface_stats(lpc_eth_driver_entry *e)
printf("receive interrupts: %u\n", e->receive_interrupts);
printf("transmitted frames: %u\n", e->transmitted_frames);
printf("transmit interrupts: %u\n", e->transmit_interrupts);
+ printf("receive drop errors: %u\n", e->receive_drop_errors);
printf("receive overrun errors: %u\n", e->receive_overrun_errors);
printf("receive fragment errors: %u\n", e->receive_fragment_errors);
printf("receive CRC errors: %u\n", e->receive_crc_errors);
@@ -1358,12 +1530,9 @@ static int lpc_eth_interface_ioctl(
ether_ioctl(ifp, cmd, data);
break;
case SIOCSIFFLAGS:
- if (ifp->if_flags & IFF_RUNNING) {
- /* TODO: off */
- }
- if (ifp->if_flags & IFF_UP) {
- ifp->if_flags |= IFF_RUNNING;
- /* TODO: init */
+ eno = lpc_eth_up_or_down(e, (ifp->if_flags & IFF_UP) != 0);
+ if (eno == 0 && (ifp->if_flags & IFF_UP) != 0) {
+ lpc_eth_enable_promiscous_mode((ifp->if_flags & IFF_PROMISC) != 0);
}
break;
case SIOCADDMULTI:
@@ -1388,46 +1557,51 @@ static void lpc_eth_interface_start(struct ifnet *ifp)
ifp->if_flags |= IFF_OACTIVE;
- sc = rtems_bsdnet_event_send(e->transmit_task, LPC_ETH_EVENT_START);
- RTEMS_SYSLOG_ERROR_SC(sc, "send transmit start event");
+ if (e->state == LPC_ETH_STATE_UP) {
+ sc = rtems_bsdnet_event_send(e->transmit_task, LPC_ETH_EVENT_TXSTART);
+ assert(sc == RTEMS_SUCCESSFUL);
+ }
}
-static void lpc_eth_interface_watchdog(struct ifnet *ifp __attribute__((unused)))
+static void lpc_eth_interface_watchdog(struct ifnet *ifp)
{
lpc_eth_driver_entry *e = (lpc_eth_driver_entry *) ifp->if_softc;
- uint32_t anlpar = lpc_eth_mdio_read_anlpar();
-
- if (e->anlpar != anlpar) {
- bool full_duplex = false;
- bool speed = false;
-
- e->anlpar = anlpar;
-
- if ((anlpar & ANLPAR_TX_FD) != 0) {
- full_duplex = true;
- speed = true;
- } else if ((anlpar & ANLPAR_T4) != 0) {
- speed = true;
- } else if ((anlpar & ANLPAR_TX) != 0) {
- speed = true;
- } else if ((anlpar & ANLPAR_10_FD) != 0) {
- full_duplex = true;
- }
- if (full_duplex) {
- lpc_eth->mac2 |= ETH_MAC2_FULL_DUPLEX;
- } else {
- lpc_eth->mac2 &= ~ETH_MAC2_FULL_DUPLEX;
- }
+ if (e->state == LPC_ETH_STATE_UP) {
+ uint32_t anlpar = lpc_eth_mdio_read_anlpar();
- if (speed) {
- lpc_eth->supp |= ETH_SUPP_SPEED;
- } else {
- lpc_eth->supp &= ~ETH_SUPP_SPEED;
+ if (e->anlpar != anlpar) {
+ bool full_duplex = false;
+ bool speed = false;
+
+ e->anlpar = anlpar;
+
+ if ((anlpar & ANLPAR_TX_FD) != 0) {
+ full_duplex = true;
+ speed = true;
+ } else if ((anlpar & ANLPAR_T4) != 0) {
+ speed = true;
+ } else if ((anlpar & ANLPAR_TX) != 0) {
+ speed = true;
+ } else if ((anlpar & ANLPAR_10_FD) != 0) {
+ full_duplex = true;
+ }
+
+ if (full_duplex) {
+ lpc_eth->mac2 |= ETH_MAC2_FULL_DUPLEX;
+ } else {
+ lpc_eth->mac2 &= ~ETH_MAC2_FULL_DUPLEX;
+ }
+
+ if (speed) {
+ lpc_eth->supp |= ETH_SUPP_SPEED;
+ } else {
+ lpc_eth->supp &= ~ETH_SUPP_SPEED;
+ }
}
- }
- ifp->if_timer = WATCHDOG_TIMEOUT;
+ ifp->if_timer = WATCHDOG_TIMEOUT;
+ }
}
static unsigned lpc_eth_fixup_unit_count(int count, int default_value, int max)
@@ -1444,7 +1618,6 @@ static unsigned lpc_eth_fixup_unit_count(int count, int default_value, int max)
static int lpc_eth_attach(struct rtems_bsdnet_ifconfig *config)
{
- rtems_status_code sc = RTEMS_SUCCESSFUL;
lpc_eth_driver_entry *e = &lpc_eth_driver_data;
struct ifnet *ifp = &e->arpcom.ac_if;
char *unit_name = NULL;
@@ -1455,17 +1628,16 @@ static int lpc_eth_attach(struct rtems_bsdnet_ifconfig *config)
/* Check parameter */
if (unit_index < 0) {
- RTEMS_SYSLOG_ERROR("parse error for interface name\n");
return 0;
}
if (unit_index != 0) {
- RTEMS_DO_CLEANUP(cleanup, "unexpected unit number");
+ goto cleanup;
}
if (config->hardware_address == NULL) {
- RTEMS_DO_CLEANUP(cleanup, "MAC address missing");
+ goto cleanup;
}
- if (e->state != LPC_ETH_NOT_INITIALIZED) {
- RTEMS_DO_CLEANUP(cleanup, "already attached");
+ if (e->state != LPC_ETH_STATE_NOT_INITIALIZED) {
+ goto cleanup;
}
/* MDIO */
@@ -1496,18 +1668,8 @@ static int lpc_eth_attach(struct rtems_bsdnet_ifconfig *config)
);
config->xbuf_count = (int) e->tx_unit_count;
- /* Disable interrupts */
- lpc_eth->intenable = 0;
-
- /* Install interrupt handler */
- sc = rtems_interrupt_handler_install(
- config->irno,
- "Ethernet",
- RTEMS_INTERRUPT_UNIQUE,
- lpc_eth_interrupt_handler,
- e
- );
- RTEMS_CLEANUP_SC(sc, cleanup, "install interrupt handler");
+ /* Remember interrupt number */
+ e->interrupt_number = config->irno;
/* Copy MAC address */
memcpy(e->arpcom.ac_enaddr, config->hardware_address, ETHER_ADDR_LEN);
@@ -1524,7 +1686,7 @@ static int lpc_eth_attach(struct rtems_bsdnet_ifconfig *config)
+ LPC_ETH_CONFIG_TX_BUF_SIZE);
table_area = lpc_eth_config_alloc_table_area(table_area_size);
if (table_area == NULL) {
- RTEMS_DO_CLEANUP(cleanup, "no memory for table area");
+ goto cleanup;
}
memset(table_area, 0, table_area_size);
@@ -1565,8 +1727,23 @@ static int lpc_eth_attach(struct rtems_bsdnet_ifconfig *config)
ifp->if_snd.ifq_maxlen = ifqmaxlen;
ifp->if_timer = 0;
+ /* Create tasks */
+ e->receive_task = rtems_bsdnet_newproc(
+ "ntrx",
+ 4096,
+ lpc_eth_receive_task,
+ e
+ );
+ e->transmit_task = rtems_bsdnet_newproc(
+ "nttx",
+ 4096,
+ lpc_eth_transmit_task,
+ e
+ );
+
/* Change status */
- e->state = LPC_ETH_INITIALIZED;
+ ifp->if_flags |= IFF_RUNNING;
+ e->state = LPC_ETH_STATE_DOWN;
/* Attach the interface */
if_attach(ifp);
diff --git a/config.sub b/config.sub
index 89b1286300..8df5511094 100755
--- a/config.sub
+++ b/config.sub
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2012-10-10'
+timestamp='2012-12-06'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -1026,7 +1026,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
basic_machine=i386-pc
os=-rdos
;;
diff --git a/cpukit/libblock/include/rtems/blkdev.h b/cpukit/libblock/include/rtems/blkdev.h
index 0ea955d435..f29a34987f 100644
--- a/cpukit/libblock/include/rtems/blkdev.h
+++ b/cpukit/libblock/include/rtems/blkdev.h
@@ -154,7 +154,7 @@ typedef struct rtems_blkdev_request {
* @param[in,out] req The transfer request.
* @param[in] status The status of the operation should be
* - @c RTEMS_SUCCESSFUL, if the operation was successful,
- * - @c RTEMS_IO_ERROR, if some sort of input or output error occured, or
+ * - @c RTEMS_IO_ERROR, if some sort of input or output error occurred, or
* - @c RTEMS_UNSATISFIED, if media is no more present.
*/
static inline void rtems_blkdev_request_done(
diff --git a/cpukit/libcsupport/include/rtems/assoc.h b/cpukit/libcsupport/include/rtems/assoc.h
index 70ac56d662..06a74849ef 100644
--- a/cpukit/libcsupport/include/rtems/assoc.h
+++ b/cpukit/libcsupport/include/rtems/assoc.h
@@ -85,6 +85,9 @@ const char *rtems_assoc_name_by_local(
uint32_t
);
+/**
+ * @brief RTEMS Associate Name by Remote
+ */
const char *rtems_assoc_name_by_remote(
const rtems_assoc_t *,
uint32_t
diff --git a/cpukit/libcsupport/include/rtems/libcsupport.h b/cpukit/libcsupport/include/rtems/libcsupport.h
index abe70205e3..81e2156ba4 100644
--- a/cpukit/libcsupport/include/rtems/libcsupport.h
+++ b/cpukit/libcsupport/include/rtems/libcsupport.h
@@ -56,6 +56,12 @@ Heap_Control *malloc_get_heap_pointer( void );
extern void libc_init(void);
extern int host_errno(void);
extern void fix_syscall_errno(void);
+
+/**
+ * @brief RTEMS Malloc Get Free Information
+ *
+ * Find amount of free heap remaining
+ */
extern size_t malloc_free_space(void);
extern void open_dev_console(void);
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index 85bcb9774d..84f3dc7451 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -4,6 +4,10 @@
* @ingroup LibIO
*
* @brief Basic IO API.
+ *
+ * This file contains the support infrastructure used to manage the
+ * table of integer style file descriptors used by the low level
+ * POSIX system calls like open(), read, fstat(), etc.
*/
/*
@@ -172,7 +176,7 @@ typedef void (*rtems_filesystem_eval_path_t)(
* @param[in] namelen Length of the name for the new link in characters.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_link().
*/
@@ -190,7 +194,7 @@ typedef int (*rtems_filesystem_link_t)(
* @param[in] mode The new mode of the node
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_fchmod().
*/
@@ -207,7 +211,7 @@ typedef int (*rtems_filesystem_fchmod_t)(
* @param[in] group Group ID for the node.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_chown().
*/
@@ -228,7 +232,7 @@ typedef int (*rtems_filesystem_chown_t)(
* @param[in, out] loc Location to clone.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_clonenode().
*/
@@ -259,7 +263,7 @@ typedef void (*rtems_filesystem_freenode_t)(
* @param[in] mt_entry The mount table entry.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_mount().
*/
@@ -277,7 +281,7 @@ typedef int (*rtems_filesystem_mount_t) (
* @param[in] data The data provided by the user.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*/
typedef int (*rtems_filesystem_fsmount_me_t)(
rtems_filesystem_mount_table_entry_t *mt_entry,
@@ -294,7 +298,7 @@ typedef int (*rtems_filesystem_fsmount_me_t)(
* @param[in] mt_entry The mount table entry.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_unmount().
*/
@@ -361,7 +365,7 @@ typedef rtems_filesystem_node_types_t (*rtems_filesystem_node_type_t)(
* @param[in] dev Optional device identifier for the new node.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_mknod().
*/
@@ -380,7 +384,7 @@ typedef int (*rtems_filesystem_mknod_t)(
* @param[in] loc The location of the node.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_rmnod().
*/
@@ -397,7 +401,7 @@ typedef int (*rtems_filesystem_rmnod_t)(
* @param[in] modtime Modification for the node.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_utime().
*/
@@ -417,7 +421,7 @@ typedef int (*rtems_filesystem_utime_t)(
* @param[in] target Contents for the symbolic link.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_symlink().
*/
@@ -436,7 +440,7 @@ typedef int (*rtems_filesystem_symlink_t)(
* @param[in] bufsize The size of the buffer in characters.
*
* @retval non-negative Size of the actual contents in characters.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_readlink().
*/
@@ -456,7 +460,7 @@ typedef ssize_t (*rtems_filesystem_readlink_t)(
* @param[in] namelen Length of the name for the new node in characters.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_rename().
*/
@@ -475,7 +479,7 @@ typedef int (*rtems_filesystem_rename_t)(
* @param[out] buf Buffer for file system information.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_statvfs().
*/
@@ -758,7 +762,7 @@ int rtems_filesystem_default_statvfs(
* @param[in] mode Optional mode for node creation.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_open().
*/
@@ -775,7 +779,7 @@ typedef int (*rtems_filesystem_open_t)(
* @param[in, out] iop The IO pointer.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_close().
*/
@@ -793,7 +797,7 @@ typedef int (*rtems_filesystem_close_t)(
* @param[in] count The size of the buffer in characters.
*
* @retval non-negative Count of read characters.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_read().
*/
@@ -813,7 +817,7 @@ typedef ssize_t (*rtems_filesystem_read_t)(
* @param[in] count The size of the buffer in characters.
*
* @retval non-negative Count of written characters.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_write().
*/
@@ -831,7 +835,7 @@ typedef ssize_t (*rtems_filesystem_write_t)(
* @param[in, out] buffer The buffer for IO control request data.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_ioctl().
*/
@@ -849,7 +853,7 @@ typedef int (*rtems_filesystem_ioctl_t)(
* @param[in] whence The reference position for the offset.
*
* @retval non-negative The new offset from the beginning of the file.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_lseek(),
* rtems_filesystem_default_lseek_file(), and
@@ -868,7 +872,7 @@ typedef off_t (*rtems_filesystem_lseek_t)(
* @param[out] stat The buffer to status information.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_fstat().
*/
@@ -884,7 +888,7 @@ typedef int (*rtems_filesystem_fstat_t)(
* @param[in] length The new length in characters.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_ftruncate() and
* rtems_filesystem_default_ftruncate_directory().
@@ -900,7 +904,7 @@ typedef int (*rtems_filesystem_ftruncate_t)(
* @param[in, out] iop The IO pointer.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_fsync_or_fdatasync() and
* rtems_filesystem_default_fsync_or_fdatasync_success().
@@ -915,7 +919,7 @@ typedef int (*rtems_filesystem_fsync_t)(
* @param[in, out] iop The IO pointer.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The errno is set to indicate the error.
+ * @retval -1 An error occurred. The errno is set to indicate the error.
*
* @see rtems_filesystem_default_fsync_or_fdatasync() and
* rtems_filesystem_default_fsync_or_fdatasync_success().
@@ -931,7 +935,7 @@ typedef int (*rtems_filesystem_fdatasync_t)(
* @param[in] cmd Control command.
*
* @retval 0 Successful operation.
- * @retval errno An error occured. This value is assigned to errno.
+ * @retval errno An error occurred. This value is assigned to errno.
*
* @see rtems_filesystem_default_fcntl().
*/
@@ -1053,7 +1057,7 @@ off_t rtems_filesystem_default_lseek_directory(
*
* This function has no protection against concurrent access.
*
- * @retval -1 An error occured. In case an integer overflow occured, then the
+ * @retval -1 An error occurred. In case an integer overflow occurred, then the
* errno will be set to EOVERFLOW. In case the new offset is negative, then
* the errno will be set to EINVAL. In case the whence is SEEK_END and the
* fstat() handler to obtain the current file size returned an error status,
@@ -1176,9 +1180,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;
@@ -1251,6 +1255,11 @@ typedef struct {
/** @} */
+/**
+ * @brief RTEMS LibIO Initialization
+ *
+ * Called by BSP startup code to initialize the libio subsystem.
+ */
void rtems_libio_init(void);
/**
@@ -1401,7 +1410,7 @@ extern rtems_fs_init_functions_t rtems_fs_init_helper;
* The @a mode value selects the access permissions of the directory.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The @c errno indicates the error.
+ * @retval -1 An error occurred. The @c errno indicates the error.
*/
extern int rtems_mkdir(const char *path, mode_t mode);
@@ -1509,7 +1518,7 @@ extern rtems_chain_control rtems_filesystem_mount_table;
* The @a mount_h handler will be used to mount a file system of this @a type.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The @c errno indicates the error.
+ * @retval -1 An error occurred. The @c errno indicates the error.
*/
int rtems_filesystem_register(
const char *type,
@@ -1520,7 +1529,7 @@ int rtems_filesystem_register(
* @brief Unregisters a file system @a type.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The @c errno indicates the error.
+ * @retval -1 An error occurred. The @c errno indicates the error.
*/
int rtems_filesystem_unregister(
const char *type
@@ -1542,7 +1551,7 @@ int rtems_filesystem_unregister(
* unpredictable effects.
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The @c errno indicates the error.
+ * @retval -1 An error occurred. The @c errno indicates the error.
*
* @see ClassicEventTransient.
*/
@@ -1551,38 +1560,38 @@ int unmount(
);
/**
- * @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.
+ * @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 occurred. The @c errno indicates the error.
*/
int mount(
const char *source,
@@ -1601,7 +1610,7 @@ int mount(
* @see mount().
*
* @retval 0 Successful operation.
- * @retval -1 An error occured. The @c errno indicates the error.
+ * @retval -1 An error occurred. The @c errno indicates the error.
*/
int mount_and_make_target_path(
const char *source,
diff --git a/cpukit/libcsupport/include/rtems/libio_.h b/cpukit/libcsupport/include/rtems/libio_.h
index 7c5a29f0c3..6ef4b6ccb6 100644
--- a/cpukit/libcsupport/include/rtems/libio_.h
+++ b/cpukit/libcsupport/include/rtems/libio_.h
@@ -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,
@@ -276,12 +276,26 @@ static inline void rtems_filesystem_instance_unlock(
* File Descriptor Routine Prototypes
*/
+/**
+ * This routine searches the IOP Table for an unused entry. If it
+ * finds one, it returns it. Otherwise, it returns NULL.
+ */
rtems_libio_t *rtems_libio_allocate(void);
+/**
+ * Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand
+ */
uint32_t rtems_libio_fcntl_flags( int fcntl_flags );
+/**
+ * Convert RTEMS internal flags to UNIX fnctl(2) flags
+ */
int rtems_libio_to_fcntl_flags( uint32_t flags );
+/**
+ * This routine frees the resources associated with an IOP (file descriptor)
+ * and clears the slot in the IOP Table.
+ */
void rtems_libio_free(
rtems_libio_t *iop
);
@@ -776,7 +790,7 @@ void rtems_filesystem_eval_path_error(
* @brief Checks that the locations exist in the same file system instance.
*
* @retval 0 The locations exist and are in the same file system instance.
- * @retval -1 An error occured. The @c errno indicates the error.
+ * @retval -1 An error occurred. The @c errno indicates the error.
*/
int rtems_filesystem_location_exists_in_same_instance_as(
const rtems_filesystem_location_info_t *a,
diff --git a/cpukit/libcsupport/include/rtems/malloc.h b/cpukit/libcsupport/include/rtems/malloc.h
index a257674a38..c428bcffb2 100644
--- a/cpukit/libcsupport/include/rtems/malloc.h
+++ b/cpukit/libcsupport/include/rtems/malloc.h
@@ -110,7 +110,7 @@ typedef void (*rtems_malloc_dirtier_t)(void *, size_t);
extern rtems_malloc_dirtier_t rtems_malloc_dirty_helper;
/**
- * @brief Dirty memory function
+ * @brief Dirty Memory Function
*
* This method fills the specified area with a non-zero pattern
* to aid in debugging programs which do not initialize their
diff --git a/cpukit/libcsupport/include/sys/termios.h b/cpukit/libcsupport/include/sys/termios.h
index 8fd46b1cbc..1046eb8c87 100644
--- a/cpukit/libcsupport/include/sys/termios.h
+++ b/cpukit/libcsupport/include/sys/termios.h
@@ -3,7 +3,9 @@
*
* @brief POSIX termios implementation for RTEMS console device driver.
*
- * http://pubs.opengroup.org/onlinepubs/009604599/basedefs/termios.h.html
+ * The Open Group Base Specifications Issue 6
+ * IEEE Std 1003.1, 2004 Edition
+ * Chapter 11, General Terminal Interface
*/
/*
diff --git a/cpukit/libcsupport/src/__gettod.c b/cpukit/libcsupport/src/__gettod.c
index a2f9d1052d..73cd04f821 100644
--- a/cpukit/libcsupport/src/__gettod.c
+++ b/cpukit/libcsupport/src/__gettod.c
@@ -1,6 +1,11 @@
-/*
- * gettimeofday() - SVR4 and BSD4.3 extension required by Newlib
+/**
+ * @file
*
+ * @brief Get the Date and Time
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -22,8 +27,11 @@
#include <rtems/seterr.h>
#if defined(RTEMS_NEWLIB) && !defined(HAVE_GETTIMEOFDAY)
-/*
- * NOTE: The solaris gettimeofday does not have a second parameter.
+
+/**
+ * SVR4 and BSD4.3 extension required by Newlib
+ *
+ * @note The solaris gettimeofday does not have a second parameter.
*/
int gettimeofday(
struct timeval *tp,
@@ -54,7 +62,7 @@ int gettimeofday(
#include <sys/reent.h>
-/*
+/**
* "Reentrant" version
*/
int _gettimeofday_r(
@@ -68,10 +76,10 @@ int _gettimeofday_r(
#endif
#if defined(RTEMS_NEWLIB) && !defined(HAVE__GETTIMEOFDAY)
-/*
+
+/**
* "System call" version
*/
-
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
diff --git a/cpukit/libcsupport/src/__times.c b/cpukit/libcsupport/src/__times.c
index 097cc9fe63..d941f933db 100644
--- a/cpukit/libcsupport/src/__times.c
+++ b/cpukit/libcsupport/src/__times.c
@@ -1,6 +1,11 @@
-/*
- * times() - POSIX 1003.1b 4.5.2 - Get Process Times
+/**
+ * @file
*
+ * @brief Get Process Times
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
@@ -24,6 +29,9 @@
#include <rtems/score/timestamp.h>
#endif
+/**
+ * POSIX 1003.1b 4.5.2 - Get Process Times
+ */
clock_t _times(
struct tms *ptms
)
@@ -79,12 +87,9 @@ clock_t _times(
return ticks;
}
-/*
- * times()
- *
+/**
* times() system call wrapper for _times() above.
*/
-
clock_t times(
struct tms *ptms
)
@@ -92,16 +97,13 @@ clock_t times(
return _times( ptms );
}
-/*
- * _times_r
- *
- * This is the Newlib dependent reentrant version of times().
- */
-
#if defined(RTEMS_NEWLIB)
#include <reent.h>
+/**
+ * This is the Newlib dependent reentrant version of times().
+ */
clock_t _times_r(
struct _reent *ptr __attribute__((unused)),
struct tms *ptms
diff --git a/cpukit/libcsupport/src/assocnamebyremote.c b/cpukit/libcsupport/src/assocnamebyremote.c
index 92bad05956..376ba47ac7 100644
--- a/cpukit/libcsupport/src/assocnamebyremote.c
+++ b/cpukit/libcsupport/src/assocnamebyremote.c
@@ -1,6 +1,8 @@
-/*
- * assoc.c
- * rtems assoc routines
+/**
+ * @file
+ *
+ * @brief RTEMS Associate Name by Remote
+ * @ingroup Associativity
*/
#if HAVE_CONFIG_H
diff --git a/cpukit/libcsupport/src/cfgetispeed.c b/cpukit/libcsupport/src/cfgetispeed.c
index 390e607ae5..a458f26b39 100644
--- a/cpukit/libcsupport/src/cfgetispeed.c
+++ b/cpukit/libcsupport/src/cfgetispeed.c
@@ -1,6 +1,11 @@
-/*
- * cfgetispeed() - 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).
*
diff --git a/cpukit/libcsupport/src/freenode.c b/cpukit/libcsupport/src/freenode.c
index 84e58256d2..1646352359 100644
--- a/cpukit/libcsupport/src/freenode.c
+++ b/cpukit/libcsupport/src/freenode.c
@@ -1,6 +1,10 @@
-/*
- * freenode()
+/**
+ * @file
*
+ * @brief Releases all Resources of a Location
+ * @ingroup LibIOInternal
+ */
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/getchark.c b/cpukit/libcsupport/src/getchark.c
index 1e7bf017c8..785096905b 100644
--- a/cpukit/libcsupport/src/getchark.c
+++ b/cpukit/libcsupport/src/getchark.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get Character from Stdin
+ * @ingroup libcsupport
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libcsupport/src/getlogin.c b/cpukit/libcsupport/src/getlogin.c
index dbc348b95f..fe0f9ad6f8 100644
--- a/cpukit/libcsupport/src/getlogin.c
+++ b/cpukit/libcsupport/src/getlogin.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get User Name
+ * @ingroup libcsupport
+ */
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -15,10 +22,10 @@
#include <unistd.h>
#include <pwd.h>
-/*
+/**
* 4.2.4 Get User Name, P1003.1b-1993, p. 87
*
- * NOTE: P1003.1c/D10, p. 49 adds getlogin_r().
+ * @note P1003.1c/D10, p. 49 adds getlogin_r().
*/
char *getlogin( void )
{
@@ -26,10 +33,10 @@ char *getlogin( void )
return _POSIX_types_Getlogin_buffer;
}
-/*
+/**
* 4.2.4 Get User Name, P1003.1b-1993, p. 87
*
- * NOTE: P1003.1c/D10, p. 49 adds getlogin_r().
+ * @note P1003.1c/D10, p. 49 adds getlogin_r().
*/
int getlogin_r(
char *name,
diff --git a/cpukit/libcsupport/src/libio.c b/cpukit/libcsupport/src/libio.c
index c8ab1f3a9a..a12a12c833 100644
--- a/cpukit/libcsupport/src/libio.c
+++ b/cpukit/libcsupport/src/libio.c
@@ -1,8 +1,11 @@
-/*
- * This file contains the support infrastructure used to manage the
- * table of integer style file descriptors used by the low level
- * POSIX system calls like open(), read, fstat(), etc.
+/**
+ * @file
*
+ * @brief File Descriptor Routines
+ * @ingroup LibIOInternal
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -39,12 +42,6 @@
*/
#undef ACCEPT_O_NDELAY_ALIAS
-/*
- * rtems_libio_fcntl_flags
- *
- * Convert UNIX fnctl(2) flags to ones that RTEMS drivers understand
- */
-
static const rtems_assoc_t access_modes_assoc[] = {
{ "READ", LIBIO_FLAGS_READ, O_RDONLY },
{ "WRITE", LIBIO_FLAGS_WRITE, O_WRONLY },
@@ -87,12 +84,6 @@ uint32_t rtems_libio_fcntl_flags( int fcntl_flags )
return flags;
}
-/*
- * rtems_libio_to_fcntl_flags
- *
- * Convert RTEMS internal flags to UNIX fnctl(2) flags
- */
-
int rtems_libio_to_fcntl_flags( uint32_t flags )
{
int fcntl_flags = 0;
@@ -120,13 +111,6 @@ int rtems_libio_to_fcntl_flags( uint32_t flags )
return fcntl_flags;
}
-/*
- * rtems_libio_allocate
- *
- * This routine searches the IOP Table for an unused entry. If it
- * finds one, it returns it. Otherwise, it returns NULL.
- */
-
rtems_libio_t *rtems_libio_allocate( void )
{
rtems_libio_t *iop = NULL;
@@ -145,13 +129,6 @@ rtems_libio_t *rtems_libio_allocate( void )
return iop;
}
-/*
- * rtems_libio_free
- *
- * This routine frees the resources associated with an IOP (file descriptor)
- * and clears the slot in the IOP Table.
- */
-
void rtems_libio_free(
rtems_libio_t *iop
)
diff --git a/cpukit/libcsupport/src/libio_init.c b/cpukit/libcsupport/src/libio_init.c
index 9e767c58b0..3496b59b5e 100644
--- a/cpukit/libcsupport/src/libio_init.c
+++ b/cpukit/libcsupport/src/libio_init.c
@@ -1,8 +1,11 @@
-/*
- * This file contains the support infrastructure used to manage the
- * table of integer style file descriptors used by the low level
- * POSIX system calls like open(), read, fstat(), etc.
+/**
+ * @file
*
+ * @brief RTEMS LibIO Initialization
+ * @ingroup LibIO
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
@@ -38,12 +41,6 @@ rtems_id rtems_libio_semaphore;
rtems_libio_t *rtems_libio_iops;
rtems_libio_t *rtems_libio_iop_freelist;
-/*
- * rtems_libio_init
- *
- * Called by BSP startup code to initialize the libio subsystem.
- */
-
void rtems_libio_init( void )
{
rtems_status_code rc;
diff --git a/cpukit/libcsupport/src/malloc_dirtier.c b/cpukit/libcsupport/src/malloc_dirtier.c
index 122c230c08..68ad153d49 100644
--- a/cpukit/libcsupport/src/malloc_dirtier.c
+++ b/cpukit/libcsupport/src/malloc_dirtier.c
@@ -1,6 +1,11 @@
-/*
- * RTEMS Malloc Family -- Dirty Memory from Malloc
+/**
+ * @file
*
+ * @brief Dirty Memory Function
+ * @ingroup MallocSupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/malloc_get_statistics.c b/cpukit/libcsupport/src/malloc_get_statistics.c
index 0d9269d7a4..187d5ceea1 100644
--- a/cpukit/libcsupport/src/malloc_get_statistics.c
+++ b/cpukit/libcsupport/src/malloc_get_statistics.c
@@ -1,6 +1,11 @@
-/*
- * malloc_get_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/mallocfreespace.c b/cpukit/libcsupport/src/mallocfreespace.c
index c67896dbb2..2b262ca272 100644
--- a/cpukit/libcsupport/src/mallocfreespace.c
+++ b/cpukit/libcsupport/src/mallocfreespace.c
@@ -1,7 +1,11 @@
-/*
- * RTEMS Malloc Get Free Information
- *
+/**
+ * @file
*
+ * @brief RTEMS Malloc Get Free Information
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/readv.c b/cpukit/libcsupport/src/readv.c
index 4e540d5da4..2ff7f63767 100644
--- a/cpukit/libcsupport/src/readv.c
+++ b/cpukit/libcsupport/src/readv.c
@@ -1,10 +1,11 @@
-/*
- * readv() - POSIX 1003.1 - Read a Vector
- *
- * OpenGroup URL:
- *
- * http://www.opengroup.org/onlinepubs/009695399/functions/readv.html
+/**
+ * @file
*
+ * @brief Read a Vector
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
@@ -23,6 +24,13 @@
#include <rtems/libio_.h>
#include <rtems/seterr.h>
+/**
+ * readv() - POSIX 1003.1 - Read a Vector
+ *
+ * OpenGroup URL:
+ *
+ * http://www.opengroup.org/onlinepubs/009695399/functions/readv.html
+ */
ssize_t readv(
int fd,
const struct iovec *iov,
diff --git a/cpukit/libcsupport/src/setsid.c b/cpukit/libcsupport/src/setsid.c
index e77179d64f..f86b9e2b6a 100644
--- a/cpukit/libcsupport/src/setsid.c
+++ b/cpukit/libcsupport/src/setsid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Create Session and Set Process Group ID
+ * @ingroup libcsupport
+ */
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -6,10 +13,9 @@
#include <rtems/seterr.h>
-/*
+/**
* 4.3.2 Create Session and Set Process Group ID, P1003.1b-1993, p. 88
*/
-
pid_t setsid( void )
{
rtems_set_errno_and_return_minus_one( EPERM );
diff --git a/cpukit/libcsupport/src/stat.c b/cpukit/libcsupport/src/stat.c
index 06c3a22b52..e75fdca171 100644
--- a/cpukit/libcsupport/src/stat.c
+++ b/cpukit/libcsupport/src/stat.c
@@ -1,8 +1,11 @@
-/*
- * stat() - POSIX 1003.1b 5.6.2 - Get File Status
- *
- * Reused from lstat().
+/**
+ * @file
*
+ * @brief Get File Status
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -31,6 +34,11 @@
#include <rtems/libio_.h>
+/**
+ * POSIX 1003.1b 5.6.2 - Get File Status
+ *
+ * Reused from lstat().
+ */
int _STAT_NAME( const char *path, struct stat *buf )
{
int rv = 0;
@@ -48,16 +56,13 @@ int _STAT_NAME( const char *path, struct stat *buf )
return rv;
}
-/*
- * _stat_r, _lstat_r
- *
- * This is the Newlib dependent reentrant version of stat() and lstat().
- */
-
#if defined(RTEMS_NEWLIB)
#include <reent.h>
+/**
+ * This is the Newlib dependent reentrant version of stat() and lstat().
+ */
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
diff --git a/cpukit/libcsupport/src/sup_fs_check_permissions.c b/cpukit/libcsupport/src/sup_fs_check_permissions.c
index 85d237cce6..1bcc5d918e 100644
--- a/cpukit/libcsupport/src/sup_fs_check_permissions.c
+++ b/cpukit/libcsupport/src/sup_fs_check_permissions.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS File System Permissions Check Support
+ * @ingroup LibIOInternal
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/sup_fs_location.c b/cpukit/libcsupport/src/sup_fs_location.c
index 8bf0374323..2ce514549e 100644
--- a/cpukit/libcsupport/src/sup_fs_location.c
+++ b/cpukit/libcsupport/src/sup_fs_location.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS File System Location Support
+ * @ingroup LibIOInternal
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/termios_setinitialbaud.c b/cpukit/libcsupport/src/termios_setinitialbaud.c
index 072a7bda24..cba49b4590 100644
--- a/cpukit/libcsupport/src/termios_setinitialbaud.c
+++ b/cpukit/libcsupport/src/termios_setinitialbaud.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Sets the Initial Baud in the Termios Context
+ * @ingroup TermiostypesSupport
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libcsupport/src/ttyname.c b/cpukit/libcsupport/src/ttyname.c
index 2e76597d96..f136e89a17 100644
--- a/cpukit/libcsupport/src/ttyname.c
+++ b/cpukit/libcsupport/src/ttyname.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Demetermine Terminal Device Name
+ * @ingroup libcsupport
+ */
+
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. All rights reserved.
@@ -54,7 +61,7 @@
static char ttyname_buf[sizeof (_PATH_DEV) + MAXNAMLEN];
-/*
+/**
* ttyname_r() - POSIX 1003.1b 4.7.2 - Demetermine Terminal Device Name
*/
int ttyname_r(
@@ -99,10 +106,9 @@ int ttyname_r(
return 0;
}
-/*
+/**
* ttyname() - POSIX 1003.1b 4.7.2 - Determine Terminal Device Name
*/
-
char *ttyname(
int fd
)
diff --git a/cpukit/libcsupport/src/utime.c b/cpukit/libcsupport/src/utime.c
index 0f65397166..0b60de6013 100644
--- a/cpukit/libcsupport/src/utime.c
+++ b/cpukit/libcsupport/src/utime.c
@@ -1,6 +1,11 @@
-/*
- * utime() - POSIX 1003.1b 5.5.6 - Set File Access and Modification Times
+/**
+ * @file
*
+ * @brief Set File Access and Modification Times
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -20,6 +25,9 @@
#include <rtems/libio_.h>
+/**
+ * POSIX 1003.1b 5.5.6 - Set File Access and Modification Times
+ */
int utime( const char *path, const struct utimbuf *times )
{
int rv = 0;
diff --git a/cpukit/libfs/src/devfs/devclose.c b/cpukit/libfs/src/devfs/devclose.c
index 83646c7619..505554f216 100644
--- a/cpukit/libfs/src/devfs/devclose.c
+++ b/cpukit/libfs/src/devfs/devclose.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Maps Close Operation to rtems_io_close
+ * @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.h b/cpukit/libfs/src/devfs/devfs.h
index 3fd1fab036..2317b10852 100644
--- a/cpukit/libfs/src/devfs/devfs.h
+++ b/cpukit/libfs/src/devfs/devfs.h
@@ -88,6 +88,8 @@ extern int devFS_open(
/**
+ * @brief Maps Close Operation to rtems_io_close
+ *
* This handler maps close operation to rtems_io_close.
* @param iop This is the RTEMS's internal representation of file
* @retval the same as close
@@ -153,6 +155,8 @@ extern int devFS_ioctl(
/**
+ * @brief Gets the Device File Information
+ *
* This handler gets the device file information. This routine only set the following member of struct stat:
* st_dev : device number
* st_mode: device file creation mode, only two mode are accepted:
@@ -227,6 +231,8 @@ extern int devFS_initialize(
/**
+ * @brief Retrieves and Prints all the Device Registered in System
+ *
* This routine retrieves all the device registered in system, and
* prints out their detail information. For example, on one system,
* devFS_show will print out following message:
diff --git a/cpukit/libfs/src/devfs/devfs_show.c b/cpukit/libfs/src/devfs/devfs_show.c
index 56badb1207..43cb02dfea 100644
--- a/cpukit/libfs/src/devfs/devfs_show.c
+++ b/cpukit/libfs/src/devfs/devfs_show.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Retrieves and Prints all the Device Registered in System
+ * @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/devstat.c b/cpukit/libfs/src/devfs/devstat.c
index f988448f70..f2b3de1840 100644
--- a/cpukit/libfs/src/devfs/devstat.c
+++ b/cpukit/libfs/src/devfs/devstat.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Gets the Device File Information
+ * @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/fat.c b/cpukit/libfs/src/dosfs/fat.c
index c82bf5ac8b..a672f42c7a 100644
--- a/cpukit/libfs/src/dosfs/fat.c
+++ b/cpukit/libfs/src/dosfs/fat.c
@@ -773,17 +773,12 @@ fat_init_volume_info(fat_fs_info_t *fs_info, const char *device)
if (is_cluster_aligned(vol, vol->data_fsec)
&& (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc)))
{
- vol->bytes_per_block = vol->bpc;
- vol->bytes_per_block_log2 = vol->bpc_log2;
- vol->sectors_per_block = vol->spc;
- sc = rtems_bdbuf_set_block_size (vol->dd, vol->bytes_per_block, true);
- if (RTEMS_SUCCESSFUL != sc)
+ sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true);
+ if (sc == RTEMS_SUCCESSFUL)
{
- close(vol->fd);
- free(fs_info->vhash);
- free(fs_info->rhash);
- free(fs_info->uino);
- rtems_set_errno_and_return_minus_one( EIO );
+ vol->bytes_per_block = vol->bpc;
+ vol->bytes_per_block_log2 = vol->bpc_log2;
+ vol->sectors_per_block = vol->spc;
}
}
diff --git a/cpukit/libfs/src/dosfs/fat_fat_operations.c b/cpukit/libfs/src/dosfs/fat_fat_operations.c
index 7496c09272..e558cec427 100644
--- a/cpukit/libfs/src/dosfs/fat_fat_operations.c
+++ b/cpukit/libfs/src/dosfs/fat_fat_operations.c
@@ -1,8 +1,11 @@
-/*
- * fat_fat_operations.c
- *
- * General operations on File Allocation Table
+/**
+ * @file
*
+ * @brief General operations on File Allocation Table
+ * @ingroup libfs_ffo Fat Fat Operations
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*/
diff --git a/cpukit/libfs/src/dosfs/fat_fat_operations.h b/cpukit/libfs/src/dosfs/fat_fat_operations.h
index f9c124d055..278947ffca 100644
--- a/cpukit/libfs/src/dosfs/fat_fat_operations.h
+++ b/cpukit/libfs/src/dosfs/fat_fat_operations.h
@@ -19,6 +19,12 @@
#include <rtems/bdbuf.h>
+/**
+ * @defgroup libfs_ffo Fat Fat Operations
+ *
+ * @ingroup libfs
+ */
+/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
@@ -54,5 +60,5 @@ fat_free_fat_clusters_chain(
#ifdef __cplusplus
}
#endif
-
+/**@}*/
#endif /* __DOSFS_FAT_FAT_OPERATIONS_H__ */
diff --git a/cpukit/libfs/src/dosfs/fat_file.c b/cpukit/libfs/src/dosfs/fat_file.c
index 43826c9205..3e2d60967c 100644
--- a/cpukit/libfs/src/dosfs/fat_file.c
+++ b/cpukit/libfs/src/dosfs/fat_file.c
@@ -1,8 +1,11 @@
-/*
- * fat_file.c
- *
- * General operations on "fat-file"
+/**
+ * @file
*
+ * @brief General operations on "fat-file"
+ * @ingroup libfs_ff Fat File
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/dosfs/fat_file.h b/cpukit/libfs/src/dosfs/fat_file.h
index 2018e995d7..0e22c90e60 100644
--- a/cpukit/libfs/src/dosfs/fat_file.h
+++ b/cpukit/libfs/src/dosfs/fat_file.h
@@ -20,6 +20,12 @@
#include "fat.h"
+/**
+ * @defgroup libfs_ff Fat File
+ *
+ * @ingroup libfs
+ */
+/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
@@ -182,5 +188,5 @@ fat_file_mark_removed(fat_fs_info_t *fs_info,
#ifdef __cplusplus
}
#endif
-
+/**@}*/
#endif /* __DOSFS_FAT_FILE_H__ */
diff --git a/cpukit/libfs/src/dosfs/msdos.h b/cpukit/libfs/src/dosfs/msdos.h
index 26bf906173..ad0841297c 100644
--- a/cpukit/libfs/src/dosfs/msdos.h
+++ b/cpukit/libfs/src/dosfs/msdos.h
@@ -19,6 +19,12 @@
#include "fat.h"
#include "fat_file.h"
+/**
+ * @defgroup libfs_msdos MSDOS FileSystem
+ *
+ * @ingroup libfs
+ */
+/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
@@ -73,6 +79,12 @@ extern const rtems_filesystem_file_handlers_r msdos_file_handlers;
#define MSDOS_REGULAR_FILE RTEMS_FILESYSTEM_MEMORY_FILE
#define MSDOS_HARD_LINK RTEMS_FILESYSTEM_HARD_LINK /* pseudo type */
+/**
+ * @brief Type of Node that Loc Refers To
+ *
+ * The following returns the type of node that the loc refers to.
+ *
+ */
typedef rtems_filesystem_node_types_t msdos_node_type_t;
/*
@@ -220,11 +232,20 @@ typedef enum msdos_token_types_e
*/
#define MSDOS_DPS512_NUM 16
-/* Prototypes */
+/**
+ * @brief Shut Down MSDOS FileSystem
+ *
+ * MSDOS shut down handler implementation
+ */
void msdos_shut_down(rtems_filesystem_mount_table_entry_t *temp_mt_entry);
void msdos_eval_path(rtems_filesystem_eval_path_context_t *ctx);
+/**
+ * @brief Call Fat-File Close Routine
+ *
+ * Free node handler implementation for the filesystem operations table.
+ */
void msdos_free_node_info(const rtems_filesystem_location_info_t *pathloc);
rtems_filesystem_node_types_t msdos_node_type(
@@ -239,11 +260,21 @@ int msdos_mknod(
dev_t dev
);
+/**
+ * @brief Remove Node from MSDOS Directory
+ *
+ * MSDOS Directory Handlers Implementation
+ */
int msdos_rmnod(
const rtems_filesystem_location_info_t *parentloc,
const rtems_filesystem_location_info_t *loc
);
+/**
+ * @brief Rename a MSDOS FileSystem Node
+ *
+ * Routine to rename a MSDOS filesystem node
+ */
int msdos_rename(
const rtems_filesystem_location_info_t *old_parent_loc,
const rtems_filesystem_location_info_t *old_loc,
@@ -256,6 +287,11 @@ void msdos_lock(const rtems_filesystem_mount_table_entry_t *mt_entry);
void msdos_unlock(const rtems_filesystem_mount_table_entry_t *mt_entry);
+/**
+ * @brief MSDOS Filesystem Initialization
+ *
+ * MSDOS Initialization support routine implementation
+ */
int msdos_initialize_support(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
@@ -305,6 +341,12 @@ int msdos_dir_stat(
struct stat *buf
);
+/**
+ * @brief Implements wake up version of the "signal" operation
+ *
+ * Routine to create a new MSDOS filesystem node
+ *
+ */
int msdos_creat_node(const rtems_filesystem_location_info_t *parent_loc,
msdos_node_type_t type,
const char *name,
@@ -402,5 +444,5 @@ int msdos_sync(rtems_libio_t *iop);
#ifdef __cplusplus
}
#endif
-
+/**@}*/
#endif /* __DOSFS_MSDOS_H__ */
diff --git a/cpukit/libfs/src/dosfs/msdos_conv.c b/cpukit/libfs/src/dosfs/msdos_conv.c
index 95b25814db..7549c42e56 100644
--- a/cpukit/libfs/src/dosfs/msdos_conv.c
+++ b/cpukit/libfs/src/dosfs/msdos_conv.c
@@ -1,7 +1,10 @@
-/*
- * Adaptation of NetBSD code for RTEMS by Victor V. Vengerov <vvv@oktet.ru>
+/**
+ * @file
+ *
+ * @brief MDOS Date Conversion
+ * @ingroup libfs_msdos MSDOS FileSystem
*/
-/* $NetBSD: msdosfs_conv.c,v 1.10 1994/12/27 18:36:24 mycroft Exp $ */
+
/*
* Written by Paul Popelka (paulp@uts.amdahl.com)
*
@@ -15,6 +18,9 @@
* functioning of this software in any circumstances and is not liable for
* any damages caused by this software.
*
+ * Adaptation of NetBSD code for RTEMS by Victor V. Vengerov <vvv@oktet.ru>
+ * $NetBSD: msdosfs_conv.c,v 1.10 1994/12/27 18:36:24 mycroft Exp $
+ *
* October 1992
*/
diff --git a/cpukit/libfs/src/dosfs/msdos_create.c b/cpukit/libfs/src/dosfs/msdos_create.c
index f8e1a9e19d..886dd404cc 100644
--- a/cpukit/libfs/src/dosfs/msdos_create.c
+++ b/cpukit/libfs/src/dosfs/msdos_create.c
@@ -1,6 +1,11 @@
-/*
- * Routine to create a new MSDOS filesystem node
+/**
+ * @file
*
+ * @brief Create a new MSDOS FileSystem node
+ * @ingroup libfs_msdos MSDOS FileSystem
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/dosfs/msdos_dir.c b/cpukit/libfs/src/dosfs/msdos_dir.c
index 961568e47d..fd9ca40461 100644
--- a/cpukit/libfs/src/dosfs/msdos_dir.c
+++ b/cpukit/libfs/src/dosfs/msdos_dir.c
@@ -1,6 +1,11 @@
-/*
- * MSDOS directory handlers implementation
+/**
+ * @file
*
+ * @brief MSDOS Directory Handlers Implementation
+ * @ingroup libfs_msdos MSDOS FileSystem
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/dosfs/msdos_file.c b/cpukit/libfs/src/dosfs/msdos_file.c
index a5b9c7abb2..b19b848786 100644
--- a/cpukit/libfs/src/dosfs/msdos_file.c
+++ b/cpukit/libfs/src/dosfs/msdos_file.c
@@ -1,6 +1,11 @@
-/*
- * MSDOS file handlers implementation
+/**
+ * @file
*
+ * @brief MSDOS File Handlers Implementation
+ * @ingroup libfs
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/dosfs/msdos_format.c b/cpukit/libfs/src/dosfs/msdos_format.c
index 0b30caf030..49015e8fbd 100644
--- a/cpukit/libfs/src/dosfs/msdos_format.c
+++ b/cpukit/libfs/src/dosfs/msdos_format.c
@@ -1,25 +1,23 @@
-/*===============================================================*\
-| Project: RTEMS msdos format functionality |
-+-----------------------------------------------------------------+
-| File: msdos_format.c |
-+-----------------------------------------------------------------+
-| Copyright (c) 2004 IMD |
-| Ingenieurbuero fuer Microcomputertechnik Th. Doerfler |
-| <Thomas.Doerfler@imd-systems.de> |
-| all rights reserved |
-+-----------------------------------------------------------------+
-| this file contains msdos_format function. This function |
-| formats a disk partition conforming to MS-DOS conventions |
-| |
-| 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. |
-| |
-+-----------------------------------------------------------------+
-| date history ID |
-| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
-| 29.10.04 creation doe |
-\*===============================================================*/
+/**
+ * @file
+ *
+ * @brief RTEMS MSDOS Format Functionality
+ * @ingroup libfs
+ *
+ * This function formats a disk partition conforming to MS-DOS conventions
+ */
+
+/*
+ * Copyright (C) 2004 IMD
+ * Ingenieurbuero fuer Microcomputertechnik Th. Doerfler
+ * <Thomas.Doerfler@imd-systems.de>
+ *
+ * All rights reserved.
+ *
+ * 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 HAVE_CONFIG_H
#include "config.h"
diff --git a/cpukit/libfs/src/dosfs/msdos_free.c b/cpukit/libfs/src/dosfs/msdos_free.c
index 4dc26b7e9e..44db35d3ee 100644
--- a/cpukit/libfs/src/dosfs/msdos_free.c
+++ b/cpukit/libfs/src/dosfs/msdos_free.c
@@ -1,7 +1,11 @@
-/*
- * Free node handler implementation for the filesystem
- * operations table.
+/**
+ * @file
*
+ * @brief Call Fat-File Close Routine
+ * @ingroup libfs_msdos MSDOS FileSystem
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/dosfs/msdos_fsunmount.c b/cpukit/libfs/src/dosfs/msdos_fsunmount.c
index e23daaab4e..90a8073bf8 100644
--- a/cpukit/libfs/src/dosfs/msdos_fsunmount.c
+++ b/cpukit/libfs/src/dosfs/msdos_fsunmount.c
@@ -1,6 +1,11 @@
-/*
- * MSDOS shut down handler implementation
+/**
+ * @file
*
+ * @brief Shut Down MSDOS FileSystem
+ * @ingroup libfs_msdos MSDOS FileSystem
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/dosfs/msdos_handlers_dir.c b/cpukit/libfs/src/dosfs/msdos_handlers_dir.c
index a56353b5fd..41efdb439d 100644
--- a/cpukit/libfs/src/dosfs/msdos_handlers_dir.c
+++ b/cpukit/libfs/src/dosfs/msdos_handlers_dir.c
@@ -1,6 +1,11 @@
-/*
- * Directory Handlers Table for MSDOS filesystem
+/**
+ * @file
*
+ * @brief Directory Handlers Table for MSDOS FileSystem
+ * @ingroup libfs
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/dosfs/msdos_handlers_file.c b/cpukit/libfs/src/dosfs/msdos_handlers_file.c
index e6edae0636..2a3938d02a 100644
--- a/cpukit/libfs/src/dosfs/msdos_handlers_file.c
+++ b/cpukit/libfs/src/dosfs/msdos_handlers_file.c
@@ -1,6 +1,11 @@
-/*
- * File Operations Table for MSDOS filesystem
+/**
+ * @file
*
+ * @brief File Operations Table for MSDOS FileSystem
+ * @ingroup libfs
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/dosfs/msdos_init.c b/cpukit/libfs/src/dosfs/msdos_init.c
index 544fef49be..eb46141503 100644
--- a/cpukit/libfs/src/dosfs/msdos_init.c
+++ b/cpukit/libfs/src/dosfs/msdos_init.c
@@ -1,6 +1,11 @@
-/*
- * Init routine for MSDOS
+/**
+ * @file
*
+ * @brief Init Routine for MSDOS
+ * @ingroup libfs
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/dosfs/msdos_initsupp.c b/cpukit/libfs/src/dosfs/msdos_initsupp.c
index cf24d4bb64..08441869b4 100644
--- a/cpukit/libfs/src/dosfs/msdos_initsupp.c
+++ b/cpukit/libfs/src/dosfs/msdos_initsupp.c
@@ -1,6 +1,11 @@
-/*
- * MSDOS Initialization support routine implementation
+/**
+ * @file
*
+ * @brief MSDOS Filesystem Initialization
+ * @ingroup libfs_msdos MSDOS FileSystem
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/dosfs/msdos_misc.c b/cpukit/libfs/src/dosfs/msdos_misc.c
index 5ebf257b5a..a1979b1e2c 100644
--- a/cpukit/libfs/src/dosfs/msdos_misc.c
+++ b/cpukit/libfs/src/dosfs/msdos_misc.c
@@ -1,6 +1,11 @@
-/*
- * Miscellaneous routines implementation for MSDOS filesystem
+/**
+ * @file
*
+ * @brief Miscellaneous Routines Implementation for MSDOS FileSystem
+ * @ingroup libfs
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/dosfs/msdos_node_type.c b/cpukit/libfs/src/dosfs/msdos_node_type.c
index 27b5189af4..c1b83d0709 100644
--- a/cpukit/libfs/src/dosfs/msdos_node_type.c
+++ b/cpukit/libfs/src/dosfs/msdos_node_type.c
@@ -1,6 +1,11 @@
-/*
- * The following returns the type of node that the loc refers to.
+/**
+ * @file
*
+ * @brief Type of Node that Loc Refers To
+ * @ingroup libfs_msdos MSDOS FileSystem
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/dosfs/msdos_rename.c b/cpukit/libfs/src/dosfs/msdos_rename.c
index 5423cdbf77..c6d1f560f3 100644
--- a/cpukit/libfs/src/dosfs/msdos_rename.c
+++ b/cpukit/libfs/src/dosfs/msdos_rename.c
@@ -1,6 +1,11 @@
-/*
- * Routine to rename a MSDOS filesystem node
+/**
+ * @file
*
+ * @brief Rename a MSDOS FileSystem Node
+ * @ingroup libfs_msdos MSDOS FileSystem
+ */
+
+/*
* Copyright (C) 2010 Chris Johns <chrisj@rtems.org>
*
* The license and distribution terms for this file may be
diff --git a/cpukit/libfs/src/dosfs/msdos_rmnod.c b/cpukit/libfs/src/dosfs/msdos_rmnod.c
index 099b9287e5..36408e15a1 100644
--- a/cpukit/libfs/src/dosfs/msdos_rmnod.c
+++ b/cpukit/libfs/src/dosfs/msdos_rmnod.c
@@ -1,6 +1,11 @@
-/*
- * MSDOS directory handlers implementation
+/**
+ * @file
*
+ * @brief Remove Node from MSDOS Directory
+ * @ingroup libfs_msdos MSDOS FileSystem
+ */
+
+/*
* Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
* Author: Eugeny S. Mints <Eugeny.Mints@oktet.ru>
*
diff --git a/cpukit/libfs/src/imfs/deviceio.c b/cpukit/libfs/src/imfs/deviceio.c
index 679f94559c..094e92d2ef 100644
--- a/cpukit/libfs/src/imfs/deviceio.c
+++ b/cpukit/libfs/src/imfs/deviceio.c
@@ -1,9 +1,11 @@
-/*
- * IMFS Device Node Handlers
- *
- * This file contains the set of handlers used to map operations on
- * IMFS device nodes onto calls to the RTEMS Classic API IO Manager.
+/**
+ * @file
*
+ * @brief IMFS Device Node Handlers
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-2012.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs.h b/cpukit/libfs/src/imfs/imfs.h
index aed00778e7..646e988ca2 100644
--- a/cpukit/libfs/src/imfs/imfs.h
+++ b/cpukit/libfs/src/imfs/imfs.h
@@ -1,7 +1,7 @@
/**
* @file rtems/imfs.h
*
- * Header file for the In-Memory File System
+ * @brief Header file for the In-Memory File System
*/
/*
@@ -21,6 +21,12 @@
#include <rtems/libio_.h>
#include <rtems/pipe.h>
+/**
+ * @defgroup IMFS POSIX In-Memory File System Support
+ *
+ * @brief In-Memory File System Support
+ */
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -158,6 +164,9 @@ typedef IMFS_jnode_t *(*IMFS_node_control_initialize)(
const IMFS_types_union *info
);
+/**
+ * @brief Initialize Default IMFS Node
+ */
IMFS_jnode_t *IMFS_node_initialize_default(
IMFS_jnode_t *node,
const IMFS_types_union *info
@@ -172,12 +181,18 @@ typedef IMFS_jnode_t *(*IMFS_node_control_remove)(
IMFS_jnode_t *node
);
+/**
+ * @brief Remove Default IMFS Node
+ */
IMFS_jnode_t *IMFS_node_remove_default(
IMFS_jnode_t *node
);
typedef IMFS_jnode_t *(*IMFS_node_control_destroy)( IMFS_jnode_t *node );
+/**
+ * @brief Destroy Default IMFS Node
+ */
IMFS_jnode_t *IMFS_node_destroy_default( IMFS_jnode_t *node );
typedef struct {
@@ -298,49 +313,141 @@ extern int miniIMFS_initialize(
const void *data
);
+/**
+ * @brief IMFS Initialization Support
+ */
extern int IMFS_initialize_support(
rtems_filesystem_mount_table_entry_t *mt_entry,
const rtems_filesystem_operations_table *op_table,
const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT]
);
-
+/**
+ * @brief Unmount this Instance of IMFS
+ */
extern void IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *mt_entry
);
+/**
+ * @brief RTEMS Load Tarfs
+ *
+ * This file implements the "mount" procedure for tar-based IMFS
+ * extensions. The TAR is not actually mounted under the IMFS.
+ * Directories from the TAR file are created as usual in the IMFS.
+ * File entries are created as IMFS_LINEAR_FILE nodes with their nods
+ * pointing to addresses in the TAR image.
+ *
+ * Here we create the mountpoint directory and load the tarfs at
+ * that node. Once the IMFS has been mounted, we work through the
+ * tar image and perform as follows:
+ * - For directories, simply call mkdir(). The IMFS creates nodes as
+ * needed.
+ * - For files, we make our own calls to IMFS eval_for_make and
+ * create_node.
+ *
+ * TAR file format:
+ *
+ * Offset Length Contents
+ * 0 100 bytes File name ('\0' terminated, 99 maxmum length)
+ * 100 8 bytes File mode (in octal ascii)
+ * 108 8 bytes User ID (in octal ascii)
+ * 116 8 bytes Group ID (in octal ascii)
+ * 124 12 bytes File size (s) (in octal ascii)
+ * 136 12 bytes Modify time (in octal ascii)
+ * 148 8 bytes Header checksum (in octal ascii)
+ * 156 1 bytes Link flag
+ * 157 100 bytes Linkname ('\0' terminated, 99 maxmum length)
+ * 257 8 bytes Magic PAX ("ustar\0" + 2 bytes padding)
+ * 257 8 bytes Magic GNU tar ("ustar \0")
+ * 265 32 bytes User name ('\0' terminated, 31 maxmum length)
+ * 297 32 bytes Group name ('\0' terminated, 31 maxmum length)
+ * 329 8 bytes Major device ID (in octal ascii)
+ * 337 8 bytes Minor device ID (in octal ascii)
+ * 345 167 bytes Padding
+ * 512 (s+p)bytes File contents (s+p) := (((s) + 511) & ~511),
+ * round up to 512 bytes
+ *
+ * Checksum:
+ * int i, sum;
+ * char* header = tar_header_pointer;
+ * sum = 0;
+ * for(i = 0; i < 512; i++)
+ * sum += 0xFF & header[i];
+ */
extern int rtems_tarfs_load(
const char *mountpoint,
uint8_t *tar_image,
size_t tar_size
);
+/**
+ * @brief IMFS Dump
+ *
+ * This routine dumps the entire IMFS that is mounted at the root
+ * directory.
+ *
+ * NOTE: Assuming the "/" directory is bad.
+ * Not checking that the starting directory is in an IMFS is bad.
+ */
extern void IMFS_dump( void );
-/*
+/**
+ * @brief IMFS Memory File Maximum Size
+ *
* Return the size of the largest file which can be created
* using the IMFS memory file type.
*/
extern int IMFS_memfile_maximum_size( void );
+/**
+ * @brief Destroy IMFS Node
+ */
extern void IMFS_node_destroy( IMFS_jnode_t *node );
+/**
+ * @brief Clone IMFS Node
+ */
extern int IMFS_node_clone( rtems_filesystem_location_info_t *loc );
+/**
+ * @brief Free IMFS Node
+ */
extern void IMFS_node_free( const rtems_filesystem_location_info_t *loc );
+/**
+ * @brief IMFS Node Type
+ *
+ * The following verifies that returns the type of node that the
+ * loc refers to.
+ */
extern rtems_filesystem_node_types_t IMFS_node_type(
const rtems_filesystem_location_info_t *loc
);
+/**
+ * @brief IMFS Stat
+ *
+ * This routine provides a stat for the IMFS file system.
+ */
extern int IMFS_stat(
const rtems_filesystem_location_info_t *loc,
struct stat *buf
);
+/**
+ * @brief Evaluation IMFS Node Support
+ */
extern void IMFS_eval_path(
rtems_filesystem_eval_path_context_t *ctx
);
+/**
+ * @brief IMFS Create a New Link Node
+ *
+ * The following rouine creates a new link node under parent with the
+ * name given in name. The link node is set to point to the node at
+ * to_loc.
+ */
extern int IMFS_link(
const rtems_filesystem_location_info_t *parentloc,
const rtems_filesystem_location_info_t *targetloc,
@@ -348,12 +455,23 @@ extern int IMFS_link(
size_t namelen
);
+/**
+ * @brief IMFS Change Owner
+ *
+ * This routine is the implementation of the chown() system
+ * call for the IMFS.
+ */
extern int IMFS_chown(
const rtems_filesystem_location_info_t *loc,
uid_t owner,
gid_t group
);
+/**
+ * @brief Create a IMFS Node
+ *
+ * Routine to create a node in the IMFS file system.
+ */
extern int IMFS_mknod(
const rtems_filesystem_location_info_t *parentloc,
const char *name,
@@ -362,6 +480,11 @@ extern int IMFS_mknod(
dev_t dev
);
+/**
+ * @brief Create a New IMFS Node
+ *
+ * Routine to create a new in memory file system node.
+ */
extern IMFS_jnode_t *IMFS_allocate_node(
IMFS_fs_info_t *fs_info,
const IMFS_node_control *node_control,
@@ -371,6 +494,12 @@ extern IMFS_jnode_t *IMFS_allocate_node(
const IMFS_types_union *info
);
+/**
+ * @brief Create an IMFS Node
+ *
+ * Create an IMFS filesystem node of an arbitrary type that is NOT
+ * the root directory node.
+ */
extern IMFS_jnode_t *IMFS_create_node_with_control(
const rtems_filesystem_location_info_t *parentloc,
const IMFS_node_control *node_control,
@@ -384,6 +513,9 @@ extern bool IMFS_is_imfs_instance(
const rtems_filesystem_location_info_t *loc
);
+/**
+ * @brief IMFS Make a Generic Node
+ */
extern int IMFS_make_generic_node(
const char *path,
mode_t mode,
@@ -391,10 +523,16 @@ extern int IMFS_make_generic_node(
void *context
);
+/**
+ * @brief Mount an IMFS
+ */
extern int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry /* IN */
);
+/**
+ * @brief Unmount an IMFS
+ */
extern int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry /* IN */
);
@@ -403,17 +541,54 @@ extern IMFS_jnode_t *IMFS_memfile_remove(
IMFS_jnode_t *the_jnode /* IN/OUT */
);
+/**
+ * @brief Truncate a Memory File
+ *
+ * This routine processes the ftruncate() system call.
+ */
extern int memfile_ftruncate(
rtems_libio_t *iop, /* IN */
off_t length /* IN */
);
+/**
+ * @brief IMFS Read Next Directory
+ *
+ * This routine will read the next directory entry based on the directory
+ * offset. The offset should be equal to -n- time the size of an individual
+ * dirent structure. If n is not an integer multiple of the sizeof a
+ * dirent structure, an integer division will be performed to determine
+ * directory entry that will be returned in the buffer. Count should reflect
+ * -m- times the sizeof dirent bytes to be placed in the buffer.
+ * If there are not -m- dirent elements from the current directory position
+ * to the end of the exisiting file, the remaining entries will be placed in
+ * the buffer and the returned value will be equal to -m actual- times the
+ * size of a directory entry.
+ */
extern ssize_t imfs_dir_read(
rtems_libio_t *iop, /* IN */
void *buffer, /* IN */
size_t count /* IN */
);
+/**
+ * @name IMFS Memory File Handlers
+ *
+ * This section contains the set of handlers used to process operations on
+ * IMFS memory file nodes. The memory files are created in memory using
+ * malloc'ed memory. Thus any data stored in one of these files is lost
+ * at system shutdown unless special arrangements to copy the data to
+ * some type of non-volailte storage are made by the application.
+ *
+ * @{
+ */
+
+/**
+ * @brief Open a Memory File
+ *
+ * This routine processes the open() system call. Note that there is
+ * nothing special to be done at open() time.
+ */
extern int memfile_open(
rtems_libio_t *iop, /* IN */
const char *pathname, /* IN */
@@ -421,18 +596,41 @@ extern int memfile_open(
mode_t mode /* IN */
);
+/**
+ * @brief Read a Memory File
+ *
+ * This routine processes the read() system call.
+ */
extern ssize_t memfile_read(
rtems_libio_t *iop, /* IN */
void *buffer, /* IN */
size_t count /* IN */
);
+/**
+ * @brief Write a Memory File
+ *
+ * This routine processes the write() system call.
+ */
extern ssize_t memfile_write(
rtems_libio_t *iop, /* IN */
const void *buffer, /* IN */
size_t count /* IN */
);
+/** @} */
+
+
+/**
+ * @name IMFS Device Node Handlers
+ *
+ * This section contains the set of handlers used to map operations on
+ * IMFS device nodes onto calls to the RTEMS Classic API IO Manager.
+ *
+ * @{
+ */
+
+
extern int device_open(
rtems_libio_t *iop, /* IN */
const char *pathname, /* IN */
@@ -467,17 +665,36 @@ extern int device_ftruncate(
off_t length /* IN */
);
+/** @} */
+
+/**
+ * @brief Set IMFS File Access and Modification Times
+ *
+ *
+ * This routine is the implementation of the utime() system
+ * call for the IMFS.
+ */
extern int IMFS_utime(
const rtems_filesystem_location_info_t *loc,
time_t actime,
time_t modtime
);
+/**
+ * @brief Change IMFS File Mode
+ */
extern int IMFS_fchmod(
const rtems_filesystem_location_info_t *loc,
mode_t mode
);
+/**
+ * @brief IMFS Create a New Symbolic Link Node
+ *
+ * The following rouine creates a new symbolic link node under parent
+ * with the name given in name. The node is set to point to the node at
+ * to_loc.
+ */
extern int IMFS_symlink(
const rtems_filesystem_location_info_t *parentloc,
const char *name,
@@ -485,12 +702,25 @@ extern int IMFS_symlink(
const char *target
);
+/**
+ * @brief IMFS Put Symbolic Link into Buffer
+ *
+ * The following rouine puts the symblic links destination name into
+ * buff.
+ *
+ */
extern ssize_t IMFS_readlink(
const rtems_filesystem_location_info_t *loc,
char *buf,
size_t bufsize
);
+/**
+ * @brief IMFS Rename
+ *
+ * The following rouine creates a new link node under parent with the
+ * name given in name and removes the old.
+ */
extern int IMFS_rename(
const rtems_filesystem_location_info_t *oldparentloc,
const rtems_filesystem_location_info_t *oldloc,
@@ -498,7 +728,12 @@ extern int IMFS_rename(
const char *name,
size_t namelen
);
-
+/**
+ * @brief IMFS Node Removal Handler
+ *
+ * This file contains the handler used to remove a node when a file type
+ * does not require special actions.
+ */
extern int IMFS_rmnod(
const rtems_filesystem_location_info_t *parentloc,
const rtems_filesystem_location_info_t *loc
diff --git a/cpukit/libfs/src/imfs/imfs_chown.c b/cpukit/libfs/src/imfs/imfs_chown.c
index 63f860c318..ccfc5a5ce0 100644
--- a/cpukit/libfs/src/imfs/imfs_chown.c
+++ b/cpukit/libfs/src/imfs/imfs_chown.c
@@ -1,9 +1,11 @@
-/*
- * IMFS_chown
- *
- * This routine is the implementation of the chown() system
- * call for the IMFS.
+/**
+ * @file
*
+ * @brief IMFS Change Owner
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_config.c b/cpukit/libfs/src/imfs/imfs_config.c
index 92e7846265..ddb02b77dc 100644
--- a/cpukit/libfs/src/imfs/imfs_config.c
+++ b/cpukit/libfs/src/imfs/imfs_config.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief IMFS Limits and Options
+ * @ingroup IMFS
+ */
+
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libfs/src/imfs/imfs_creat.c b/cpukit/libfs/src/imfs/imfs_creat.c
index 3950dba70b..830480b83e 100644
--- a/cpukit/libfs/src/imfs/imfs_creat.c
+++ b/cpukit/libfs/src/imfs/imfs_creat.c
@@ -1,8 +1,10 @@
-/*
- * IMFS_create_node()
- *
- * Routine to create a new in memory file system node.
+/**
+ * @file
*
+ * @brief Create an IMFS Node
+ * @ingroup IMFS
+ */
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
@@ -83,10 +85,6 @@ IMFS_jnode_t *IMFS_allocate_node(
return (*node->control->node_initialize)( node, info );
}
-/*
- * Create an IMFS filesystem node of an arbitrary type that is NOT
- * the root directory node.
- */
IMFS_jnode_t *IMFS_create_node_with_control(
const rtems_filesystem_location_info_t *parentloc,
const IMFS_node_control *node_control,
diff --git a/cpukit/libfs/src/imfs/imfs_debug.c b/cpukit/libfs/src/imfs/imfs_debug.c
index 1bc280cdb2..1198ec9b82 100644
--- a/cpukit/libfs/src/imfs/imfs_debug.c
+++ b/cpukit/libfs/src/imfs/imfs_debug.c
@@ -1,6 +1,11 @@
-/*
- * IMFS debug support routines
+/**
+ * @file
*
+ * @brief IMFS Debug Support
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -119,16 +124,6 @@ static void IMFS_dump_directory(
}
}
-/*
- * IMFS_dump
- *
- * This routine dumps the entire IMFS that is mounted at the root
- * directory.
- *
- * NOTE: Assuming the "/" directory is bad.
- * Not checking that the starting directory is in an IMFS is bad.
- */
-
void IMFS_dump( void )
{
fprintf(stdout, "*************** Dump of Entire IMFS ***************\n" );
@@ -137,13 +132,6 @@ void IMFS_dump( void )
fprintf(stdout, "*************** End of Dump ***************\n" );
}
-/*
- * IMFS_memfile_maximum_size()
- *
- * This routine returns the size of the largest file which can be created
- * using the IMFS memory file type.
- *
- */
int IMFS_memfile_maximum_size( void )
{
return IMFS_MEMFILE_MAXIMUM_SIZE;
diff --git a/cpukit/libfs/src/imfs/imfs_directory.c b/cpukit/libfs/src/imfs/imfs_directory.c
index 99d990d24f..c344af4cd7 100644
--- a/cpukit/libfs/src/imfs/imfs_directory.c
+++ b/cpukit/libfs/src/imfs/imfs_directory.c
@@ -1,6 +1,11 @@
-/*
- * IMFS Directory Access Routines
+/**
+ * @file
*
+ * @brief IMFS Read Next Directory
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -18,21 +23,6 @@
#include <string.h>
#include <dirent.h>
-/*
- * imfs_dir_read
- *
- * This routine will read the next directory entry based on the directory
- * offset. The offset should be equal to -n- time the size of an individual
- * dirent structure. If n is not an integer multiple of the sizeof a
- * dirent structure, an integer division will be performed to determine
- * directory entry that will be returned in the buffer. Count should reflect
- * -m- times the sizeof dirent bytes to be placed in the buffer.
- * If there are not -m- dirent elements from the current directory position
- * to the end of the exisiting file, the remaining entries will be placed in
- * the buffer and the returned value will be equal to -m actual- times the
- * size of a directory entry.
- */
-
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
diff --git a/cpukit/libfs/src/imfs/imfs_eval.c b/cpukit/libfs/src/imfs/imfs_eval.c
index 4fcfd67ee9..5abb2473b3 100644
--- a/cpukit/libfs/src/imfs/imfs_eval.c
+++ b/cpukit/libfs/src/imfs/imfs_eval.c
@@ -1,6 +1,11 @@
-/*
- * Evaluation IMFS Node Support Routines
+/**
+ * @file
*
+ * @brief Evaluation IMFS Node Support
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_fchmod.c b/cpukit/libfs/src/imfs/imfs_fchmod.c
index dfd6eaf3bc..ccb344629e 100644
--- a/cpukit/libfs/src/imfs/imfs_fchmod.c
+++ b/cpukit/libfs/src/imfs/imfs_fchmod.c
@@ -1,6 +1,11 @@
-/*
- * IMFS file change mode routine.
+/**
+ * @file
*
+ * @brief Change IMFS File Mode
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_fifo.c b/cpukit/libfs/src/imfs/imfs_fifo.c
index 8601ef7b62..03e69368eb 100644
--- a/cpukit/libfs/src/imfs/imfs_fifo.c
+++ b/cpukit/libfs/src/imfs/imfs_fifo.c
@@ -1,6 +1,11 @@
-/*
- * imfs_fifo.c: FIFO support for IMFS
+/**
+ * @file
*
+ * @brief FIFO Support
+ * @ingroup IMFS
+ */
+
+/*
* Author: Wei Shen <cquark@gmail.com>
*
* The license and distribution terms for this file may be
diff --git a/cpukit/libfs/src/imfs/imfs_fsunmount.c b/cpukit/libfs/src/imfs/imfs_fsunmount.c
index eb3d22d13e..ae6f39a385 100644
--- a/cpukit/libfs/src/imfs/imfs_fsunmount.c
+++ b/cpukit/libfs/src/imfs/imfs_fsunmount.c
@@ -1,6 +1,11 @@
-/*
- * IMFS Initialization
+/**
+ * @file
*
+ * @brief Unmount this Instance of IMFS
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -15,10 +20,6 @@
#include "imfs.h"
-/*
- * IMFS_fsunmount
- */
-
#define jnode_get_control( jnode ) \
(&jnode->info.directory.Entries)
diff --git a/cpukit/libfs/src/imfs/imfs_handlers_device.c b/cpukit/libfs/src/imfs/imfs_handlers_device.c
index a7f32f7906..899b3dcf63 100644
--- a/cpukit/libfs/src/imfs/imfs_handlers_device.c
+++ b/cpukit/libfs/src/imfs/imfs_handlers_device.c
@@ -1,6 +1,11 @@
-/*
- * Device Operations Table for the IMFS
+/**
+ * @file
*
+ * @brief Device Operations Table
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_handlers_directory.c b/cpukit/libfs/src/imfs/imfs_handlers_directory.c
index 9dcdcf2a90..61ca5527e1 100644
--- a/cpukit/libfs/src/imfs/imfs_handlers_directory.c
+++ b/cpukit/libfs/src/imfs/imfs_handlers_directory.c
@@ -1,6 +1,11 @@
-/*
- * Operations Table for Directories for the IMFS
+/**
+ * @file
*
+ * @brief Operations Table for Directories
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_handlers_link.c b/cpukit/libfs/src/imfs/imfs_handlers_link.c
index 2c4ad3f66f..5118eb5c83 100644
--- a/cpukit/libfs/src/imfs/imfs_handlers_link.c
+++ b/cpukit/libfs/src/imfs/imfs_handlers_link.c
@@ -1,6 +1,11 @@
-/*
- * Link Operations Table for the IMFS
+/**
+ * @file
*
+ * @brief Link Operations Table for the IMFS
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_handlers_memfile.c b/cpukit/libfs/src/imfs/imfs_handlers_memfile.c
index 6953319861..d0c5912eb3 100644
--- a/cpukit/libfs/src/imfs/imfs_handlers_memfile.c
+++ b/cpukit/libfs/src/imfs/imfs_handlers_memfile.c
@@ -1,6 +1,11 @@
-/*
- * Memfile Operations Tables for the IMFS
+/**
+ * @file
*
+ * @brief Memfile Operations Tables
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_initsupp.c b/cpukit/libfs/src/imfs/imfs_initsupp.c
index 3bb8a979fc..a68fff178f 100644
--- a/cpukit/libfs/src/imfs/imfs_initsupp.c
+++ b/cpukit/libfs/src/imfs/imfs_initsupp.c
@@ -1,6 +1,11 @@
-/*
- * IMFS Initialization
+/**
+ * @file
*
+ * @brief IMFS Node Support
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_link.c b/cpukit/libfs/src/imfs/imfs_link.c
index 35c38636e7..fdfbd334e4 100644
--- a/cpukit/libfs/src/imfs/imfs_link.c
+++ b/cpukit/libfs/src/imfs/imfs_link.c
@@ -1,10 +1,11 @@
-/*
- * IMFS_link
- *
- * The following rouine creates a new link node under parent with the
- * name given in name. The link node is set to point to the node at
- * to_loc.
+/**
+ * @file
*
+ * @brief IMFS Create a New Link Node
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_load_tar.c b/cpukit/libfs/src/imfs/imfs_load_tar.c
index e51194fa8c..723699bdcc 100644
--- a/cpukit/libfs/src/imfs/imfs_load_tar.c
+++ b/cpukit/libfs/src/imfs/imfs_load_tar.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS Load Tarfs
+ * @ingroup IMFS
+ */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
@@ -11,14 +18,6 @@
#include "config.h"
#endif
-/*
- * This file implements the "mount" procedure for tar-based IMFS
- * extensions. The TAR is not actually mounted under the IMFS.
- * Directories from the TAR file are created as usual in the IMFS.
- * File entries are created as IMFS_LINEAR_FILE nodes with their nods
- * pointing to addresses in the TAR image.
- */
-
#include "imfs.h"
#include <sys/stat.h>
@@ -27,52 +26,10 @@
#include <rtems/untar.h>
-/*
- * TAR file format:
- *
- * Offset Length Contents
- * 0 100 bytes File name ('\0' terminated, 99 maxmum length)
- * 100 8 bytes File mode (in octal ascii)
- * 108 8 bytes User ID (in octal ascii)
- * 116 8 bytes Group ID (in octal ascii)
- * 124 12 bytes File size (s) (in octal ascii)
- * 136 12 bytes Modify time (in octal ascii)
- * 148 8 bytes Header checksum (in octal ascii)
- * 156 1 bytes Link flag
- * 157 100 bytes Linkname ('\0' terminated, 99 maxmum length)
- * 257 8 bytes Magic PAX ("ustar\0" + 2 bytes padding)
- * 257 8 bytes Magic GNU tar ("ustar \0")
- * 265 32 bytes User name ('\0' terminated, 31 maxmum length)
- * 297 32 bytes Group name ('\0' terminated, 31 maxmum length)
- * 329 8 bytes Major device ID (in octal ascii)
- * 337 8 bytes Minor device ID (in octal ascii)
- * 345 167 bytes Padding
- * 512 (s+p)bytes File contents (s+p) := (((s) + 511) & ~511),
- * round up to 512 bytes
- *
- * Checksum:
- * int i, sum;
- * char* header = tar_header_pointer;
- * sum = 0;
- * for(i = 0; i < 512; i++)
- * sum += 0xFF & header[i];
- */
-
#define MAX_NAME_FIELD_SIZE 99
#define MIN(a,b) ((a)>(b)?(b):(a))
-/*
- * rtems_tarfs_load
- *
- * Here we create the mountpoint directory and load the tarfs at
- * that node. Once the IMFS has been mounted, we work through the
- * tar image and perform as follows:
- * - For directories, simply call mkdir(). The IMFS creates nodes as
- * needed.
- * - For files, we make our own calls to IMFS eval_for_make and
- * create_node.
- */
int rtems_tarfs_load(
const char *mountpoint,
uint8_t *tar_image,
diff --git a/cpukit/libfs/src/imfs/imfs_make_generic_node.c b/cpukit/libfs/src/imfs/imfs_make_generic_node.c
index 5b7a7d9cec..f9e03b6487 100644
--- a/cpukit/libfs/src/imfs/imfs_make_generic_node.c
+++ b/cpukit/libfs/src/imfs/imfs_make_generic_node.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief IMFS Make a Generic Node
+ * @ingroup IMFS
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libfs/src/imfs/imfs_mknod.c b/cpukit/libfs/src/imfs/imfs_mknod.c
index 2447f74a28..0344ad5684 100644
--- a/cpukit/libfs/src/imfs/imfs_mknod.c
+++ b/cpukit/libfs/src/imfs/imfs_mknod.c
@@ -1,8 +1,11 @@
-/*
- * IMFS_mknod
- *
- * Routine to create a node in the IMFS file system.
+/**
+ * @file
*
+ * @brief Create a IMFS Node
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_mount.c b/cpukit/libfs/src/imfs/imfs_mount.c
index f8e9d72f5a..49c3cae45c 100644
--- a/cpukit/libfs/src/imfs/imfs_mount.c
+++ b/cpukit/libfs/src/imfs/imfs_mount.c
@@ -1,6 +1,11 @@
-/*
- * IMFS_mount
+/**
+ * @file
*
+ * @brief Mount an IMFS
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_ntype.c b/cpukit/libfs/src/imfs/imfs_ntype.c
index e955606fe2..fd9056279d 100644
--- a/cpukit/libfs/src/imfs/imfs_ntype.c
+++ b/cpukit/libfs/src/imfs/imfs_ntype.c
@@ -1,9 +1,11 @@
-/*
- * IMFS_node_type
- *
- * The following verifies that returns the type of node that the
- * loc refers to.
+/**
+ * @file
*
+ * @brief IMFS Node Type
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_readlink.c b/cpukit/libfs/src/imfs/imfs_readlink.c
index e20003a703..7cbbe5e17d 100644
--- a/cpukit/libfs/src/imfs/imfs_readlink.c
+++ b/cpukit/libfs/src/imfs/imfs_readlink.c
@@ -1,9 +1,11 @@
-/*
- * IMFS_readlink
- *
- * The following rouine puts the symblic links destination name into
- * buff.
+/**
+ * @file
*
+ * @brief IMFS Put Symbolic Link into Buffer
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_rename.c b/cpukit/libfs/src/imfs/imfs_rename.c
index e283b9dff1..8c642638b3 100644
--- a/cpukit/libfs/src/imfs/imfs_rename.c
+++ b/cpukit/libfs/src/imfs/imfs_rename.c
@@ -1,9 +1,11 @@
-/*
- * IMFS_rename
- *
- * The following rouine creates a new link node under parent with the
- * name given in name and removes the old.
+/**
+ * @file
*
+ * @brief IMFS Rename
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_rmnod.c b/cpukit/libfs/src/imfs/imfs_rmnod.c
index 90e61d9ee9..90a551b743 100644
--- a/cpukit/libfs/src/imfs/imfs_rmnod.c
+++ b/cpukit/libfs/src/imfs/imfs_rmnod.c
@@ -1,9 +1,11 @@
-/*
- * IMFS Node Removal Handler
- *
- * This file contains the handler used to remove a node when a file type
- * does not require special actions.
+/**
+ * @file
*
+ * @brief IMFS Node Removal Handler
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_stat.c b/cpukit/libfs/src/imfs/imfs_stat.c
index 8f373c6287..87f03551ad 100644
--- a/cpukit/libfs/src/imfs/imfs_stat.c
+++ b/cpukit/libfs/src/imfs/imfs_stat.c
@@ -1,8 +1,11 @@
-/*
- * IMFS_stat
- *
- * This routine provides a stat for the IMFS file system.
+/**
+ * @file
*
+ * @brief IMFS Stat
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_symlink.c b/cpukit/libfs/src/imfs/imfs_symlink.c
index 00a7f970a5..546ad2694a 100644
--- a/cpukit/libfs/src/imfs/imfs_symlink.c
+++ b/cpukit/libfs/src/imfs/imfs_symlink.c
@@ -1,10 +1,11 @@
-/*
- * IMFS_symlink
- *
- * The following rouine creates a new symbolic link node under parent
- * with the name given in name. The node is set to point to the node at
- * to_loc.
+/**
+ * @file
*
+ * @brief IMFS Create a New Symbolic Link Node
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_unmount.c b/cpukit/libfs/src/imfs/imfs_unmount.c
index e7b42676b2..590439d0a6 100644
--- a/cpukit/libfs/src/imfs/imfs_unmount.c
+++ b/cpukit/libfs/src/imfs/imfs_unmount.c
@@ -1,6 +1,11 @@
-/*
- * IMFS_unmount
+/**
+ * @file
*
+ * @brief Unmount an IMFS
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/imfs_utime.c b/cpukit/libfs/src/imfs/imfs_utime.c
index 5eee799d7e..aa7d455c3a 100644
--- a/cpukit/libfs/src/imfs/imfs_utime.c
+++ b/cpukit/libfs/src/imfs/imfs_utime.c
@@ -1,9 +1,11 @@
-/*
- * IMFS_utime
- *
- * This routine is the implementation of the utime() system
- * call for the IMFS.
+/**
+ * @file
*
+ * @brief Set IMFS File Access and Modification Times
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libfs/src/imfs/ioman.c b/cpukit/libfs/src/imfs/ioman.c
index 8b434e7e8c..27ec89ad21 100644
--- a/cpukit/libfs/src/imfs/ioman.c
+++ b/cpukit/libfs/src/imfs/ioman.c
@@ -1,7 +1,11 @@
-/*
- * This file emulates the old Classic RTEMS IO manager directives
- * which register and lookup names using the in-memory filesystem.
+/**
+ * @file
*
+ * @brief RTMES Register IO Name
+ * @ingroup ClassicIO
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -22,12 +26,6 @@
#include <rtems/libio_.h>
-/*
- * rtems_io_register_name
- *
- * This assumes that all registered devices are character devices.
- */
-
rtems_status_code rtems_io_register_name(
const char *device_name,
rtems_device_major_number major,
diff --git a/cpukit/libfs/src/imfs/memfile.c b/cpukit/libfs/src/imfs/memfile.c
index 2eb7949275..901ebc6e2a 100644
--- a/cpukit/libfs/src/imfs/memfile.c
+++ b/cpukit/libfs/src/imfs/memfile.c
@@ -1,12 +1,11 @@
-/*
- * IMFS Device Node Handlers
- *
- * This file contains the set of handlers used to process operations on
- * IMFS memory file nodes. The memory files are created in memory using
- * malloc'ed memory. Thus any data stored in one of these files is lost
- * at system shutdown unless special arrangements to copy the data to
- * some type of non-volailte storage are made by the application.
+/**
+ * @file
*
+ * @brief IMFS Memory File Handlers
+ * @ingroup IMFS
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
@@ -71,12 +70,6 @@ void memfile_free_block(
void *memory
);
-/*
- * memfile_open
- *
- * This routine processes the open() system call. Note that there is
- * nothing special to be done at open() time.
- */
int memfile_open(
rtems_libio_t *iop,
const char *pathname,
@@ -109,11 +102,6 @@ int memfile_open(
return 0;
}
-/*
- * memfile_read
- *
- * This routine processes the read() system call.
- */
ssize_t memfile_read(
rtems_libio_t *iop,
void *buffer,
@@ -133,11 +121,6 @@ ssize_t memfile_read(
return status;
}
-/*
- * memfile_write
- *
- * This routine processes the write() system call.
- */
ssize_t memfile_write(
rtems_libio_t *iop,
const void *buffer,
@@ -166,11 +149,6 @@ ssize_t memfile_write(
* This IMFS_stat() can be used.
*/
-/*
- * memfile_ftruncate
- *
- * This routine processes the ftruncate() system call.
- */
int memfile_ftruncate(
rtems_libio_t *iop,
off_t length
diff --git a/cpukit/libfs/src/pipe/fifo.c b/cpukit/libfs/src/pipe/fifo.c
index 06eacd712f..ba5e7b7e40 100644
--- a/cpukit/libfs/src/pipe/fifo.c
+++ b/cpukit/libfs/src/pipe/fifo.c
@@ -1,6 +1,11 @@
-/*
- * fifo.c: POSIX FIFO/pipe for RTEMS
+/**
+ * @file
*
+ * @brief FIFO/Pipe Support
+ * @ingroup FIFO_PIPE
+ */
+
+/*
* Author: Wei Shen <cquark@gmail.com>
*
* The license and distribution terms for this file may be
@@ -236,12 +241,6 @@ out:
return err;
}
-/*
- * Interface to file system close.
- *
- * *pipep points to pipe control structure. When the last user releases pipe,
- * it will be set to NULL.
- */
void pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
@@ -299,13 +298,6 @@ void pipe_release(
}
-/*
- * Interface to file system open.
- *
- * *pipep points to pipe control structure. If called with *pipep = NULL,
- * fifo_open will try allocating and initializing a control structure. If the
- * call succeeds, *pipep will be set to address of new control structure.
- */
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
@@ -387,9 +379,6 @@ out_error:
return err;
}
-/*
- * Interface to file system read.
- */
ssize_t pipe_read(
pipe_control_t *pipe,
void *buffer,
@@ -459,9 +448,6 @@ out_nolock:
return ret;
}
-/*
- * Interface to file system write.
- */
ssize_t pipe_write(
pipe_control_t *pipe,
const void *buffer,
@@ -545,9 +531,6 @@ out_nolock:
return ret;
}
-/*
- * Interface to file system ioctl.
- */
int pipe_ioctl(
pipe_control_t *pipe,
ioctl_command_t cmd,
diff --git a/cpukit/libfs/src/pipe/pipe.c b/cpukit/libfs/src/pipe/pipe.c
index 2fc9952cac..ed64dbb1aa 100644
--- a/cpukit/libfs/src/pipe/pipe.c
+++ b/cpukit/libfs/src/pipe/pipe.c
@@ -1,6 +1,11 @@
-/*
- * pipe.c: anonymous pipe
+/**
+ * @file
*
+ * @brief Create an Anonymous Pipe
+ * @ingroup FIFO_PIPE
+ */
+
+/*
* Author: Wei Shen <cquark@gmail.com>
*
* The license and distribution terms for this file may be
@@ -22,9 +27,6 @@
/* FIXME: This approach is questionable */
static uint16_t rtems_pipe_no = 0;
-/*
- * Called by pipe() to create an anonymous pipe.
- */
int pipe_create(
int filsdes[2]
)
diff --git a/cpukit/libfs/src/pipe/pipe.h b/cpukit/libfs/src/pipe/pipe.h
index 29e7542b43..6ba3c5ef42 100644
--- a/cpukit/libfs/src/pipe/pipe.h
+++ b/cpukit/libfs/src/pipe/pipe.h
@@ -22,6 +22,12 @@
extern "C" {
#endif
+/**
+ * @defgroup FIFO_PIPE FIFO/pipe File System Support
+ *
+ * @brief Interface to the POSIX FIFO/pipe File System
+ */
+
/* Control block to manage each pipe */
typedef struct pipe_control {
char *Buffer;
@@ -42,14 +48,18 @@ typedef struct pipe_control {
#endif
} pipe_control_t;
-/*
+/**
+ * @brief Create an Anonymous Pipe
+ *
* Called by pipe() to create an anonymous pipe.
*/
extern int pipe_create(
int filsdes[2]
);
-/*
+/**
+ * @brief Release a Pipe
+ *
* Interface to file system close.
*
* *pipep points to pipe control structure. When the last user releases pipe,
@@ -60,7 +70,8 @@ extern void pipe_release(
rtems_libio_t *iop
);
-/*
+/**
+ * @brief FIFO Open
* Interface to file system open.
*
* *pipep points to pipe control structure. If called with *pipep = NULL,
@@ -72,7 +83,9 @@ extern int fifo_open(
rtems_libio_t *iop
);
-/*
+/**
+ * @brief Pipe Read
+ *
* Interface to file system read.
*/
extern ssize_t pipe_read(
@@ -82,7 +95,9 @@ extern ssize_t pipe_read(
rtems_libio_t *iop
);
-/*
+/**
+ * @brief Pipe Write
+ *
* Interface to file system write.
*/
extern ssize_t pipe_write(
@@ -92,7 +107,9 @@ extern ssize_t pipe_write(
rtems_libio_t *iop
);
-/*
+/**
+ * @brief Pipe IO Control
+ *
* Interface to file system ioctl.
*/
extern int pipe_ioctl(
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c b/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c
index 85837b0009..c14c69d1fe 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-bitmaps.c
@@ -1,23 +1,23 @@
-/*
- * 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.
- *
+ *
* These functions manage bit maps. A bit map consists of the map of bit
* allocated in a block and a search map where a bit represents 32 actual
* bits. The search map allows for a faster search for an available bit as 32
* 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 HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-block.c b/cpukit/libfs/src/rfs/rtems-rfs-block.c
index 7ebc4d76a6..4ad73b2ee3 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-block.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-block.c
@@ -1,21 +1,13 @@
-/*
- * 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 Routines
* @ingroup rtems-rfs
- *
- * RTEMS File Systems Block Routines.
- *
+ *
* These functions manage blocks in the RFS file system. A block is an area of
* the media and its size is set for a each specific media. The block size is
- * set when the file system is set up and needs to be matched for it to be read
- * correctly.
+ * set when the file system is set up and needs to be matched for it to be
+ * read correctly.
*
* Blocks are managed as groups. A block group or "group" is part of the total
* number of blocks being managed by the file system and exist to allow
@@ -26,12 +18,20 @@
* A group consist of a block bitmap, inodes and data blocks. The first block
* of the file system will hold the superblock. The block bitmap is a
* collection of blocks that hold a map of bits, one bit per block for each
- * block in the group. When a file system is mounted the block bitmaps are read
- * and a summary bit map is made. The summary bitmap has a single bit for 32
- * bits in the bitmap and is set when all 32 bits it maps to are set. This
+ * block in the group. When a file system is mounted the block bitmaps are
+ * read and a summary bit map is made. The summary bitmap has a single bit for
+ * 32 bits in the bitmap and is set when all 32 bits it maps to are set. This
* speeds up the search for a free block by a factor of 32.
*/
+/*
+ * 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 HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c b/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c
index 951bce1a0a..db8f21a8b0 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-dir-hash.c
@@ -1,9 +1,8 @@
/**
* @file
*
+ * @brief RTEMS File Systems Directory Hash function
* @ingroup rtems-rfs
- *
- * RTEMS File Systems Directory Hash function.
*/
#if HAVE_CONFIG_H
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-inode.c b/cpukit/libfs/src/rfs/rtems-rfs-inode.c
index 6c49b2ac7a..51129e9378 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-inode.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-inode.c
@@ -1,20 +1,19 @@
-/*
- * 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 Inode Routines
* @ingroup rtems-rfs
- *
- * RTEMS File Systems Inode Routines.
- *
+ *
* These functions manage inodes in the RFS file system. An inode is part of a
* block that reside after the bitmaps in the group.
*/
+/*
+ * 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 HAVE_CONFIG_H
#include "config.h"
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-link.c b/cpukit/libfs/src/rfs/rtems-rfs-link.c
index 7211e3ad59..225a37fac9 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-link.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-link.c
@@ -1,3 +1,13 @@
+/**
+ * @file
+ *
+ * @brief RTEMS File Systems Link Routines
+ * @ingroup rtems-rfs
+ *
+ * These functions manage links. A link is the addition of a directory entry
+ * in a parent directory and incrementing the links count in the inode.
+ */
+
/*
* COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
*
@@ -5,16 +15,6 @@
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*/
-/**
- * @file
- *
- * @ingroup rtems-rfs
- *
- * RTEMS File Systems Link Routines.
- *
- * These functions manage links. A link is the addition of a directory entry in
- * a parent directory and incrementing the links count in the inode.
- */
#if HAVE_CONFIG_H
#include "config.h"
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-mutex.c b/cpukit/libfs/src/rfs/rtems-rfs-mutex.c
index 4fd6f384fe..7bf92f7cd5 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-mutex.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-mutex.c
@@ -1,3 +1,9 @@
+/**
+ * @file
+ *
+ * @brief RTEMS File System Mutex
+ * @ingroup rtems-rfs
+ */
/*
* COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
*
@@ -5,13 +11,6 @@
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*/
-/**
- * @file
- *
- * @ingroup rtems-rfs
- *
- * RTEMS File System Mutex.
- */
#if HAVE_CONFIG_H
#include "config.h"
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c
index ced234a796..97d0104cdd 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems-dev.c
@@ -1,20 +1,19 @@
-/*
- * 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 RFS Device Interface
* @ingroup rtems-rfs
- *
- * RTEMS RFS Device Interface.
- *
+ *
* This file contains the set of handlers used to map operations on RFS device
* nodes onto calls to the RTEMS Classic API IO Manager.
+ */
+
+/*
+ * 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 HAVE_CONFIG_H
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
index 6ff9793911..d2aac56429 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS File System Interface for RTEMS
+ * @ingroup rtems-rfs
+ */
+
/*
* COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
*
@@ -8,13 +15,6 @@
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*/
-/**
- * @file
- *
- * @ingroup rtems-rfs
- *
- * RTEMS File System Interface for RTEMS.
- */
#if HAVE_CONFIG_H
#include "config.h"
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.h b/cpukit/libfs/src/rfs/rtems-rfs-rtems.h
index c475c4025b..00fcb27143 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.h
+++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.h
@@ -46,7 +46,7 @@
*
* @param what The message to print is the error is not zero.
* @param error The error code.
- * @retval -1 An error has occured.
+ * @retval -1 An error has occurred.
* @retval 0 No error.
*/
int rtems_rfs_rtems_error (const char* mesg, int error);
diff --git a/cpukit/libmisc/shell/main_ifconfig.c b/cpukit/libmisc/shell/main_ifconfig.c
index dbf16183ff..d81d8b005a 100644
--- a/cpukit/libmisc/shell/main_ifconfig.c
+++ b/cpukit/libmisc/shell/main_ifconfig.c
@@ -218,10 +218,6 @@ static int rtems_shell_main_ifconfig(
flags |= IFF_UP;
}
- if (f_down != 0) {
- printf("Warning: taking interfaces down is not supported\n");
- }
-
rc = rtems_bsdnet_ifconfig(iface, SIOCSIFFLAGS, &flags);
if (rc < 0) {
printf("Could not set interface flags: %s\n", strerror(errno));
diff --git a/cpukit/libmisc/stringto/stringto.h b/cpukit/libmisc/stringto/stringto.h
index c8ed6b49ef..d4611518c7 100644
--- a/cpukit/libmisc/stringto/stringto.h
+++ b/cpukit/libmisc/stringto/stringto.h
@@ -15,6 +15,12 @@
#ifndef _RTEMS_STRINGTO_H
#define _RTEMS_STRINGTO_H
+/**
+ * @defgroup libmisc_conv_help Conversion Helpers
+ *
+ * @ingroup libmisc
+ */
+/**@{*/
#include <rtems.h>
@@ -248,3 +254,4 @@ rtems_status_code rtems_string_to_long_double(
);
#endif
+/**@}*/ \ No newline at end of file
diff --git a/cpukit/libmisc/stringto/stringtodouble.c b/cpukit/libmisc/stringto/stringtodouble.c
index 4ef94ab435..09605ce528 100644
--- a/cpukit/libmisc/stringto/stringtodouble.c
+++ b/cpukit/libmisc/stringto/stringtodouble.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Convert String to Double (with validation)
+ * @ingroup libmisc_conv_help Conversion Helpers
+ */
+
/*
* COPYRIGHT (c) 2009.
* On-Line Applications Research Corporation (OAR).
@@ -46,7 +53,7 @@ rtems_status_code rtems_string_to_double (
if ( end == s )
return RTEMS_NOT_DEFINED;
- if ( ( errno == ERANGE ) &&
+ if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
diff --git a/cpukit/libmisc/stringto/stringtoint.c b/cpukit/libmisc/stringto/stringtoint.c
index ee2e31f2f8..df3de2b39f 100644
--- a/cpukit/libmisc/stringto/stringtoint.c
+++ b/cpukit/libmisc/stringto/stringtoint.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Convert String to Int (with validation)
+ * @ingroup libmisc_conv_help Conversion Helpers
+ */
+
/*
* COPYRIGHT (c) 2009.
* On-Line Applications Research Corporation (OAR).
@@ -47,7 +54,7 @@ rtems_status_code rtems_string_to_int (
if ( end == s )
return RTEMS_NOT_DEFINED;
- if ( ( errno == ERANGE ) &&
+ if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
diff --git a/cpukit/libmisc/stringto/stringtolong.c b/cpukit/libmisc/stringto/stringtolong.c
index 15e7e4d747..ab830c5a83 100644
--- a/cpukit/libmisc/stringto/stringtolong.c
+++ b/cpukit/libmisc/stringto/stringtolong.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Convert String to Long (with validation)
+ * @ingroup libmisc_conv_help Conversion Helpers
+ */
+
/*
* COPYRIGHT (c) 2009.
* On-Line Applications Research Corporation (OAR).
@@ -47,7 +54,7 @@ rtems_status_code rtems_string_to_long (
if ( end == s )
return RTEMS_NOT_DEFINED;
- if ( ( errno == ERANGE ) &&
+ if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
diff --git a/cpukit/libmisc/stringto/stringtolonglong.c b/cpukit/libmisc/stringto/stringtolonglong.c
index 8f70f0e172..64df7cfeb1 100644
--- a/cpukit/libmisc/stringto/stringtolonglong.c
+++ b/cpukit/libmisc/stringto/stringtolonglong.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Convert String to Long Long (with validation)
+ * @ingroup libmisc_conv_help Conversion Helpers
+ */
+
/*
* COPYRIGHT (c) 2009.
* On-Line Applications Research Corporation (OAR).
@@ -56,7 +63,7 @@ rtems_status_code rtems_string_to_long_long (
if ( end == s )
return RTEMS_NOT_DEFINED;
- if ( ( errno == ERANGE ) &&
+ if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
diff --git a/cpukit/libmisc/stringto/stringtopointer.c b/cpukit/libmisc/stringto/stringtopointer.c
index 13e68475b9..6cf5bff08a 100644
--- a/cpukit/libmisc/stringto/stringtopointer.c
+++ b/cpukit/libmisc/stringto/stringtopointer.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Convert String to Pointer (with validation)
+ * @ingroup libmisc_conv_help Conversion Helpers
+ */
+
/*
* COPYRIGHT (c) 2009.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libmisc/stringto/stringtounsignedint.c b/cpukit/libmisc/stringto/stringtounsignedint.c
index b7a24be54d..53aaf10bf8 100644
--- a/cpukit/libmisc/stringto/stringtounsignedint.c
+++ b/cpukit/libmisc/stringto/stringtounsignedint.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Convert String to Unsigned Int (with validation)
+ * @ingroup libmisc_conv_help Conversion Helpers
+ */
+
/*
* COPYRIGHT (c) 2009.
* On-Line Applications Research Corporation (OAR).
@@ -47,7 +54,7 @@ rtems_status_code rtems_string_to_unsigned_int (
if ( end == s )
return RTEMS_NOT_DEFINED;
- if ( ( errno == ERANGE ) &&
+ if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
diff --git a/cpukit/libmisc/stringto/stringtounsignedlong.c b/cpukit/libmisc/stringto/stringtounsignedlong.c
index 305f23f327..4e5ae94089 100644
--- a/cpukit/libmisc/stringto/stringtounsignedlong.c
+++ b/cpukit/libmisc/stringto/stringtounsignedlong.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Convert String to Unsigned Long Long (with validation)
+ * @ingroup libmisc_conv_help Conversion Helpers
+ */
+
/*
* COPYRIGHT (c) 2009.
* On-Line Applications Research Corporation (OAR).
@@ -47,7 +54,7 @@ rtems_status_code rtems_string_to_unsigned_long (
if ( end == s )
return RTEMS_NOT_DEFINED;
- if ( ( errno == ERANGE ) &&
+ if ( ( errno == ERANGE ) &&
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
diff --git a/cpukit/libmisc/untar/untar.c b/cpukit/libmisc/untar/untar.c
index 337782b5c1..5cebc2d9ed 100644
--- a/cpukit/libmisc/untar/untar.c
+++ b/cpukit/libmisc/untar/untar.c
@@ -1,8 +1,17 @@
-/* FIXME:
+/**
+ * @file
+ *
+ * @brief Untar an Image
+ * @ingroup libmisc_untar_img Untar Image
+ *
+ * FIXME:
* 1. Symbolic links are not created.
* 2. Untar_FromMemory uses FILE *fp.
* 3. How to determine end of archive?
*
+ */
+
+/*
* Written by: Jake Janovetz <janovetz@tempest.ece.uiuc.edu>
*
* The license and distribution terms for this file may be
@@ -274,7 +283,7 @@ Untar_FromFile(
if (bufr == NULL) {
return(UNTAR_FAIL);
}
-
+
while (1)
{
/* Read the header */
diff --git a/cpukit/libmisc/untar/untar.h b/cpukit/libmisc/untar/untar.h
index dca8216644..81cbd0e8ba 100644
--- a/cpukit/libmisc/untar/untar.h
+++ b/cpukit/libmisc/untar/untar.h
@@ -18,6 +18,12 @@
#include <stddef.h>
#include <tar.h>
+/**
+ * @defgroup libmisc_untar_img Untar Image
+ *
+ * @ingroup libmisc
+ */
+/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
@@ -49,5 +55,5 @@ _rtems_tar_header_checksum(const char *bufr);
#ifdef __cplusplus
}
#endif
-
+/**@}*/
#endif /* _RTEMS_UNTAR_H */
diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
index b477d7d654..05e54b272f 100644
--- a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
+++ b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
@@ -136,6 +136,8 @@ void rtems_bsdnet_free (void *addr, int type);
void rtems_bsdnet_semaphore_obtain (void);
void rtems_bsdnet_semaphore_release (void);
+void rtems_bsdnet_semaphore_obtain_recursive (uint32_t nest_count);
+uint32_t rtems_bsdnet_semaphore_release_recursive (void);
void rtems_bsdnet_schednetisr (int n);
int rtems_bsdnet_parse_driver_name (const struct rtems_bsdnet_ifconfig *config, char **namep);
diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c
index 8380e4d410..95cabe4d27 100644
--- a/cpukit/libnetworking/rtems/rtems_glue.c
+++ b/cpukit/libnetworking/rtems/rtems_glue.c
@@ -111,7 +111,7 @@ rtems_bsdnet_initialize_sockaddr_in(struct sockaddr_in *addr)
memcpy(addr, &address_template, sizeof(*addr));
}
-static uint32_t
+uint32_t
rtems_bsdnet_semaphore_release_recursive(void)
{
#ifdef RTEMS_FAST_MUTEX
@@ -128,7 +128,7 @@ rtems_bsdnet_semaphore_release_recursive(void)
#endif
}
-static void
+void
rtems_bsdnet_semaphore_obtain_recursive(uint32_t nest_count)
{
uint32_t i;
diff --git a/cpukit/posix/include/aio.h b/cpukit/posix/include/aio.h
index de0bdd5603..f4f824ab69 100644
--- a/cpukit/posix/include/aio.h
+++ b/cpukit/posix/include/aio.h
@@ -23,6 +23,14 @@
extern "C" {
#endif
+/**
+ * @defgroup POSIX_AIO POSIX Asynchronous I/O Support
+ *
+ * @ingroup POSIX
+ *
+ * @brief POSIX Asynchronous Input and Output
+ */
+
#if defined(_POSIX_ASYNCHRONOUS_IO)
/*
@@ -126,10 +134,18 @@ ssize_t aio_return(
const struct aiocb *aiocbp
);
-/*
+/**
+ * @brief Cancel Asynchronous I/O Operation
+ *
* 6.7.7 Cancel Asynchronous I/O Operation, P1003.1b-1993, p. 163
+ *
+ * @param[in] filedes is the file descriptor
+ * @param[in] aiocbp is the asynchronous I/O control block
+ *
+ * @return This method returns AIO_CANCELED if the requested operation(s)
+ * were canceled. Otherwise, AIO_NOTCANCELED is returned indicating
+ * that at least one of the requested operation(s) cannot be canceled
*/
-
int aio_cancel(
int filedes,
struct aiocb *aiocbp
diff --git a/cpukit/posix/include/mqueue.h b/cpukit/posix/include/mqueue.h
index 56a97a0c7a..a35d94ccc4 100644
--- a/cpukit/posix/include/mqueue.h
+++ b/cpukit/posix/include/mqueue.h
@@ -2,6 +2,18 @@
* @file mqueue.h
*
* This file contains the definitions related to POSIX Message Queues.
+ *
+ * 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.
*/
/*
@@ -115,6 +127,13 @@ int mq_send(
#include <time.h>
+/**
+ * @brief Send a Message to a Message Queue
+ *
+ * 15.2.4 Send a Message to a Message Queue, P1003.1b-1993, p. 277
+ *
+ * @note P1003.4b/D8, p. 45 adds mq_timedsend().
+ */
int mq_timedsend(
mqd_t mqdes,
const char *msg_ptr,
@@ -125,12 +144,13 @@ int mq_timedsend(
#endif /* _POSIX_TIMEOUTS */
-/*
+/**
+ * @brief Receive a Message From a Message Queue
+ *
* 15.2.5 Receive a Message From a Message Queue, P1003.1b-1993, p. 279
*
- * NOTE: P1003.4b/D8, p. 45 adds mq_timedreceive().
+ * @note P1003.4b/D8, p. 45 adds mq_timedreceive().
*/
-
ssize_t mq_receive(
mqd_t mqdes,
char *msg_ptr,
@@ -152,11 +172,12 @@ ssize_t mq_timedreceive(
#if defined(_POSIX_REALTIME_SIGNALS)
-/*
- * 15.2.6 Notify Process that a Message is Available on a Queue,
- * P1003.1b-1993, p. 280
+/**
+ * @brief Notify Process that a Message is Available on a Queue
+ *
+ * 15.2.6 Notify Process that a Message is Available on a Queue,
+ * P1003.1b-1993, p. 280
*/
-
int mq_notify(
mqd_t mqdes,
const struct sigevent *notification
@@ -164,10 +185,11 @@ int mq_notify(
#endif /* _POSIX_REALTIME_SIGNALS */
-/*
- * 15.2.7 Set Message Queue Attributes, P1003.1b-1993, p. 281
+/**
+ * @brief Set Message Queue Attributes
+ *
+ * 15.2.7 Set Message Queue Attributes, P1003.1b-1993, p. 281
*/
-
int mq_setattr(
mqd_t mqdes,
const struct mq_attr *mqstat,
diff --git a/cpukit/posix/include/rtems/posix/cond.h b/cpukit/posix/include/rtems/posix/cond.h
index b089abe4a9..93b5b4cf2a 100644
--- a/cpukit/posix/include/rtems/posix/cond.h
+++ b/cpukit/posix/include/rtems/posix/cond.h
@@ -148,15 +148,14 @@ int _POSIX_Condition_variables_Signal_support(
bool is_broadcast
);
-/*
- * _POSIX_Condition_variables_Wait_support
+/**
+ * @brief POSIX Condition Variables Wait Support
*
- * DESCRIPTION:
+ * DESCRIPTION:
*
- * A support routine which implements guts of the blocking, non-blocking, and
- * timed wait version of condition variable wait routines.
+ * A support routine which implements guts of the blocking, non-blocking, and
+ * timed wait version of condition variable wait routines.
*/
-
int _POSIX_Condition_variables_Wait_support(
pthread_cond_t *cond,
pthread_mutex_t *mutex,
diff --git a/cpukit/posix/include/rtems/posix/key.h b/cpukit/posix/include/rtems/posix/key.h
index ce4f093b13..edcaa42685 100644
--- a/cpukit/posix/include/rtems/posix/key.h
+++ b/cpukit/posix/include/rtems/posix/key.h
@@ -58,7 +58,7 @@ POSIX_EXTERN Objects_Information _POSIX_Keys_Information;
void _POSIX_Key_Manager_initialization(void);
/**
- * @brief _POSIX_Keys_Run_destructors
+ * @brief Thread-Specific Data Key Create
*
* This function executes all the destructors associated with the thread's
* keys. This function will execute until all values have been set to NULL.
diff --git a/cpukit/posix/include/rtems/posix/mqueue.h b/cpukit/posix/include/rtems/posix/mqueue.h
index ea94669e71..582d5b73b2 100644
--- a/cpukit/posix/include/rtems/posix/mqueue.h
+++ b/cpukit/posix/include/rtems/posix/mqueue.h
@@ -3,6 +3,18 @@
*
* This include file contains all the private support information for
* POSIX Message Queues.
+ *
+ * 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.
*/
/*
@@ -23,10 +35,20 @@
#include <rtems/score/object.h>
#include <rtems/posix/posixapi.h>
+/**
+ * @defgroup POSIX_MQUEUE_P Message Queues Private Support Information
+ *
+ * @ingroup POSIX
+ */
+/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ * @ingroup POSIX_MQUEUE
+ */
+
/*
* Data Structure used to manage a POSIX message queue
*/
@@ -57,11 +79,24 @@ POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information;
POSIX_EXTERN Objects_Information _POSIX_Message_queue_Information_fds;
/*
- * _POSIX_Message_queue_Manager_initialization
+ * @brief Initializes message_queue Manager Related Data Structures
*
* DESCRIPTION:
*
* This routine performs the initialization necessary for this manager.
+ *
+ * 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.
+ *
*/
void _POSIX_Message_queue_Manager_initialization(void);
@@ -84,25 +119,36 @@ int _POSIX_Message_queue_Create_support(
POSIX_Message_queue_Control **message_queue
);
-/*
- * _POSIX_Message_queue_Delete
+/**
+ * @brief POSIX Delete Message Queue
*
* DESCRIPTION:
*
* This routine supports the mq_unlink and mq_close routines by
* doing most of the work involved with removing a message queue.
*/
-
void _POSIX_Message_queue_Delete(
POSIX_Message_queue_Control *the_mq
);
/*
- * _POSIX_Message_queue_Receive_support
+ * @brief POSIX Message Queue Receive Support
*
* DESCRIPTION:
*
* This routine supports the various flavors of receiving a message.
+ *
+ * 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.
*/
ssize_t _POSIX_Message_queue_Receive_support(
@@ -228,6 +274,6 @@ int _POSIX_Message_queue_Translate_core_message_queue_return_code(
#ifdef __cplusplus
}
#endif
-
+/**@}*/
#endif
/* end of include file */
diff --git a/cpukit/posix/include/rtems/posix/mutex.h b/cpukit/posix/include/rtems/posix/mutex.h
index dc133d5421..727745ae67 100644
--- a/cpukit/posix/include/rtems/posix/mutex.h
+++ b/cpukit/posix/include/rtems/posix/mutex.h
@@ -21,6 +21,14 @@
extern "C" {
#endif
+/**
+ * @defgroup POSIX_MUTEX POSIX Mutex Support
+ *
+ * @ingroup POSIX
+ *
+ * @brief Private Support Information for POSIX Mutex
+ */
+
#include <rtems/score/coremutex.h>
#include <pthread.h>
@@ -48,7 +56,7 @@ POSIX_EXTERN Objects_Information _POSIX_Mutex_Information;
POSIX_EXTERN pthread_mutexattr_t _POSIX_Mutex_Default_attributes;
/*
- * _POSIX_Mutex_Manager_initialization
+ * @brief POSIX Mutex Manager Initialization
*
* DESCRIPTION:
*
@@ -129,13 +137,17 @@ int _POSIX_Mutex_Lock_support(
Watchdog_Interval timeout
);
-/*
- * _POSIX_Mutex_Translate_core_mutex_return_code
+/**
+ * @brief POSIX Mutex Translate Core Mutex Return Code
*
* DESCRIPTION:
*
* A support routine which converts core mutex status codes into the
* appropriate POSIX status values.
+ *
+ * @param[in] the_mutex_status is the mutex status code to translate
+ *
+ * @return the translated POSIX status code
*/
int _POSIX_Mutex_Translate_core_mutex_return_code(
diff --git a/cpukit/posix/include/rtems/posix/priority.h b/cpukit/posix/include/rtems/posix/priority.h
index 62ec9fbe2d..a6a3c289da 100644
--- a/cpukit/posix/include/rtems/posix/priority.h
+++ b/cpukit/posix/include/rtems/posix/priority.h
@@ -17,6 +17,14 @@
#ifndef _RTEMS_POSIX_PRIORITY_H
#define _RTEMS_POSIX_PRIORITY_H
+/**
+ * @defgroup POSIX_PRIORITY POSIX Priority Support
+ *
+ * @ingroup POSIX
+ *
+ * @brief Interface to the POSIX Priority Implementation
+ */
+
#include <rtems/score/priority.h>
/**
@@ -44,6 +52,8 @@
#define POSIX_SCHEDULER_MINIMUM_PRIORITY (1)
/**
+ * @brief POSIX Is Priority Valid
+ *
* 1003.1b-1993,2.2.2.80 definition of priority, p. 19
*
* "Numerically higher values represent higher priorities."
diff --git a/cpukit/posix/include/rtems/posix/psignalimpl.h b/cpukit/posix/include/rtems/posix/psignalimpl.h
index 6c46f3c49c..c416a7aa1b 100644
--- a/cpukit/posix/include/rtems/posix/psignalimpl.h
+++ b/cpukit/posix/include/rtems/posix/psignalimpl.h
@@ -16,6 +16,14 @@
#ifndef _RTEMS_POSIX_PSIGNALIMPL_H
#define _RTEMS_POSIX_PSIGNALIMPL_H
+/**
+ * @defgroup POSIX_SIGNALS POSIX Signals Support
+ *
+ * @ingroup POSIX
+ *
+ * @brief Internal Information about POSIX Signals
+ */
+
#include <rtems/posix/psignal.h>
#include <rtems/posix/pthread.h>
#include <rtems/posix/sigset.h>
@@ -63,6 +71,9 @@ extern API_extensions_Post_switch_control _POSIX_signals_Post_switch;
* Internal routines
*/
+/**
+ * @brief POSIX Signals Manager Initialization
+ */
void _POSIX_signals_Manager_Initialization(void);
static inline void _POSIX_signals_Add_post_switch_extension(void)
@@ -70,18 +81,29 @@ static inline void _POSIX_signals_Add_post_switch_extension(void)
_API_extensions_Add_post_switch( &_POSIX_signals_Post_switch );
}
+/**
+ * @brief POSIX Signals Thread Unlock
+ *
+ * XXX this routine could probably be cleaned up
+ */
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
);
+/**
+ * @brief POSIX Signals Check Signal
+ */
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
);
+/**
+ * @brief POSIX Signals Clear Signals
+ */
bool _POSIX_signals_Clear_signals(
POSIX_API_Control *api,
int signo,
@@ -96,6 +118,9 @@ int killinfo(
const union sigval *value
);
+/**
+ * @brief POSIX Signals Set Process Signals
+ */
void _POSIX_signals_Set_process_signals(
sigset_t mask
);
diff --git a/cpukit/posix/include/rtems/posix/pthread.h b/cpukit/posix/include/rtems/posix/pthread.h
index 52ad486337..5932d45a39 100644
--- a/cpukit/posix/include/rtems/posix/pthread.h
+++ b/cpukit/posix/include/rtems/posix/pthread.h
@@ -21,9 +21,24 @@
#include <rtems/posix/config.h>
#include <rtems/posix/threadsup.h>
+/**
+ * @defgroup POSIX_PTHREADS Private Threads
+ *
+ * @ingroup POSIX
+ */
+/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
+
+/**
+ * @defgroup POSIX_PTHREAD POSIX Threads Support
+ *
+ * @ingroup POSIX
+ *
+ * @brief Private Support Information for POSIX Threads
+ */
+
/**
* The following sets the minimum stack size for POSIX threads.
*/
@@ -164,10 +179,10 @@ int _POSIX_Thread_Translate_sched_param(
);
/**
- * @brief _POSIX_Threads_Initialize_user_threads_body
+ * @brief POSIX Threads Initialize User Threads Body
*
- * This routine creates and starts all configured user
- * initialization threads.
+ * This routine creates and starts all configured user
+ * initialization threads.
*/
extern void _POSIX_Threads_Initialize_user_threads_body(void);
@@ -176,6 +191,6 @@ extern void _POSIX_Threads_Initialize_user_threads_body(void);
#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 a7c083711a..1b791cc915 100644
--- a/cpukit/posix/include/rtems/posix/ptimer.h
+++ b/cpukit/posix/include/rtems/posix/ptimer.h
@@ -88,13 +88,15 @@ int timer_gettime(
struct itimerspec *value
);
-/*
+/**
+ * @brief Get Overrun Count for a POSIX Per-Process Timer
+ *
+ * The expiration of a timer must increase by one a counter.
+ * After the signal handler associated to the timer finishes
+ * its execution, _POSIX_Timer_TSR will have to set this counter to 0.
+ *
* 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
- *
- * timer_getoverrun
- *
*/
-
int timer_getoverrun(
timer_t timerid
);
diff --git a/cpukit/posix/include/rtems/posix/rwlock.h b/cpukit/posix/include/rtems/posix/rwlock.h
index c4f2d7e146..411384c2c6 100644
--- a/cpukit/posix/include/rtems/posix/rwlock.h
+++ b/cpukit/posix/include/rtems/posix/rwlock.h
@@ -27,6 +27,14 @@
extern "C" {
#endif
+/**
+ * @defgroup POSIX_RWLOCK POSIX RWLock Manager
+ *
+ * @ingroup POSIX
+ *
+ * @brief Constants and Structures Associated with the POSIX RWLock Manager
+ */
+
#include <rtems/score/object.h>
#include <rtems/score/corerwlock.h>
@@ -60,7 +68,7 @@ POSIX_EXTERN Objects_Information _POSIX_RWLock_Information;
void _POSIX_RWLock_Manager_initialization(void);
/**
- * @brief _POSIX_RWLock_Translate_core_RWLock_return_code (
+ * @brief POSIX RWLock Translate Core RWLock Return Code
*
* This routine translates SuperCore RWLock status codes into the
* corresponding POSIX ones.
diff --git a/cpukit/posix/include/rtems/posix/semaphore.h b/cpukit/posix/include/rtems/posix/semaphore.h
index 08df44be4f..08ace7684f 100644
--- a/cpukit/posix/include/rtems/posix/semaphore.h
+++ b/cpukit/posix/include/rtems/posix/semaphore.h
@@ -17,10 +17,20 @@
#ifndef _RTEMS_POSIX_SEMAPHORE_H
#define _RTEMS_POSIX_SEMAPHORE_H
+/**
+ * @defgroup POSIX_SEMAPHORES Semaphore
+ *
+ * @ingroup POSIX
+ */
+/**@{*/
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ * @ingroup POSIX_SEMAPHORE
+ */
+
#include <semaphore.h>
#include <rtems/score/coresem.h>
#include <rtems/posix/posixapi.h>
@@ -134,20 +144,19 @@ int _POSIX_Semaphore_Create_support(
POSIX_Semaphore_Control **the_sem
);
-/*
- * _POSIX_Semaphore_Delete
+/**
+ * @brief POSIX Delete Semaphore
*
* DESCRIPTION:
*
* This routine supports the sem_close and sem_unlink routines.
*/
-
void _POSIX_Semaphore_Delete(
POSIX_Semaphore_Control *the_semaphore
);
/*
- * _POSIX_Semaphore_Wait_support
+ * @brief POSIX Semaphore Wait Support
*
* DESCRIPTION:
*
diff --git a/cpukit/posix/include/rtems/posix/spinlock.h b/cpukit/posix/include/rtems/posix/spinlock.h
index 892040e8b8..44061bd42c 100644
--- a/cpukit/posix/include/rtems/posix/spinlock.h
+++ b/cpukit/posix/include/rtems/posix/spinlock.h
@@ -27,6 +27,14 @@
extern "C" {
#endif
+/**
+ * @defgroup POSIX_SPINLOCK POSIX Spinlock Support
+ *
+ * @ingroup POSIX
+ *
+ * @brief Constants and Structures Associated with the POSIX Spinlock Manager
+ */
+
#include <rtems/score/object.h>
#include <rtems/score/corespinlock.h>
@@ -60,7 +68,7 @@ POSIX_EXTERN Objects_Information _POSIX_Spinlock_Information;
void _POSIX_Spinlock_Manager_initialization(void);
/**
- * @brief _POSIX_Spinlock_Translate_core_spinlock_return_code (
+ * @brief POSIX Spinlock Translate Core Spinlock Return Code
*
* This routine translates SuperCore Spinlock status codes into the
* corresponding POSIX ones.
diff --git a/cpukit/posix/include/semaphore.h b/cpukit/posix/include/semaphore.h
index 91722006ce..37e3fd54b4 100644
--- a/cpukit/posix/include/semaphore.h
+++ b/cpukit/posix/include/semaphore.h
@@ -21,6 +21,14 @@
extern "C" {
#endif
+/**
+ * @defgroup POSIX_SEMAPHORE POSIX Semaphores Support
+ *
+ * @ingroup POSIX
+ *
+ * @brief Private Support Information for POSIX Semaphores
+ */
+
#include <unistd.h>
#if defined(_POSIX_SEMAPHORES)
@@ -46,7 +54,9 @@ int sem_init(
unsigned int value
);
-/*
+/**
+ * @brief Destroy an Unnamed Semaphore
+ *
* 11.2.2 Destroy an Unnamed Semaphore, P1003.1b-1993, p.220
*/
int sem_destroy(
@@ -64,52 +74,73 @@ sem_t *sem_open(
...
);
-/*
- * 11.2.4 Close a Named Semaphore, P1003.1b-1993, p.224
+/**
+ * @brief Close a Named Semaphore
+ *
+ * Routine to close a semaphore that has been opened or initialized.
+ *
+ * 11.2.4 Close a Named Semaphore, P1003.1b-1993, p.224
*/
int sem_close(
sem_t *sem
);
-/*
- * 11.2.5 Remove a Named Semaphore, P1003.1b-1993, p.225
+/**
+ * @brief Remove a Named Semaphore
+ *
+ * Unlinks a named semaphore, sem_close must also be called to remove
+ * the semaphore.
+ *
+ * 11.2.5 Remove a Named Semaphore, P1003.1b-1993, p.225
*/
int sem_unlink(
const char *name
);
-/*
+/**
+ * @brief Lock a Semaphore
+ *
* 11.2.6 Lock a Semaphore, P1003.1b-1993, p.226
*
- * NOTE: P1003.4b/D8 adds sem_timedwait(), p. 27
+ * @note P1003.4b/D8 adds sem_timedwait(), p. 27
*/
int sem_wait(
sem_t *sem
);
+/**
+ * @brief Lock a Semaphore
+ *
+ * @see sem_wait()
+ */
int sem_trywait(
sem_t *sem
);
#if defined(_POSIX_TIMEOUTS)
+/**
+ * @brief Lock a Semaphore
+ */
int sem_timedwait(
sem_t *sem,
const struct timespec *timeout
);
#endif
-/*
+/**
+ * @brief Unlock a Semaphore
+ *
* 11.2.7 Unlock a Semaphore, P1003.1b-1993, p.227
*/
-
int sem_post(
sem_t *sem
);
-/*
- * 11.2.8 Get the Value of a Semaphore, P1003.1b-1993, p.229
+/**
+ * @brief Get the Value of a Semaphore
+ *
+ * 11.2.8 Get the Value of a Semaphore, P1003.1b-1993, p.229
*/
-
int sem_getvalue(
sem_t *sem,
int *sval
diff --git a/cpukit/posix/src/_execve.c b/cpukit/posix/src/_execve.c
index 7e6cf23a8a..b606fd63df 100644
--- a/cpukit/posix/src/_execve.c
+++ b/cpukit/posix/src/_execve.c
@@ -1,6 +1,11 @@
-/*
- * execve() - POSIX 1003.1b 3.1.2
+/**
+ * @file
*
+ * @brief execve()
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/adjtime.c b/cpukit/posix/src/adjtime.c
index db88c923e1..23f7d3a9ed 100644
--- a/cpukit/posix/src/adjtime.c
+++ b/cpukit/posix/src/adjtime.c
@@ -1,9 +1,8 @@
-/*
- * adjime() function
+/**
+ * @file
*
- * This method was initially added as part of porting NTP to RTEMS.
- * It is a BSD compatability function and now is available on
- * GNU/Linux.
+ * @brief Correct the Time to Synchronize the System Clock
+ * @ingroup POSIX
*/
/*
@@ -31,12 +30,15 @@
#include <rtems/score/thread.h>
#include <rtems/score/timespec.h>
-/*
+/**
+ * This method was initially added as part of porting NTP to RTEMS.
+ * It is a BSD compatability function and now is available on
+ * GNU/Linux.
+ *
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
-
int adjtime(
const struct timeval *delta,
struct timeval *olddelta
diff --git a/cpukit/posix/src/aio_cancel.c b/cpukit/posix/src/aio_cancel.c
index be771e7c33..561e2f8776 100644
--- a/cpukit/posix/src/aio_cancel.c
+++ b/cpukit/posix/src/aio_cancel.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Cancel Asynchronous I/O Operation
+ * @ingroup POSIX_AIO
+ */
+
/*
* Copyright 2010, Alin Rus <alin.codejunkie@gmail.com>
*
@@ -17,23 +24,6 @@
#include <rtems/system.h>
#include <rtems/seterr.h>
-/*
- * aio_cancel
- *
- * Cancel an asynchronous I/O request
- *
- * Input parameters:
- * fildes - file descriptor
- * aiocbp - asynchronous I/O control block
- *
- * Output parameters:
- * AIO_CANCELED - if the requested operation(s)
- * were canceled
- * AIO_NOTCANCELED - if at least one of the requested
- * operation(s) cannot be canceled
- */
-
-
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
rtems_aio_request_chain *r_chain;
diff --git a/cpukit/posix/src/aio_error.c b/cpukit/posix/src/aio_error.c
index 1765f21622..e29c8361b1 100644
--- a/cpukit/posix/src/aio_error.c
+++ b/cpukit/posix/src/aio_error.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Returns the error status for the Asynchronous I/O request
+ * @ingroup POSIX
+ */
+
/*
* Copyright 2010, Alin Rus <alin.codejunkie@gmail.com>
*
diff --git a/cpukit/posix/src/aio_fsync.c b/cpukit/posix/src/aio_fsync.c
index 7021082930..0330076696 100644
--- a/cpukit/posix/src/aio_fsync.c
+++ b/cpukit/posix/src/aio_fsync.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Syncing of all Outstanding Asynchronous I/O Operations
+ * @ingroup POSIX
+ */
+
/*
* Copyright 2010, Alin Rus <alin.codejunkie@gmail.com>
*
diff --git a/cpukit/posix/src/aio_misc.c b/cpukit/posix/src/aio_misc.c
index 80e95636ad..12bec2eb7d 100644
--- a/cpukit/posix/src/aio_misc.c
+++ b/cpukit/posix/src/aio_misc.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Actual request being processed
+ * @ingroup POSIX
+ */
+
/*
* Copyright 2010-2011, Alin Rus <alin.codejunkie@gmail.com>
*
diff --git a/cpukit/posix/src/aio_read.c b/cpukit/posix/src/aio_read.c
index 63bbac9c1b..f339752525 100644
--- a/cpukit/posix/src/aio_read.c
+++ b/cpukit/posix/src/aio_read.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Asynchronously reads Data from a File
+ * @ingroup POSIX
+ */
+
/*
* Copyright 2010, Alin Rus <alin.codejunkie@gmail.com>
*
diff --git a/cpukit/posix/src/aio_return.c b/cpukit/posix/src/aio_return.c
index da10ebffa6..87c3af1f3e 100644
--- a/cpukit/posix/src/aio_return.c
+++ b/cpukit/posix/src/aio_return.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Final return status for Asynchronous I/O request pointed to by aiobcp
+ * @ingroup POSIX
+ */
+
/*
* Copyright 2010, Alin Rus <alin.codejunkie@gmail.com>
*
diff --git a/cpukit/posix/src/aio_suspend.c b/cpukit/posix/src/aio_suspend.c
index c42ee83be5..60c4af1389 100644
--- a/cpukit/posix/src/aio_suspend.c
+++ b/cpukit/posix/src/aio_suspend.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Suspends Process until Asynchronous I/O Operation completes
+ * @ingroup POSIX
+ */
+
/*
* 6.7.7 Wait for Asynchronous I/O Request, P1003.1b-1993, p. 164
*
diff --git a/cpukit/posix/src/aio_write.c b/cpukit/posix/src/aio_write.c
index 7895c8c218..a510946837 100644
--- a/cpukit/posix/src/aio_write.c
+++ b/cpukit/posix/src/aio_write.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function queues I/O request described by buffer pointed by aiocb
+ * @ingroup POSIX
+ */
+
/*
* Copyright 2010, Alin Rus <alin.codejunkie@gmail.com>
*
diff --git a/cpukit/posix/src/alarm.c b/cpukit/posix/src/alarm.c
index b3c902cbab..22ffcae5c3 100644
--- a/cpukit/posix/src/alarm.c
+++ b/cpukit/posix/src/alarm.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief System Generates Signal for process after realtime seconds elapsed
+ * @ingroup POSIX
+ */
+
/*
* 3.4.1 Schedule Alarm, P1003.1b-1993, p. 79
*/
diff --git a/cpukit/posix/src/barrierattrdestroy.c b/cpukit/posix/src/barrierattrdestroy.c
index f8c1a99355..c0a6fada2c 100644
--- a/cpukit/posix/src/barrierattrdestroy.c
+++ b/cpukit/posix/src/barrierattrdestroy.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function shall Destroy a Barrier Attribues Object
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/barrierattrinit.c b/cpukit/posix/src/barrierattrinit.c
index 2363e4d3db..29d58f4991 100644
--- a/cpukit/posix/src/barrierattrinit.c
+++ b/cpukit/posix/src/barrierattrinit.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Initialize the Barrier Attributes Object
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -16,10 +23,6 @@
#include <rtems/system.h>
-/*
- * Barrier Attributes Initialization
- */
-
int pthread_barrierattr_init(
pthread_barrierattr_t *attr
)
diff --git a/cpukit/posix/src/barrierattrsetpshared.c b/cpukit/posix/src/barrierattrsetpshared.c
index df3c8017dd..897a833946 100644
--- a/cpukit/posix/src/barrierattrsetpshared.c
+++ b/cpukit/posix/src/barrierattrsetpshared.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Set the Process-Shared Attribute of the Barrier Attributes Object
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -14,10 +21,6 @@
#include <pthread.h>
#include <errno.h>
-/*
- * Barrier Attributes Set Process Shared
- */
-
int pthread_barrierattr_setpshared(
pthread_barrierattr_t *attr,
int pshared
diff --git a/cpukit/posix/src/cancel.c b/cpukit/posix/src/cancel.c
index acf13524b8..42321ce93b 100644
--- a/cpukit/posix/src/cancel.c
+++ b/cpukit/posix/src/cancel.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Canceling Execution of a Thread
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/canceleval.c b/cpukit/posix/src/canceleval.c
index be7400289c..804efb4726 100644
--- a/cpukit/posix/src/canceleval.c
+++ b/cpukit/posix/src/canceleval.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Function Evaluates Thread Cancellation and Enables Dispatch
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/cancelrun.c b/cpukit/posix/src/cancelrun.c
index 91749281d8..39a8de763d 100644
--- a/cpukit/posix/src/cancelrun.c
+++ b/cpukit/posix/src/cancelrun.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Executes a thread's cancellation handlers
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/cleanuppop.c b/cpukit/posix/src/cleanuppop.c
index 06e56509b6..9e198f74c9 100644
--- a/cpukit/posix/src/cleanuppop.c
+++ b/cpukit/posix/src/cleanuppop.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Removes Routine from Top of Calling Thread's stack and Invoke it
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/clockgetcpuclockid.c b/cpukit/posix/src/clockgetcpuclockid.c
index 8908ab6801..fb04e174aa 100644
--- a/cpukit/posix/src/clockgetcpuclockid.c
+++ b/cpukit/posix/src/clockgetcpuclockid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Returns Clock ID of CPU-time Clock of process specified
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/clockgetenableattr.c b/cpukit/posix/src/clockgetenableattr.c
index 7d7bf895cb..8420c2be88 100644
--- a/cpukit/posix/src/clockgetenableattr.c
+++ b/cpukit/posix/src/clockgetenableattr.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Clock get Enable Attribute Access
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/clockgetres.c b/cpukit/posix/src/clockgetres.c
index 623fa2433a..60d516d26e 100644
--- a/cpukit/posix/src/clockgetres.c
+++ b/cpukit/posix/src/clockgetres.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Returns the Resolution of any Clock
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/clockgettime.c b/cpukit/posix/src/clockgettime.c
index 2c5a9da5fa..46c1d46811 100644
--- a/cpukit/posix/src/clockgettime.c
+++ b/cpukit/posix/src/clockgettime.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Retrieves the Specified Clock Time
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/clocksetenableattr.c b/cpukit/posix/src/clocksetenableattr.c
index 9719147415..592b82341e 100644
--- a/cpukit/posix/src/clocksetenableattr.c
+++ b/cpukit/posix/src/clocksetenableattr.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Clock set Enable Attribute Access
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/condattrdestroy.c b/cpukit/posix/src/condattrdestroy.c
index 9f4a3949b6..6f686fe1df 100644
--- a/cpukit/posix/src/condattrdestroy.c
+++ b/cpukit/posix/src/condattrdestroy.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Destroy Condition Attribute
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/condattrgetpshared.c b/cpukit/posix/src/condattrgetpshared.c
index a35f85e414..298c2618b3 100644
--- a/cpukit/posix/src/condattrgetpshared.c
+++ b/cpukit/posix/src/condattrgetpshared.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get the Process-Shared Condition Variable Attributes
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -22,11 +29,10 @@
#include <rtems/posix/time.h>
#include <rtems/posix/mutex.h>
-/*
+/**
* 11.4.1 Condition Variable Initialization Attributes,
* P1003.1c/Draft 10, p. 96
*/
-
int pthread_condattr_getpshared(
const pthread_condattr_t *attr,
int *pshared
diff --git a/cpukit/posix/src/condattrinit.c b/cpukit/posix/src/condattrinit.c
index 83728bcdae..89b806cb7e 100644
--- a/cpukit/posix/src/condattrinit.c
+++ b/cpukit/posix/src/condattrinit.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Initialization of Conditional Attributes
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/condattrsetpshared.c b/cpukit/posix/src/condattrsetpshared.c
index f010038cbc..4e00c920c5 100644
--- a/cpukit/posix/src/condattrsetpshared.c
+++ b/cpukit/posix/src/condattrsetpshared.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Initialize Condition Variable Attributes
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/condbroadcast.c b/cpukit/posix/src/condbroadcast.c
index ab2f8713c3..6506d87d98 100644
--- a/cpukit/posix/src/condbroadcast.c
+++ b/cpukit/posix/src/condbroadcast.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Broadcast a Condition
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -22,10 +29,9 @@
#include <rtems/posix/time.h>
#include <rtems/posix/mutex.h>
-/*
+/**
* 11.4.3 Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101
*/
-
int pthread_cond_broadcast(
pthread_cond_t *cond
)
diff --git a/cpukit/posix/src/conddefaultattributes.c b/cpukit/posix/src/conddefaultattributes.c
index 7cca0bcb64..32ec64d69a 100644
--- a/cpukit/posix/src/conddefaultattributes.c
+++ b/cpukit/posix/src/conddefaultattributes.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Condition variable Attributes structure
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/conddestroy.c b/cpukit/posix/src/conddestroy.c
index 905fb1ecca..0f32b89da3 100644
--- a/cpukit/posix/src/conddestroy.c
+++ b/cpukit/posix/src/conddestroy.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Destroy a Condition Variable
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -22,11 +29,10 @@
#include <rtems/posix/time.h>
#include <rtems/posix/mutex.h>
-/*
+/**
* 11.4.2 Initializing and Destroying a Condition Variable,
* P1003.1c/Draft 10, p. 87
*/
-
int pthread_cond_destroy(
pthread_cond_t *cond
)
diff --git a/cpukit/posix/src/condinit.c b/cpukit/posix/src/condinit.c
index 73f1f5b6b7..2a8321192e 100644
--- a/cpukit/posix/src/condinit.c
+++ b/cpukit/posix/src/condinit.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Initialize a Condition Variable
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -22,11 +29,10 @@
#include <rtems/posix/time.h>
#include <rtems/posix/mutex.h>
-/*
+/**
* 11.4.2 Initializing and Destroying a Condition Variable,
* P1003.1c/Draft 10, p. 87
*/
-
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
diff --git a/cpukit/posix/src/condsignal.c b/cpukit/posix/src/condsignal.c
index 8b5c2c90c4..debc110143 100644
--- a/cpukit/posix/src/condsignal.c
+++ b/cpukit/posix/src/condsignal.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Signal a Condition
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -22,10 +29,9 @@
#include <rtems/posix/time.h>
#include <rtems/posix/mutex.h>
-/*
+/**
* 11.4.3 Broadcasting and Signaling a Condition, P1003.1c/Draft 10, p. 101
*/
-
int pthread_cond_signal(
pthread_cond_t *cond
)
diff --git a/cpukit/posix/src/condwait.c b/cpukit/posix/src/condwait.c
index 2540208e16..3162b4d97b 100644
--- a/cpukit/posix/src/condwait.c
+++ b/cpukit/posix/src/condwait.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Waiting on a Condition
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c
index 79b5c02164..91bdc32a0c 100644
--- a/cpukit/posix/src/condwaitsupp.c
+++ b/cpukit/posix/src/condwaitsupp.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Condition Variables Wait Support
+ * @ingroup POSIX_COND_VARS
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -22,13 +29,6 @@
#include <rtems/posix/time.h>
#include <rtems/posix/mutex.h>
-/*
- * _POSIX_Condition_variables_Wait_support
- *
- * A support routine which implements guts of the blocking, non-blocking, and
- * timed wait version of condition variable wait routines.
- */
-
int _POSIX_Condition_variables_Wait_support(
pthread_cond_t *cond,
pthread_mutex_t *mutex,
diff --git a/cpukit/posix/src/execl.c b/cpukit/posix/src/execl.c
index d329e5f7c9..61b9a74fce 100644
--- a/cpukit/posix/src/execl.c
+++ b/cpukit/posix/src/execl.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Process will get Executed and then Terminated by execl
+ * @ingroup POSIX
+ */
+
/*
* execl() - POSIX 1003.1b 3.1.2
*
diff --git a/cpukit/posix/src/execle.c b/cpukit/posix/src/execle.c
index 8199d68c20..1dbd3826a1 100644
--- a/cpukit/posix/src/execle.c
+++ b/cpukit/posix/src/execle.c
@@ -1,6 +1,11 @@
-/*
- * execle() - POSIX 1003.1b 3.1.2
+/**
+ * @file
*
+ * @brief Execute a File
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/execlp.c b/cpukit/posix/src/execlp.c
index 10d44e0019..7a4c5142a6 100644
--- a/cpukit/posix/src/execlp.c
+++ b/cpukit/posix/src/execlp.c
@@ -1,6 +1,11 @@
-/*
- * execlp() - POSIX 1003.1b 3.1.2
+/**
+ * @file
*
+ * @brief execlp()
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/execv.c b/cpukit/posix/src/execv.c
index 8c56274698..26d62b123d 100644
--- a/cpukit/posix/src/execv.c
+++ b/cpukit/posix/src/execv.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Inoperable implementation of execv for POSIX threads
+ * @ingroup POSIX
+ */
+
/*
* execv() - POSIX 1003.1b 3.1.2
*
diff --git a/cpukit/posix/src/execve.c b/cpukit/posix/src/execve.c
index c6f6ede19b..03320e52a0 100644
--- a/cpukit/posix/src/execve.c
+++ b/cpukit/posix/src/execve.c
@@ -1,6 +1,11 @@
-/*
- * execve() - POSIX 1003.1b 3.1.2
+/**
+ * @file
*
+ * @brief Execute a Program
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -18,6 +23,9 @@
#include <errno.h>
#include <rtems/seterr.h>
+/**
+ * POSIX 1003.1b 3.1.2
+ */
int execve(
const char *path,
char *const argv[],
diff --git a/cpukit/posix/src/execvp.c b/cpukit/posix/src/execvp.c
index 6b4d0e9a39..7712c8cef6 100644
--- a/cpukit/posix/src/execvp.c
+++ b/cpukit/posix/src/execvp.c
@@ -1,6 +1,11 @@
-/*
- * execvp() - POSIX 1003.1b 3.1.2
+/**
+ * @file
*
+ * @brief execvp() - POSIX 1003.1b 3.1.2
+ * @ingroup POSIX_KEY Key
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/fork.c b/cpukit/posix/src/fork.c
index ec24f051d7..4cfccf4a02 100644
--- a/cpukit/posix/src/fork.c
+++ b/cpukit/posix/src/fork.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Inoperable implementation of fork() for POSIX threads
+ * @ingroup POSIX
+ */
+
/*
* fork() - POSIX 1003.1b 3.1.1
*
diff --git a/cpukit/posix/src/getitimer.c b/cpukit/posix/src/getitimer.c
index 316d43ea77..a7ee836b04 100644
--- a/cpukit/posix/src/getitimer.c
+++ b/cpukit/posix/src/getitimer.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Gets Value of an Interval Timer
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-20089
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/keycreate.c b/cpukit/posix/src/keycreate.c
index 493b6fb278..3ac462dbcb 100644
--- a/cpukit/posix/src/keycreate.c
+++ b/cpukit/posix/src/keycreate.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Thread-Specific Data Key Create
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
@@ -21,10 +28,9 @@
#include <rtems/score/wkspace.h>
#include <rtems/posix/key.h>
-/*
+/**
* 17.1.1 Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163
*/
-
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
diff --git a/cpukit/posix/src/keydelete.c b/cpukit/posix/src/keydelete.c
index b0b5daa3be..41d57772bf 100644
--- a/cpukit/posix/src/keydelete.c
+++ b/cpukit/posix/src/keydelete.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Deletes Thread-specific Data Key Previously Returned by keycreate.c
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/keyfreememory.c b/cpukit/posix/src/keyfreememory.c
index d5ef5ee989..35e8a36918 100644
--- a/cpukit/posix/src/keyfreememory.c
+++ b/cpukit/posix/src/keyfreememory.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Function Keys Free Memory
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/keygetspecific.c b/cpukit/posix/src/keygetspecific.c
index c7b2cc55fc..3a34359297 100644
--- a/cpukit/posix/src/keygetspecific.c
+++ b/cpukit/posix/src/keygetspecific.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Thread-Specific Data Management
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/keyrundestructors.c b/cpukit/posix/src/keyrundestructors.c
index 888b24715a..9f48888bb8 100644
--- a/cpukit/posix/src/keyrundestructors.c
+++ b/cpukit/posix/src/keyrundestructors.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Thread-Specific Data Key Create
+ * @ingroup POSIX_KEY Key
+ */
+
/*
* Copyright (c) 2010 embedded brains GmbH.
*
diff --git a/cpukit/posix/src/keysetspecific.c b/cpukit/posix/src/keysetspecific.c
index 5b7fb8bc96..e631127fba 100644
--- a/cpukit/posix/src/keysetspecific.c
+++ b/cpukit/posix/src/keysetspecific.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Set Specific Key
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/kill.c b/cpukit/posix/src/kill.c
index ee59fe4b84..8a476e40ce 100644
--- a/cpukit/posix/src/kill.c
+++ b/cpukit/posix/src/kill.c
@@ -1,6 +1,11 @@
-/*
- * 3.3.2 Send a Signal to a Process, P1003.1b-1993, p. 68
+/**
+ * @file
*
+ * @brief Send a Signal to a Process
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/kill_r.c b/cpukit/posix/src/kill_r.c
index 301c0603cf..739fed7358 100644
--- a/cpukit/posix/src/kill_r.c
+++ b/cpukit/posix/src/kill_r.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Send a Signal to a Process
+ * @ingroup POSIX
+ */
+
/*
* 3.3.2 Send a Signal to a Process, P1003.1b-1993, p. 68
*
diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c
index 95a2459100..b7b556de39 100644
--- a/cpukit/posix/src/killinfo.c
+++ b/cpukit/posix/src/killinfo.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Send a Signal to a Process
+ * @ingroup POSIX
+ */
+
/*
* kill() support routine
*
diff --git a/cpukit/posix/src/lio_listio.c b/cpukit/posix/src/lio_listio.c
index 235e689a63..9b53b4d858 100644
--- a/cpukit/posix/src/lio_listio.c
+++ b/cpukit/posix/src/lio_listio.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Initiates a List of I/O Requests with Single Function Call
+ * @ingroup POSIX
+ */
+
/*
* 6.7.4 List Directed I/O, P1003.1b-1993, p. 158
*
diff --git a/cpukit/posix/src/mqueue.c b/cpukit/posix/src/mqueue.c
index 689de26c62..93d6f1bc5b 100644
--- a/cpukit/posix/src/mqueue.c
+++ b/cpukit/posix/src/mqueue.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 Initializes message_queue Manager Related Data Structures
+ * @ingroup POSIX_MQUEUE_P Message Queues Private Support Information
+ */
+
+/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/mqueueclose.c b/cpukit/posix/src/mqueueclose.c
index 7fe1cebd33..8492c90705 100644
--- a/cpukit/posix/src/mqueueclose.c
+++ b/cpukit/posix/src/mqueueclose.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function closes the Message Queue
+ * @ingroup POSIX
+ */
+
/*
* NOTE: The structure of the routines is identical to that of POSIX
* Message_queues to leave the option of having unnamed message
diff --git a/cpukit/posix/src/mqueuedeletesupp.c b/cpukit/posix/src/mqueuedeletesupp.c
index 3c06a59e8a..1a7246278a 100644
--- a/cpukit/posix/src/mqueuedeletesupp.c
+++ b/cpukit/posix/src/mqueuedeletesupp.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 POSIX Delete Message Queue
+ * @ingroup POSIX_MQUEUE
+ */
+
+/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
@@ -41,10 +36,6 @@
#include <rtems/bspIo.h>
#endif
-/*
- * _POSIX_Message_queue_Delete
- */
-
void _POSIX_Message_queue_Delete(
POSIX_Message_queue_Control *the_mq
)
diff --git a/cpukit/posix/src/mqueuegetattr.c b/cpukit/posix/src/mqueuegetattr.c
index 267eed1951..cfcc51af1e 100644
--- a/cpukit/posix/src/mqueuegetattr.c
+++ b/cpukit/posix/src/mqueuegetattr.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Message Queue Attributes
+ * @ingroup POSIX
+ */
+
/*
* NOTE: The structure of the routines is identical to that of POSIX
* Message_queues to leave the option of having unnamed message
diff --git a/cpukit/posix/src/mqueuenotify.c b/cpukit/posix/src/mqueuenotify.c
index 9909fae4fa..5387335c33 100644
--- a/cpukit/posix/src/mqueuenotify.c
+++ b/cpukit/posix/src/mqueuenotify.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 Notify Process that a Message is Available on a Queue
+ * @ingroup POSIX_MQUEUE
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -57,11 +52,6 @@ static void _POSIX_Message_queue_Notify_handler(
_CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
}
-/*
- * 15.2.6 Notify Process that a Message is Available on a Queue,
- * P1003.1b-1993, p. 280
- */
-
int mq_notify(
mqd_t mqdes,
const struct sigevent *notification
diff --git a/cpukit/posix/src/mqueueopen.c b/cpukit/posix/src/mqueueopen.c
index b822978bc9..d5f783990e 100644
--- a/cpukit/posix/src/mqueueopen.c
+++ b/cpukit/posix/src/mqueueopen.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Creates a new POSIX Message Queue or Opens an Existing Queue
+ * @ingroup POSIX
+ */
+
/*
* NOTE: The structure of the routines is identical to that of POSIX
* Message_queues to leave the option of having unnamed message
diff --git a/cpukit/posix/src/mqueuereceive.c b/cpukit/posix/src/mqueuereceive.c
index 44defc250f..c5f9257747 100644
--- a/cpukit/posix/src/mqueuereceive.c
+++ b/cpukit/posix/src/mqueuereceive.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 Receive a Message From a Message Queue
+ * @ingroup POSIX_MQUEUE
+ */
+
+/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
@@ -37,12 +32,6 @@
#include <rtems/posix/mqueue.h>
#include <rtems/posix/time.h>
-/*
- * 15.2.5 Receive a Message From a Message Queue, P1003.1b-1993, p. 279
- *
- * NOTE: P1003.4b/D8, p. 45 adds mq_timedreceive().
- */
-
ssize_t mq_receive(
mqd_t mqdes,
char *msg_ptr,
diff --git a/cpukit/posix/src/mqueuerecvsupp.c b/cpukit/posix/src/mqueuerecvsupp.c
index f1c3102e1f..5cfce067c6 100644
--- a/cpukit/posix/src/mqueuerecvsupp.c
+++ b/cpukit/posix/src/mqueuerecvsupp.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 POSIX Message Queue Receive Support
+ * @ingroup POSIX_MQUEUE_P Message Queues Private Support Information
+ */
+
+/*
* COPYRIGHT (c) 1989-2011.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/mqueuesend.c b/cpukit/posix/src/mqueuesend.c
index 9448dbbe7b..0d67b6d337 100644
--- a/cpukit/posix/src/mqueuesend.c
+++ b/cpukit/posix/src/mqueuesend.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Adds Message Pointed by msg_ptr to Message Queue Reffered by mqdes
+ * @ingroup POSIX
+ */
+
/*
* NOTE: The structure of the routines is identical to that of POSIX
* Message_queues to leave the option of having unnamed message
diff --git a/cpukit/posix/src/mqueuesendsupp.c b/cpukit/posix/src/mqueuesendsupp.c
index dc70c471e0..3fbe0fb164 100644
--- a/cpukit/posix/src/mqueuesendsupp.c
+++ b/cpukit/posix/src/mqueuesendsupp.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Message Queue and Send Support
+ * @ingroup POSIX
+ */
+
/*
* NOTE: The structure of the routines is identical to that of POSIX
* Message_queues to leave the option of having unnamed message
diff --git a/cpukit/posix/src/mqueuesetattr.c b/cpukit/posix/src/mqueuesetattr.c
index 7abdceb730..2fbcd95e3f 100644
--- a/cpukit/posix/src/mqueuesetattr.c
+++ b/cpukit/posix/src/mqueuesetattr.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 Set Message Queue Attributes
+ * @ingroup POSIX_MQUEUE
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -37,10 +32,6 @@
#include <rtems/posix/mqueue.h>
#include <rtems/posix/time.h>
-/*
- * 15.2.7 Set Message Queue Attributes, P1003.1b-1993, p. 281
- */
-
int mq_setattr(
mqd_t mqdes,
const struct mq_attr *mqstat,
diff --git a/cpukit/posix/src/mqueuetimedreceive.c b/cpukit/posix/src/mqueuetimedreceive.c
index ba79ce16d9..58f796160c 100644
--- a/cpukit/posix/src/mqueuetimedreceive.c
+++ b/cpukit/posix/src/mqueuetimedreceive.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Receive Message from Message Queue
+ * @ingroup POSIX
+ */
+
/*
* NOTE: The structure of the routines is identical to that of POSIX
* Message_queues to leave the option of having unnamed message
diff --git a/cpukit/posix/src/mqueuetimedsend.c b/cpukit/posix/src/mqueuetimedsend.c
index f06197fa79..da7e0e1058 100644
--- a/cpukit/posix/src/mqueuetimedsend.c
+++ b/cpukit/posix/src/mqueuetimedsend.c
@@ -1,15 +1,8 @@
-/*
- * 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.]
+/**
+ * @file
*
- * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
- * time.
+ * @brief Send a Message to a Message Queue
+ * @ingroup POSIX_MQUEUE
*/
/*
@@ -39,12 +32,6 @@
#include <rtems/posix/mqueue.h>
#include <rtems/posix/time.h>
-/*
- * 15.2.4 Send a Message to a Message Queue, P1003.1b-1993, p. 277
- *
- * NOTE: P1003.4b/D8, p. 45 adds mq_timedsend().
- */
-
int mq_timedsend(
mqd_t mqdes,
const char *msg_ptr,
diff --git a/cpukit/posix/src/mqueuetranslatereturncode.c b/cpukit/posix/src/mqueuetranslatereturncode.c
index b088eef179..34edf80a24 100644
--- a/cpukit/posix/src/mqueuetranslatereturncode.c
+++ b/cpukit/posix/src/mqueuetranslatereturncode.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Error Translation in Message Queue
+ * @ingroup POSIX
+ */
+
/*
* POSIX Message Queue Error Translation
*
diff --git a/cpukit/posix/src/mutex.c b/cpukit/posix/src/mutex.c
index fd9fed3f77..c6026e08d7 100644
--- a/cpukit/posix/src/mutex.c
+++ b/cpukit/posix/src/mutex.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Mutex Manager Initialization
+ * @ingroup POSIX_MUTEX POSIX Mutex Support
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mutexattrdestroy.c b/cpukit/posix/src/mutexattrdestroy.c
index d7a6616908..06d5c1d2fc 100644
--- a/cpukit/posix/src/mutexattrdestroy.c
+++ b/cpukit/posix/src/mutexattrdestroy.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Destroy Mutex Attributes Object
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -21,10 +28,9 @@
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
-/*
- * 11.3.1 Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81
+/**
+ * 11.3.1 Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81
*/
-
int pthread_mutexattr_destroy(
pthread_mutexattr_t *attr
)
diff --git a/cpukit/posix/src/mutexattrgetprotocol.c b/cpukit/posix/src/mutexattrgetprotocol.c
index 584a38085b..1824b3fff9 100644
--- a/cpukit/posix/src/mutexattrgetprotocol.c
+++ b/cpukit/posix/src/mutexattrgetprotocol.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get protocol Attribute of Mutex Attribute Obect
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mutexattrgetpshared.c b/cpukit/posix/src/mutexattrgetpshared.c
index beeae9bc87..d32ef838b6 100644
--- a/cpukit/posix/src/mutexattrgetpshared.c
+++ b/cpukit/posix/src/mutexattrgetpshared.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Obtaining process-shared Attribute Value from the Attributes Object
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mutexattrgettype.c b/cpukit/posix/src/mutexattrgettype.c
index 23d0bb875f..9137271d9d 100644
--- a/cpukit/posix/src/mutexattrgettype.c
+++ b/cpukit/posix/src/mutexattrgettype.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function gets the Mutex Type Attribute
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mutexattrinit.c b/cpukit/posix/src/mutexattrinit.c
index f2d66010a1..9e1345ee6d 100644
--- a/cpukit/posix/src/mutexattrinit.c
+++ b/cpukit/posix/src/mutexattrinit.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Mutex Initialization Attribute
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -21,10 +28,9 @@
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
-/*
+/**
* 11.3.1 Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81
*/
-
int pthread_mutexattr_init(
pthread_mutexattr_t *attr
)
diff --git a/cpukit/posix/src/mutexattrsetprioceiling.c b/cpukit/posix/src/mutexattrsetprioceiling.c
index f4c2da9b96..82c83cf80e 100644
--- a/cpukit/posix/src/mutexattrsetprioceiling.c
+++ b/cpukit/posix/src/mutexattrsetprioceiling.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/mutexattrsetprotocol.c b/cpukit/posix/src/mutexattrsetprotocol.c
index 1c51ad5f03..fc7c1afe74 100644
--- a/cpukit/posix/src/mutexattrsetprotocol.c
+++ b/cpukit/posix/src/mutexattrsetprotocol.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/mutexattrsetpshared.c b/cpukit/posix/src/mutexattrsetpshared.c
index 6f9f9b4f9a..87e8b52f2b 100644
--- a/cpukit/posix/src/mutexattrsetpshared.c
+++ b/cpukit/posix/src/mutexattrsetpshared.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function sets Current pshared Attribute for Mutex Attributes Object
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mutexattrsettype.c b/cpukit/posix/src/mutexattrsettype.c
index a005747718..861e616ad3 100644
--- a/cpukit/posix/src/mutexattrsettype.c
+++ b/cpukit/posix/src/mutexattrsettype.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Set a Mutex Type
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mutexdestroy.c b/cpukit/posix/src/mutexdestroy.c
index 56f65b3b8f..4a9f1e964a 100644
--- a/cpukit/posix/src/mutexdestroy.c
+++ b/cpukit/posix/src/mutexdestroy.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Initializing and Destroying a Mutex
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mutexget.c b/cpukit/posix/src/mutexget.c
index f1419034c3..44d1864118 100644
--- a/cpukit/posix/src/mutexget.c
+++ b/cpukit/posix/src/mutexget.c
@@ -1,6 +1,11 @@
-/*
- * Convert POSIX Mutex ID to local object pointer
+/**
+ * @file
*
+ * @brief Convert POSIX Mutex ID to local object pointer
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/mutexgetprioceiling.c b/cpukit/posix/src/mutexgetprioceiling.c
index a0390b99f5..21287e2c38 100644
--- a/cpukit/posix/src/mutexgetprioceiling.c
+++ b/cpukit/posix/src/mutexgetprioceiling.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Returns the Current Priority Ceiling of the Mutex
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mutexinit.c b/cpukit/posix/src/mutexinit.c
index 26e75538c5..5ef3485ee2 100644
--- a/cpukit/posix/src/mutexinit.c
+++ b/cpukit/posix/src/mutexinit.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Initialize a Mutex
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
@@ -21,11 +28,11 @@
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
-/*
- * 11.3.2 Initializing and Destroying a Mutex, P1003.1c/Draft 10, p. 87
+/**
+ * 11.3.2 Initializing and Destroying a Mutex, P1003.1c/Draft 10, p. 87
*
- * NOTE: XXX Could be optimized so all the attribute error checking
- * is not performed when attr is NULL.
+ * NOTE: XXX Could be optimized so all the attribute error checking
+ * is not performed when attr is NULL.
*/
int pthread_mutex_init(
diff --git a/cpukit/posix/src/mutexlock.c b/cpukit/posix/src/mutexlock.c
index 0e3125f06f..be5e4d56df 100644
--- a/cpukit/posix/src/mutexlock.c
+++ b/cpukit/posix/src/mutexlock.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Call to function enables locking of Mutex Object referenced by mutex
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mutexlocksupp.c b/cpukit/posix/src/mutexlocksupp.c
index 299aaa162b..6b5d7bd92f 100644
--- a/cpukit/posix/src/mutexlocksupp.c
+++ b/cpukit/posix/src/mutexlocksupp.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Support Call to function Enables Locking of Mutex Object
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mutexsetprioceiling.c b/cpukit/posix/src/mutexsetprioceiling.c
index d873805e21..b11c4570ab 100644
--- a/cpukit/posix/src/mutexsetprioceiling.c
+++ b/cpukit/posix/src/mutexsetprioceiling.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Changes the Priority Ceiling of a Mutex and Releases it
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/mutextimedlock.c b/cpukit/posix/src/mutextimedlock.c
index a8d258a8f8..442f3c6052 100644
--- a/cpukit/posix/src/mutextimedlock.c
+++ b/cpukit/posix/src/mutextimedlock.c
@@ -1,5 +1,8 @@
-/*
- * Mutex Timed Lock
+/**
+ * @file
+ *
+ * @brief Mutex Timed Lock
+ * @ingroup POSIX
*/
/*
@@ -28,12 +31,11 @@
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
-/*
- * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
+/**
+ * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
*
- * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29
+ * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29
*/
-
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
diff --git a/cpukit/posix/src/mutextranslatereturncode.c b/cpukit/posix/src/mutextranslatereturncode.c
index 53b5b0ee00..8c2d9af8ce 100644
--- a/cpukit/posix/src/mutextranslatereturncode.c
+++ b/cpukit/posix/src/mutextranslatereturncode.c
@@ -1,6 +1,11 @@
-/*
- * POSIX Mutex Error Translation
+/**
+ * @file
*
+ * @brief POSIX Mutex Translate Core Mutex Return Code
+ * @ingroup POSIX_MUTEX
+ */
+
+/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
@@ -20,17 +25,6 @@
#include <rtems/score/coremutex.h>
#include <rtems/posix/mutex.h>
-/*
- * _POSIX_Mutex_Translate_core_mutex_return_code
- *
- * Input parameters:
- * the_mutex_status - mutex status code to translate
- *
- * Output parameters:
- * status code - translated POSIX status code
- *
- */
-
static int _POSIX_Mutex_Return_codes[CORE_MUTEX_STATUS_LAST + 1] = {
0, /* CORE_MUTEX_STATUS_SUCCESSFUL */
EBUSY, /* CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT */
diff --git a/cpukit/posix/src/mutextrylock.c b/cpukit/posix/src/mutextrylock.c
index 85b6da51a7..f398dc208a 100644
--- a/cpukit/posix/src/mutextrylock.c
+++ b/cpukit/posix/src/mutextrylock.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Try to Lock Mutex
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -24,12 +31,11 @@
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
-/*
- * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
+/**
+ * 11.3.3 Locking and Unlocking a Mutex, P1003.1c/Draft 10, p. 93
*
- * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29
+ * NOTE: P1003.4b/D8 adds pthread_mutex_timedlock(), p. 29
*/
-
int pthread_mutex_trylock(
pthread_mutex_t *mutex
)
diff --git a/cpukit/posix/src/mutexunlock.c b/cpukit/posix/src/mutexunlock.c
index ab0230f69a..75eaec73c1 100644
--- a/cpukit/posix/src/mutexunlock.c
+++ b/cpukit/posix/src/mutexunlock.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Locking and Unlocking a Mutex
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/nanosleep.c b/cpukit/posix/src/nanosleep.c
index d97112605d..02abe55cec 100644
--- a/cpukit/posix/src/nanosleep.c
+++ b/cpukit/posix/src/nanosleep.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Suspends Execution of calling thread until Time elaps
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/pause.c b/cpukit/posix/src/pause.c
index 3a307d6e93..ee74f6746b 100644
--- a/cpukit/posix/src/pause.c
+++ b/cpukit/posix/src/pause.c
@@ -1,6 +1,11 @@
-/*
- * 3.4.2 Suspend Process Execution, P1003.1b-1993, p. 81
+/**
+ * @file
*
+ * @brief Suspend Process Execution
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -17,10 +22,9 @@
#include <signal.h>
#include <unistd.h>
-/*
- * 3.4.2 Suspend Process Execution, P1003.1b-1993, p. 81
+/**
+ * 3.4.2 Suspend Process Execution, P1003.1b-1993, p. 81
*/
-
int pause( void )
{
sigset_t all_signals;
diff --git a/cpukit/posix/src/pbarrierdestroy.c b/cpukit/posix/src/pbarrierdestroy.c
index a8f6ce3b5e..6b2e9d0bc9 100644
--- a/cpukit/posix/src/pbarrierdestroy.c
+++ b/cpukit/posix/src/pbarrierdestroy.c
@@ -1,6 +1,11 @@
-/*
- * POSIX Barrier Manager -- Destroy a Barrier
+/**
+ * @file
*
+ * @brief Destroy a Barrier Object
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,21 +24,17 @@
#include <rtems/system.h>
#include <rtems/posix/barrier.h>
-/*
- * pthread_barrier_destroy
- *
+/**
* This directive allows a thread to delete a barrier specified by
* the barrier id. The barrier is freed back to the inactive
* barrier chain.
*
- * Input parameters:
- * barrier - barrier id
- *
- * Output parameters:
- * 0 - if successful
- * error code - if unsuccessful
+ * @param[in] barrier is the barrier id
+ *
+ * @return This method returns 0 if there was not an
+ * error. Otherwise, a status code is returned indicating the
+ * source of the error.
*/
-
int pthread_barrier_destroy(
pthread_barrier_t *barrier
)
diff --git a/cpukit/posix/src/pbarrierinit.c b/cpukit/posix/src/pbarrierinit.c
index 077d63289c..c3077cb903 100644
--- a/cpukit/posix/src/pbarrierinit.c
+++ b/cpukit/posix/src/pbarrierinit.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Call to Function Enables Reinitializing of the Barrier
+ * @ingroup POSIX
+ */
+
/*
* POSIX Barrier Manager -- Initialize a Barrier Instance
*
diff --git a/cpukit/posix/src/pbarriertranslatereturncode.c b/cpukit/posix/src/pbarriertranslatereturncode.c
index b7d1999d93..e8a53ec459 100644
--- a/cpukit/posix/src/pbarriertranslatereturncode.c
+++ b/cpukit/posix/src/pbarriertranslatereturncode.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Translates POSIX Barrier Status Code
+ * @ingroup POSIX
+ */
+
/*
* Barrier Manager -- Translate SuperCore Status
*
diff --git a/cpukit/posix/src/pbarrierwait.c b/cpukit/posix/src/pbarrierwait.c
index c5e73bcb26..0ad9634411 100644
--- a/cpukit/posix/src/pbarrierwait.c
+++ b/cpukit/posix/src/pbarrierwait.c
@@ -1,6 +1,11 @@
-/*
- * POSIX Barrier Manager -- Wait at a Barrier
+/**
+ * @file
*
+ * @brief Wait at a Barrier
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,18 +24,14 @@
#include <rtems/system.h>
#include <rtems/posix/barrier.h>
-/*
- * pthread_barrier_wait
- *
- * This directive allows a thread to wait at a barrier.
+/**
+ * This directive allows a thread to wait at a barrier.
*
- * Input parameters:
- * barrier - barrier id
+ * @param[in] barrier is the barrier id
*
- * Output parameters:
- * 0 - if successful
- * PTHREAD_BARRIER_SERIAL_THREAD - if successful
- * error code - if unsuccessful
+ * @retval 0 if successful
+ * @retval PTHREAD_BARRIER_SERIAL_THREAD if successful
+ * @retval error_code if unsuccessful
*/
int pthread_barrier_wait(
diff --git a/cpukit/posix/src/prwlockdestroy.c b/cpukit/posix/src/prwlockdestroy.c
index 684e173e18..9b644ba943 100644
--- a/cpukit/posix/src/prwlockdestroy.c
+++ b/cpukit/posix/src/prwlockdestroy.c
@@ -1,6 +1,10 @@
-/*
- * POSIX RWLock Manager -- Destroy a RWLock
+/**
+ * @file
*
+ * @brief Destroy a RWLock
+ * @ingroup POSIX
+ */
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,21 +23,17 @@
#include <rtems/system.h>
#include <rtems/posix/rwlock.h>
-/*
- * pthread_rwlock_destroy
- *
+/**
* This directive allows a thread to delete a rwlock specified by
* the rwlock id. The rwlock is freed back to the inactive
* rwlock chain.
*
- * Input parameters:
- * rwlock - rwlock id
+ * @param[in] rwlock is the rwlock id
*
- * Output parameters:
- * 0 - if successful
- * error code - if unsuccessful
+ * @return This method returns 0 if there was not an
+ * error. Otherwise, a status code is returned indicating the
+ * source of the error.
*/
-
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
diff --git a/cpukit/posix/src/prwlockinit.c b/cpukit/posix/src/prwlockinit.c
index 2cba7d66aa..61825fe1d5 100644
--- a/cpukit/posix/src/prwlockinit.c
+++ b/cpukit/posix/src/prwlockinit.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Allocate resources to use the read-write lock and Initialize it
+ * @ingroup POSIX
+ */
+
/*
* POSIX RWLock Manager -- Destroy a RWLock Instance
*
diff --git a/cpukit/posix/src/prwlockrdlock.c b/cpukit/posix/src/prwlockrdlock.c
index ec75fea823..0ce4764915 100644
--- a/cpukit/posix/src/prwlockrdlock.c
+++ b/cpukit/posix/src/prwlockrdlock.c
@@ -1,6 +1,11 @@
-/*
- * POSIX RWLock Manager -- Obtain a Read Lock on a RWLock Instance
+/**
+ * @file
*
+ * @brief Obtain a Read Lock on a RWLock Instance
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,17 +24,13 @@
#include <rtems/system.h>
#include <rtems/posix/rwlock.h>
-/*
- * pthread_rwlock_rdlock
- *
- * This directive attempts to obtain a read only lock on an rwlock instance.
+/**
+ * This directive attempts to obtain a read only lock on an rwlock instance.
*
- * Input parameters:
- * rwlock - pointer to rwlock id
+ * @param[in] rwlock is the pointer to rwlock id
*
- * Output parameters:
- * 0 - if successful
- * error code - if unsuccessful
+ * @retval 0 if successful
+ * @retval error_code if unsuccessful
*/
int pthread_rwlock_rdlock(
diff --git a/cpukit/posix/src/prwlocktimedrdlock.c b/cpukit/posix/src/prwlocktimedrdlock.c
index 6bb397ad11..95a3fa5423 100644
--- a/cpukit/posix/src/prwlocktimedrdlock.c
+++ b/cpukit/posix/src/prwlocktimedrdlock.c
@@ -1,6 +1,11 @@
-/*
- * POSIX RWLock Manager -- Attempt to Obtain a Read Lock on a RWLock Instance
+/**
+ * @file
*
+ * @brief Attempt to Obtain a Read Lock on a RWLock Instance
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/prwlocktimedwrlock.c b/cpukit/posix/src/prwlocktimedwrlock.c
index 5e6e4ba419..ca435373ff 100644
--- a/cpukit/posix/src/prwlocktimedwrlock.c
+++ b/cpukit/posix/src/prwlocktimedwrlock.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function applies a Write lock to RWLock referenced by rwlock
+ * @ingroup POSIX
+ */
+
/*
* POSIX RWLock Manager -- Attempt to Obtain a Write Lock on a RWLock Instance
*
diff --git a/cpukit/posix/src/prwlocktranslatereturncode.c b/cpukit/posix/src/prwlocktranslatereturncode.c
index 3c75e10aa4..48be176d36 100644
--- a/cpukit/posix/src/prwlocktranslatereturncode.c
+++ b/cpukit/posix/src/prwlocktranslatereturncode.c
@@ -1,6 +1,11 @@
-/*
- * RWLock Manager -- Translate SuperCore Status
+/**
+ * @file
*
+ * @brief POSIX RWLock Translate Core RWLock Return Code
+ * @ingroup POSIX_RWLOCK
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,17 +24,6 @@
#include <rtems/system.h>
#include <rtems/posix/rwlock.h>
-/*
- * _POSIX_RWLock_Translate_core_rwlock_return_code
- *
- * Input parameters:
- * the_rwlock_status - rwlock status code to translate
- *
- * Output parameters:
- * status code - translated POSIX status code
- *
- */
-
static int _POSIX_RWLock_Return_codes[CORE_RWLOCK_STATUS_LAST + 1] = {
0, /* CORE_RWLOCK_SUCCESSFUL */
EINVAL, /* CORE_RWLOCK_DELETED */
diff --git a/cpukit/posix/src/prwlocktryrdlock.c b/cpukit/posix/src/prwlocktryrdlock.c
index eb8c5f8f05..f8524e34d2 100644
--- a/cpukit/posix/src/prwlocktryrdlock.c
+++ b/cpukit/posix/src/prwlocktryrdlock.c
@@ -1,6 +1,11 @@
-/*
- * POSIX RWLock Manager -- Attempt to Obtain a Read Lock on a RWLock Instance
+/**
+ * @file
*
+ * @brief Attempt to Obtain a Read Lock on a RWLock Instance
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/prwlockunlock.c b/cpukit/posix/src/prwlockunlock.c
index 86f26d7a23..79042b259d 100644
--- a/cpukit/posix/src/prwlockunlock.c
+++ b/cpukit/posix/src/prwlockunlock.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Releases a lock held on RWLock object referenced by rwlock
+ * @ingroup POSIX
+ */
+
/*
* POSIX RWLock Manager -- Release a lock held on a RWLock Instance
*
diff --git a/cpukit/posix/src/prwlockwrlock.c b/cpukit/posix/src/prwlockwrlock.c
index fffdbea3a8..16e5ecd6f1 100644
--- a/cpukit/posix/src/prwlockwrlock.c
+++ b/cpukit/posix/src/prwlockwrlock.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Obtain a Write Lock on a RWlock Instance
+ * @ingroup POSIX
+ */
+
/*
* POSIX RWLock Manager -- Obtain a Write Lock on a RWLock Instance
*
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c
index 7623920f54..e490877d32 100644
--- a/cpukit/posix/src/psignal.c
+++ b/cpukit/posix/src/psignal.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Signals Manager Initialization
+ * @ingroup POSIX_SIGNALS
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
@@ -162,10 +169,6 @@ API_extensions_Post_switch_control _POSIX_signals_Post_switch = {
.hook = _POSIX_signals_Post_switch_hook
};
-/*
- * _POSIX_signals_Manager_Initialization
- */
-
void _POSIX_signals_Manager_Initialization(void)
{
uint32_t signo;
diff --git a/cpukit/posix/src/psignalchecksignal.c b/cpukit/posix/src/psignalchecksignal.c
index 171d7c8121..57237d3055 100644
--- a/cpukit/posix/src/psignalchecksignal.c
+++ b/cpukit/posix/src/psignalchecksignal.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Signals Check Signal
+ * @ingroup POSIX_SIGNALS
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -31,11 +38,6 @@
#include <rtems/posix/time.h>
#include <stdio.h>
-
-/*
- * _POSIX_signals_Check_signal
- */
-
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
diff --git a/cpukit/posix/src/psignalclearprocesssignals.c b/cpukit/posix/src/psignalclearprocesssignals.c
index 3c3cdf4e68..3d1d16b5aa 100644
--- a/cpukit/posix/src/psignalclearprocesssignals.c
+++ b/cpukit/posix/src/psignalclearprocesssignals.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX_signals clear_process_signals
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/psignalclearsignals.c b/cpukit/posix/src/psignalclearsignals.c
index 390bcd1579..e71f2fa575 100644
--- a/cpukit/posix/src/psignalclearsignals.c
+++ b/cpukit/posix/src/psignalclearsignals.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Signals Clear Signals
+ * @ingroup POSIX_SIGNALS POSIX Signals Support
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/psignalsetprocesssignals.c b/cpukit/posix/src/psignalsetprocesssignals.c
index 22609bf2af..92c1d8164e 100644
--- a/cpukit/posix/src/psignalsetprocesssignals.c
+++ b/cpukit/posix/src/psignalsetprocesssignals.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Signals Set Process Signals
+ * @ingroup POSIX_SIGNALS
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -27,10 +34,6 @@
#include <rtems/posix/time.h>
#include <stdio.h>
-/*
- * _POSIX_signals_Set_process_signals
- */
-
void _POSIX_signals_Set_process_signals(
sigset_t mask
)
diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c
index 5dc6ef587b..0603a7f152 100644
--- a/cpukit/posix/src/psignalunblockthread.c
+++ b/cpukit/posix/src/psignalunblockthread.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Signals Thread Unlock
+ * @ingroup POSIX_SIGNALS
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -27,12 +34,6 @@
#include <rtems/posix/time.h>
#include <stdio.h>
-
-/*
- * _POSIX_signals_Unblock_thread
- */
-
-/* XXX this routine could probably be cleaned up */
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
diff --git a/cpukit/posix/src/pspindestroy.c b/cpukit/posix/src/pspindestroy.c
index c5574c0c7b..97745b6b77 100644
--- a/cpukit/posix/src/pspindestroy.c
+++ b/cpukit/posix/src/pspindestroy.c
@@ -1,6 +1,11 @@
-/*
- * POSIX Spinlock Manager -- Destroy a Spinlock
+/**
+ * @file
*
+ * @brief Destroy a Spinlock
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,21 +24,17 @@
#include <rtems/system.h>
#include <rtems/posix/spinlock.h>
-/*
- * pthread_spin_destroy
- *
+/**
* This directive allows a thread to delete a spinlock specified by
* the spinlock id. The spinlock is freed back to the inactive
* spinlock chain.
*
- * Input parameters:
- * spinlock - spinlock id
+ * @param[in] spinlock is the spinlock id
*
- * Output parameters:
- * 0 - if successful
- * error code - if unsuccessful
+ * @return This method returns 0 if there was not an
+ * error. Otherwise, a status code is returned indicating the
+ * source of the error.
*/
-
int pthread_spin_destroy(
pthread_spinlock_t *spinlock
)
diff --git a/cpukit/posix/src/pspininit.c b/cpukit/posix/src/pspininit.c
index 4a1019abaa..030bb50ae2 100644
--- a/cpukit/posix/src/pspininit.c
+++ b/cpukit/posix/src/pspininit.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Function Initializes a Spinlock Instance
+ * @ingroup POSIX
+ */
+
/*
* POSIX Spinlock Manager -- Initialize a Spinlock Instance
*
diff --git a/cpukit/posix/src/pspinlock.c b/cpukit/posix/src/pspinlock.c
index ce1a2bb3c5..7f6793c1d5 100644
--- a/cpukit/posix/src/pspinlock.c
+++ b/cpukit/posix/src/pspinlock.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).
*
@@ -19,19 +24,15 @@
#include <rtems/system.h>
#include <rtems/posix/spinlock.h>
-/*
- * pthread_spin_lock
- *
+/**
* This directive allows a thread to wait at a spinlock.
*
- * Input parameters:
- * spinlock - spinlock id
- *
- * Output parameters:
- * 0 - if successful
- * error code - if unsuccessful
+ * @param[in] spinlock is spinlock id
+ *
+ * @return This method returns 0 if there was not an
+ * error. Otherwise, a status code is returned indicating the
+ * source of the error.
*/
-
int pthread_spin_lock(
pthread_spinlock_t *spinlock
)
diff --git a/cpukit/posix/src/pspinlocktranslatereturncode.c b/cpukit/posix/src/pspinlocktranslatereturncode.c
index 92dca9101a..ce133a40b7 100644
--- a/cpukit/posix/src/pspinlocktranslatereturncode.c
+++ b/cpukit/posix/src/pspinlocktranslatereturncode.c
@@ -1,6 +1,11 @@
-/*
- * Spinlock Manager -- Translate SuperCore Status
+/**
+ * @file
*
+ * @brief POSIX Spinlock Translate Core Spinlock Return Code
+ * @ingroup POSIX_SPINLOCK
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -20,17 +25,6 @@
#include <rtems/score/corespinlock.h>
#include <rtems/posix/spinlock.h>
-/*
- * _POSIX_Spinlock_Translate_core_spinlock_return_code
- *
- * Input parameters:
- * the_spinlock_status - spinlock status code to translate
- *
- * Output parameters:
- * status code - translated POSIX status code
- *
- */
-
static int _POSIX_Spinlock_Return_codes[CORE_SPINLOCK_STATUS_LAST + 1] = {
0, /* CORE_SPINLOCK_SUCCESSFUL */
EDEADLK, /* CORE_SPINLOCK_HOLDER_RELOCKING */
diff --git a/cpukit/posix/src/pspinunlock.c b/cpukit/posix/src/pspinunlock.c
index 4fb1391977..67a69cbc02 100644
--- a/cpukit/posix/src/pspinunlock.c
+++ b/cpukit/posix/src/pspinunlock.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Unlocks a Spin Lock Object
+ * @ingroup POSIX
+ */
+
/*
* POSIX Spinlock Manager -- Wait at a Spinlock
*
diff --git a/cpukit/posix/src/psxnametoid.c b/cpukit/posix/src/psxnametoid.c
index f35eed3cc4..d75d5d43df 100644
--- a/cpukit/posix/src/psxnametoid.c
+++ b/cpukit/posix/src/psxnametoid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Name to ID
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/psxpriorityisvalid.c b/cpukit/posix/src/psxpriorityisvalid.c
index 3ef7a1ec26..eda424e420 100644
--- a/cpukit/posix/src/psxpriorityisvalid.c
+++ b/cpukit/posix/src/psxpriorityisvalid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Is Priority Valid
+ * @ingroup POSIX_PRIORITY
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/psxtransschedparam.c b/cpukit/posix/src/psxtransschedparam.c
index 059a7fb728..3c42ee15e3 100644
--- a/cpukit/posix/src/psxtransschedparam.c
+++ b/cpukit/posix/src/psxtransschedparam.c
@@ -1,4 +1,12 @@
-/* COPYRIGHT (c) 1989-2009.
+/**
+ * @file
+ *
+ * @brief Translate sched_param into SuperCore Terms
+ * @ingroup POSIX_PTHREAD Private POSIX Threads
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index 1773c24b69..873449a2da 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Private Support Information for POSIX Threads
+ * @ingroup POSIX_PTHREADS Private Threads
+ */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/pthreadatfork.c b/cpukit/posix/src/pthreadatfork.c
index 767f113d0c..558bc77555 100644
--- a/cpukit/posix/src/pthreadatfork.c
+++ b/cpukit/posix/src/pthreadatfork.c
@@ -1,15 +1,11 @@
-/*
- * pthread_atfork() - POSIX 1003.1b 3.1.3
- *
- * 3.1.3 Register Fork Handlers, P1003.1c/Draft 10, P1003.1c/Draft 10, p. 27
- *
- * RTEMS does not support processes, so we fall under this and do not
- * provide this routine:
- *
- * "Either the implementation shall support the pthread_atfork() function
- * as described above or the pthread_atfork() funciton shall not be
- * provided."
+/**
+ * @file
*
+ * @brief Register Fork Handlers
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -27,6 +23,18 @@
#include <errno.h>
#include <rtems/seterr.h>
+/**
+ * POSIX 1003.1b 3.1.3
+ *
+ * 3.1.3 Register Fork Handlers, P1003.1c/Draft 10, P1003.1c/Draft 10, p. 27
+ *
+ * RTEMS does not support processes, so we fall under this and do not
+ * provide this routine:
+ *
+ * "Either the implementation shall support the pthread_atfork() function
+ * as described above or the pthread_atfork() funciton shall not be
+ * provided."
+ */
int pthread_atfork(
void (*prepare)(void) __attribute__((unused)),
void (*parent)(void) __attribute__((unused)),
diff --git a/cpukit/posix/src/pthreadattrdestroy.c b/cpukit/posix/src/pthreadattrdestroy.c
index 0852b29ec7..27d58ccec7 100644
--- a/cpukit/posix/src/pthreadattrdestroy.c
+++ b/cpukit/posix/src/pthreadattrdestroy.c
@@ -1,6 +1,11 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
+/**
+ * @file
*
+ * @brief Thread Creation Attributes
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/pthreadattrgetdetachstate.c b/cpukit/posix/src/pthreadattrgetdetachstate.c
index e9b225d23c..bd23cb7f30 100644
--- a/cpukit/posix/src/pthreadattrgetdetachstate.c
+++ b/cpukit/posix/src/pthreadattrgetdetachstate.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function gets the detachstate Attribute in the attr Object
+ * @ingroup POSIX
+ */
+
/*
* 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
*
diff --git a/cpukit/posix/src/pthreadattrgetguardsize.c b/cpukit/posix/src/pthreadattrgetguardsize.c
index 72211cdf9a..81eee4f9f9 100644
--- a/cpukit/posix/src/pthreadattrgetguardsize.c
+++ b/cpukit/posix/src/pthreadattrgetguardsize.c
@@ -1,6 +1,11 @@
-/*
- * 16.1.1 Thread Creation Attributes
+/**
+ * @file
*
+ * @brief Thread Creation Attributes
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/pthreadattrgetinheritsched.c b/cpukit/posix/src/pthreadattrgetinheritsched.c
index ae564650e6..84f1fa560f 100644
--- a/cpukit/posix/src/pthreadattrgetinheritsched.c
+++ b/cpukit/posix/src/pthreadattrgetinheritsched.c
@@ -1,6 +1,11 @@
-/*
- * 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120
+/**
+ * @file
*
+ * @brief Thread Creation Scheduling Attributes
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/pthreadattrgetschedparam.c b/cpukit/posix/src/pthreadattrgetschedparam.c
index 7ec55a305d..eee962f854 100644
--- a/cpukit/posix/src/pthreadattrgetschedparam.c
+++ b/cpukit/posix/src/pthreadattrgetschedparam.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Returns Scheduling Parameter Attributes of Thread Attributes Object
+ * @ingroup POSIX
+ */
+
/*
* 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120
*
diff --git a/cpukit/posix/src/pthreadattrgetschedpolicy.c b/cpukit/posix/src/pthreadattrgetschedpolicy.c
index 1a79711fb2..6b57e8a2ca 100644
--- a/cpukit/posix/src/pthreadattrgetschedpolicy.c
+++ b/cpukit/posix/src/pthreadattrgetschedpolicy.c
@@ -1,6 +1,11 @@
-/*
- * 13.5.1 Thread Creation Scheduling Parameters, P1003.1c/Draft 10, p. 120
+/**
+ * @file
*
+ * @brief Get The Schedpolicy Attribute
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -16,6 +21,9 @@
#include <pthread.h>
#include <errno.h>
+/**
+ * 13.5.1 Thread Creation Scheduling Parameters, P1003.1c/Draft 10, p. 120
+ */
int pthread_attr_getschedpolicy(
const pthread_attr_t *attr,
int *policy
diff --git a/cpukit/posix/src/pthreadattrgetscope.c b/cpukit/posix/src/pthreadattrgetscope.c
index e7eb7f8344..ee5ed4c044 100644
--- a/cpukit/posix/src/pthreadattrgetscope.c
+++ b/cpukit/posix/src/pthreadattrgetscope.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function gets the Contentionscope Attribute in the attr object
+ * @ingroup POSIX
+ */
+
/*
* 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120
*
diff --git a/cpukit/posix/src/pthreadattrgetstack.c b/cpukit/posix/src/pthreadattrgetstack.c
index e035ee4b62..a1254ae7a1 100644
--- a/cpukit/posix/src/pthreadattrgetstack.c
+++ b/cpukit/posix/src/pthreadattrgetstack.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Gets the Thread Creation Stack Attributes in the attr
+ * @ingroup POSIX
+ */
+
/*
* 16.1.1 Thread Creation Attributes
*
diff --git a/cpukit/posix/src/pthreadattrgetstackaddr.c b/cpukit/posix/src/pthreadattrgetstackaddr.c
index c877c1395d..dfdffbd662 100644
--- a/cpukit/posix/src/pthreadattrgetstackaddr.c
+++ b/cpukit/posix/src/pthreadattrgetstackaddr.c
@@ -1,6 +1,11 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
+/**
+ * @file
*
+ * @brief Thread Creation Attributes
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/pthreadattrgetstacksize.c b/cpukit/posix/src/pthreadattrgetstacksize.c
index 9827933c51..06854ca54b 100644
--- a/cpukit/posix/src/pthreadattrgetstacksize.c
+++ b/cpukit/posix/src/pthreadattrgetstacksize.c
@@ -1,6 +1,11 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
+/**
+ * @file
*
+ * @brief Thread Creation Attributes
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/pthreadattrinit.c b/cpukit/posix/src/pthreadattrinit.c
index 67942c8ac4..1e5211bfd6 100644
--- a/cpukit/posix/src/pthreadattrinit.c
+++ b/cpukit/posix/src/pthreadattrinit.c
@@ -1,6 +1,11 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
+/**
+ * @file
*
+ * @brief Thread Attributes Creation
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,6 +24,9 @@
#include <rtems/system.h>
#include <rtems/posix/pthread.h>
+/**
+ * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
+ */
int pthread_attr_init(
pthread_attr_t *attr
)
diff --git a/cpukit/posix/src/pthreadattrsetdetachstate.c b/cpukit/posix/src/pthreadattrsetdetachstate.c
index e10d663815..a76d304a43 100644
--- a/cpukit/posix/src/pthreadattrsetdetachstate.c
+++ b/cpukit/posix/src/pthreadattrsetdetachstate.c
@@ -1,6 +1,11 @@
-/*
- * 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
+/**
+ * @file
*
+ * @brief Thread Creation Attributes
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/pthreadattrsetguardsize.c b/cpukit/posix/src/pthreadattrsetguardsize.c
index 51390a7d12..7656d4fee9 100644
--- a/cpukit/posix/src/pthreadattrsetguardsize.c
+++ b/cpukit/posix/src/pthreadattrsetguardsize.c
@@ -1,6 +1,11 @@
-/*
- * 16.1.1 Thread Creation Attributes
+/**
+ * @file
*
+ * @brief Thread Creation Attributes
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/pthreadattrsetinheritsched.c b/cpukit/posix/src/pthreadattrsetinheritsched.c
index 65c43dd24a..2951444fcf 100644
--- a/cpukit/posix/src/pthreadattrsetinheritsched.c
+++ b/cpukit/posix/src/pthreadattrsetinheritsched.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function sets the inheritsched Attribute in the attr Argument
+ * @ingroup POSIX
+ */
+
/*
* 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120
*
diff --git a/cpukit/posix/src/pthreadattrsetschedparam.c b/cpukit/posix/src/pthreadattrsetschedparam.c
index fb56652db7..65e560198f 100644
--- a/cpukit/posix/src/pthreadattrsetschedparam.c
+++ b/cpukit/posix/src/pthreadattrsetschedparam.c
@@ -1,6 +1,11 @@
-/*
- * 13.5.1 Thread Creation Scheduling Parameters, P1003.1c/Draft 10, p. 120
+/**
+ * @file
*
+ * @brief Thread Creation Scheduling Parameters
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/pthreadattrsetschedpolicy.c b/cpukit/posix/src/pthreadattrsetschedpolicy.c
index e095d719b9..ee7fe1fce3 100644
--- a/cpukit/posix/src/pthreadattrsetschedpolicy.c
+++ b/cpukit/posix/src/pthreadattrsetschedpolicy.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Sets Scheduling policy Attributes of Thread Attributes Object
+ * @ingroup POSIX
+ */
+
/*
* 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120
*
diff --git a/cpukit/posix/src/pthreadattrsetscope.c b/cpukit/posix/src/pthreadattrsetscope.c
index 53a00a268b..d468524086 100644
--- a/cpukit/posix/src/pthreadattrsetscope.c
+++ b/cpukit/posix/src/pthreadattrsetscope.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Sets the Contentionscope Attribute in the attr Object
+ * @ingroup POSIX
+ */
+
/*
* 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120
*
diff --git a/cpukit/posix/src/pthreadattrsetstack.c b/cpukit/posix/src/pthreadattrsetstack.c
index 3eb4181842..04231ed791 100644
--- a/cpukit/posix/src/pthreadattrsetstack.c
+++ b/cpukit/posix/src/pthreadattrsetstack.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Sets Thread Creation Stack Attributes in the attr object
+ * @ingroup POSIX
+ */
+
/*
* 16.1.1 Thread Creation Attributes
*
diff --git a/cpukit/posix/src/pthreadattrsetstackaddr.c b/cpukit/posix/src/pthreadattrsetstackaddr.c
index 3c3b2b05d3..1696bb95ac 100644
--- a/cpukit/posix/src/pthreadattrsetstackaddr.c
+++ b/cpukit/posix/src/pthreadattrsetstackaddr.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Sets the Thread Creation stackaddr Attribute in the attr Object
+ * @ingroup POSIX
+ */
+
/*
* 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
*
diff --git a/cpukit/posix/src/pthreadattrsetstacksize.c b/cpukit/posix/src/pthreadattrsetstacksize.c
index d6a2050a53..eb269e3df9 100644
--- a/cpukit/posix/src/pthreadattrsetstacksize.c
+++ b/cpukit/posix/src/pthreadattrsetstacksize.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Sets the Thread Creation Stacksize Attribute in the attr object
+ * @ingroup POSIX
+ */
+
/*
* 16.1.1 Thread Creation Attributes, P1003.1c/Draft 10, p, 140
*
diff --git a/cpukit/posix/src/pthreadcreate.c b/cpukit/posix/src/pthreadcreate.c
index c320f40660..30551ac64c 100644
--- a/cpukit/posix/src/pthreadcreate.c
+++ b/cpukit/posix/src/pthreadcreate.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Starts a New Thread in The Calling Process
+ * @ingroup POSIX
+ */
+
/*
* 16.1.2 Thread Creation, P1003.1c/Draft 10, p. 144
*/
diff --git a/cpukit/posix/src/pthreaddetach.c b/cpukit/posix/src/pthreaddetach.c
index a50aa86a4e..682bac8b42 100644
--- a/cpukit/posix/src/pthreaddetach.c
+++ b/cpukit/posix/src/pthreaddetach.c
@@ -1,6 +1,11 @@
-/*
- * 16.1.4 Detaching a Thread, P1003.1c/Draft 10, p. 149
+/**
+ * @file
*
+ * @brief Detaching a Thread
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -20,6 +25,9 @@
#include <rtems/score/thread.h>
#include <rtems/posix/pthread.h>
+/**
+ * 16.1.4 Detaching a Thread, P1003.1c/Draft 10, p. 149
+ */
int pthread_detach(
pthread_t thread
)
diff --git a/cpukit/posix/src/pthreadequal.c b/cpukit/posix/src/pthreadequal.c
index bc18e33a13..ce08b1ea88 100644
--- a/cpukit/posix/src/pthreadequal.c
+++ b/cpukit/posix/src/pthreadequal.c
@@ -1,6 +1,11 @@
-/*
- * 16.1.7 Compare Thread IDs, p1003.1c/Draft 10, p. 153
+/**
+ * @file
*
+ * @brief Compare Thread IDs
+ * @ingroup POSIX
+ */
+
+/*
* NOTE: POSIX does not define the behavior when either thread id is invalid.
*
* COPYRIGHT (c) 1989-2007.
diff --git a/cpukit/posix/src/pthreadgetcpuclockid.c b/cpukit/posix/src/pthreadgetcpuclockid.c
index 51776f046e..0b7e3bbd28 100644
--- a/cpukit/posix/src/pthreadgetcpuclockid.c
+++ b/cpukit/posix/src/pthreadgetcpuclockid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Returns Clock ID for CPU time clock of the thread
+ * @ingroup POSIX
+ */
+
/*
* 20.1.6 Accessing a Thread CPU-time Clock, P1003.4b/Draft 8, p. 58
*
diff --git a/cpukit/posix/src/pthreadgetschedparam.c b/cpukit/posix/src/pthreadgetschedparam.c
index 5311e3f5e0..8c78ccca52 100644
--- a/cpukit/posix/src/pthreadgetschedparam.c
+++ b/cpukit/posix/src/pthreadgetschedparam.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Gets Scheduling Policy and Parameters of Individual Threads
+ * @ingroup POSIX
+ */
+
/*
* 13.5.2 Dynamic Thread Scheduling Parameters Access,
* P1003.1c/Draft 10, p. 124
diff --git a/cpukit/posix/src/pthreadinitthreads.c b/cpukit/posix/src/pthreadinitthreads.c
index b2c850fda2..8b17e06a14 100644
--- a/cpukit/posix/src/pthreadinitthreads.c
+++ b/cpukit/posix/src/pthreadinitthreads.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Threads Initialize User Threads Body
+ * @ingroup POSIX_PTHREAD
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
@@ -28,17 +35,6 @@
#include <rtems/posix/key.h>
#include <rtems/posix/time.h>
-/*
- * _POSIX_Threads_Initialize_user_threads_body
- *
- * This routine creates and starts all configured user
- * initialization threads.
- *
- * Input parameters: NONE
- *
- * Output parameters: NONE
- */
-
void _POSIX_Threads_Initialize_user_threads_body(void)
{
int status;
diff --git a/cpukit/posix/src/pthreadjoin.c b/cpukit/posix/src/pthreadjoin.c
index ac48612505..115f39d103 100644
--- a/cpukit/posix/src/pthreadjoin.c
+++ b/cpukit/posix/src/pthreadjoin.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Suspends Execution of Calling Thread until Target Thread Terminates
+ * @ingroup POSIX
+ */
+
/*
* 16.1.3 Wait for Thread Termination, P1003.1c/Draft 10, p. 147
*
diff --git a/cpukit/posix/src/pthreadkill.c b/cpukit/posix/src/pthreadkill.c
index 67ef0c7005..420aaa567f 100644
--- a/cpukit/posix/src/pthreadkill.c
+++ b/cpukit/posix/src/pthreadkill.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Sends a signal Asynchronously directed to a thread
+ * @ingroup POSIX
+ */
+
/*
* 3.3.10 Send a Signal to a Thread, P1003.1c/D10, p. 43
*
diff --git a/cpukit/posix/src/pthreadonce.c b/cpukit/posix/src/pthreadonce.c
index 5f598a787a..651e4d0539 100644
--- a/cpukit/posix/src/pthreadonce.c
+++ b/cpukit/posix/src/pthreadonce.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Call to function by Thread will call init_routine with no Arguments
+ * @ingroup POSIX
+ */
+
/*
* 16.1.8 Dynamic Package Initialization, P1003.1c/Draft 10, p. 154
*
diff --git a/cpukit/posix/src/pthreadself.c b/cpukit/posix/src/pthreadself.c
index 9400b4b7fe..0ed68be515 100644
--- a/cpukit/posix/src/pthreadself.c
+++ b/cpukit/posix/src/pthreadself.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function returns the ID of the Calling Thread
+ * @ingroup POSIX
+ */
+
/*
* 16.1.6 Get Calling Thread's ID, p1003.1c/Draft 10, p. 152
*
diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c
index 231b4f930f..d574811ae0 100644
--- a/cpukit/posix/src/pthreadsetschedparam.c
+++ b/cpukit/posix/src/pthreadsetschedparam.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function sets scheduling policy and parameters of the thread
+ * @ingroup POSIX
+ */
+
/*
* 13.5.2 Dynamic Thread Scheduling Parameters Access,
* P1003.1c/Draft 10, p. 124
diff --git a/cpukit/posix/src/pthreadsigmask.c b/cpukit/posix/src/pthreadsigmask.c
index b424daba78..9d47e44865 100644
--- a/cpukit/posix/src/pthreadsigmask.c
+++ b/cpukit/posix/src/pthreadsigmask.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Examine and/or change the calling thread's signal mask
+ * @ingroup POSIX
+ */
+
/*
* 3.3.5 Examine and Change Blocked Signals, P1003.1b-1993, p. 73
*
diff --git a/cpukit/posix/src/ptimer.c b/cpukit/posix/src/ptimer.c
index 2e3526730a..1d5ac6245e 100644
--- a/cpukit/posix/src/ptimer.c
+++ b/cpukit/posix/src/ptimer.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Process Timer
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/rwlockattrdestroy.c b/cpukit/posix/src/rwlockattrdestroy.c
index 022fe79864..102b141704 100644
--- a/cpukit/posix/src/rwlockattrdestroy.c
+++ b/cpukit/posix/src/rwlockattrdestroy.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Destroys a read-write lock Attributes object
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/rwlockattrgetpshared.c b/cpukit/posix/src/rwlockattrgetpshared.c
index 488809f87b..233cbffa22 100644
--- a/cpukit/posix/src/rwlockattrgetpshared.c
+++ b/cpukit/posix/src/rwlockattrgetpshared.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get the Process-Shared Attribute of the RWLock
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -14,10 +21,6 @@
#include <pthread.h>
#include <errno.h>
-/*
- * RWLock Attributes Get Process Shared
- */
-
int pthread_rwlockattr_getpshared(
const pthread_rwlockattr_t *attr,
int *pshared
diff --git a/cpukit/posix/src/rwlockattrinit.c b/cpukit/posix/src/rwlockattrinit.c
index ea88e002b2..381cd52b0d 100644
--- a/cpukit/posix/src/rwlockattrinit.c
+++ b/cpukit/posix/src/rwlockattrinit.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Initialises a RWLock Attributes object attr with the default value
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/rwlockattrsetpshared.c b/cpukit/posix/src/rwlockattrsetpshared.c
index f27a5b56fe..5a32530e1e 100644
--- a/cpukit/posix/src/rwlockattrsetpshared.c
+++ b/cpukit/posix/src/rwlockattrsetpshared.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RWLock Attributes Set Process Shared
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/sched_getparam.c b/cpukit/posix/src/sched_getparam.c
index 9cd95fefbe..d9e516a8ed 100644
--- a/cpukit/posix/src/sched_getparam.c
+++ b/cpukit/posix/src/sched_getparam.c
@@ -1,6 +1,11 @@
-/*
- * 13.3.2 Set Scheduling Parameters, P1003.1b-1993, p. 253
+/**
+ * @file
*
+ * @brief Set Scheduling Parameters
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -19,6 +24,9 @@
#include <rtems/system.h>
#include <rtems/seterr.h>
+/**
+ * 13.3.2 Set Scheduling Parameters, P1003.1b-1993, p. 253
+ */
int sched_getparam(
pid_t pid __attribute__((unused)),
struct sched_param *param __attribute__((unused))
diff --git a/cpukit/posix/src/sched_getprioritymax.c b/cpukit/posix/src/sched_getprioritymax.c
index a85f02b250..5a77e258f1 100644
--- a/cpukit/posix/src/sched_getprioritymax.c
+++ b/cpukit/posix/src/sched_getprioritymax.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Returns the Appropriate Maximum for Scheduling policy
+ * @ingroup POSIX
+ */
+
/*
* 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
*
diff --git a/cpukit/posix/src/sched_getprioritymin.c b/cpukit/posix/src/sched_getprioritymin.c
index ed5737e1bc..73d892de47 100644
--- a/cpukit/posix/src/sched_getprioritymin.c
+++ b/cpukit/posix/src/sched_getprioritymin.c
@@ -1,6 +1,11 @@
-/*
- * 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
+/**
+ * @file
*
+ * @brief Get the Minimum Priority Limit
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -20,6 +25,9 @@
#include <rtems/seterr.h>
#include <rtems/posix/priority.h>
+/**
+ * 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
+ */
int sched_get_priority_min(
int policy
)
diff --git a/cpukit/posix/src/sched_getscheduler.c b/cpukit/posix/src/sched_getscheduler.c
index 755b38e2a6..6f12cd7868 100644
--- a/cpukit/posix/src/sched_getscheduler.c
+++ b/cpukit/posix/src/sched_getscheduler.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Returns Scheduling Policy of the process specified by pid
+ * @ingroup POSIX
+ */
+
/*
* 13.3.4 Get Scheduling Policy, P1003.1b-1993, p. 256
*
diff --git a/cpukit/posix/src/sched_rr_get_interval.c b/cpukit/posix/src/sched_rr_get_interval.c
index 5fb2774ccf..b73f60f229 100644
--- a/cpukit/posix/src/sched_rr_get_interval.c
+++ b/cpukit/posix/src/sched_rr_get_interval.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Limits for Scheduling Parameter
+ * @ingroup POSIX
+ */
+
/*
* 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
*
diff --git a/cpukit/posix/src/sched_setparam.c b/cpukit/posix/src/sched_setparam.c
index d31a29fa14..8e894e0978 100644
--- a/cpukit/posix/src/sched_setparam.c
+++ b/cpukit/posix/src/sched_setparam.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Sets Scheduling Parameters Associated with Scheduling Policies
+ * @ingroup POSIX
+ */
+
/*
* 13.3.1 Set Scheduling Parameters, P1003.1b-1993, p. 252
*
diff --git a/cpukit/posix/src/sched_setscheduler.c b/cpukit/posix/src/sched_setscheduler.c
index fcbc8fd3fd..f9b5c3f562 100644
--- a/cpukit/posix/src/sched_setscheduler.c
+++ b/cpukit/posix/src/sched_setscheduler.c
@@ -1,7 +1,11 @@
-/*
- * 13.3.3 Set Scheduling Policy and Scheduling Parameters,
- * P1003.1b-1993, p. 254
+/**
+ * @file
*
+ * @brief Set Scheduling Policy and Scheduling Parameters
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/sched_yield.c b/cpukit/posix/src/sched_yield.c
index b2d61c53ce..1aa4713a85 100644
--- a/cpukit/posix/src/sched_yield.c
+++ b/cpukit/posix/src/sched_yield.c
@@ -1,6 +1,11 @@
-/*
- * 13.3.5 Yield Processor, P1003.1b-1993, p. 257
+/**
+ * @file
*
+ * @brief Yield Processor
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/semaphore.c b/cpukit/posix/src/semaphore.c
index a64fe81206..b214a3c302 100644
--- a/cpukit/posix/src/semaphore.c
+++ b/cpukit/posix/src/semaphore.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Function Initializes Semaphore Manager
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/semaphorecreatesupp.c b/cpukit/posix/src/semaphorecreatesupp.c
index 6460da8526..18fef72a03 100644
--- a/cpukit/posix/src/semaphorecreatesupp.c
+++ b/cpukit/posix/src/semaphorecreatesupp.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function does Actual creation and Initialization of POSIX Semaphore
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/semaphoredeletesupp.c b/cpukit/posix/src/semaphoredeletesupp.c
index 433c23cc7a..a24adef870 100644
--- a/cpukit/posix/src/semaphoredeletesupp.c
+++ b/cpukit/posix/src/semaphoredeletesupp.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Delete Semaphore
+ * @ingroup POSIX_SEMAPHORE
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -25,10 +32,6 @@
#include <rtems/posix/time.h>
#include <rtems/seterr.h>
-/*
- * _POSIX_Semaphore_Delete
- */
-
void _POSIX_Semaphore_Delete(
POSIX_Semaphore_Control *the_semaphore
)
diff --git a/cpukit/posix/src/semaphoretranslatereturncode.c b/cpukit/posix/src/semaphoretranslatereturncode.c
index 2f1af1dd1b..2c54b9fb49 100644
--- a/cpukit/posix/src/semaphoretranslatereturncode.c
+++ b/cpukit/posix/src/semaphoretranslatereturncode.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Semaphore Code Translation Error
+ * @ingroup POSIX
+ */
+
/*
* POSIX Semaphore Error Translation
*
diff --git a/cpukit/posix/src/semaphorewaitsupp.c b/cpukit/posix/src/semaphorewaitsupp.c
index 2ad1efe5af..5b215dad23 100644
--- a/cpukit/posix/src/semaphorewaitsupp.c
+++ b/cpukit/posix/src/semaphorewaitsupp.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Semaphore Wait Support
+ * @ingroup POSIX_SEMAPHORES Semaphore
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/semclose.c b/cpukit/posix/src/semclose.c
index 3913cd57fb..a9521bdd6b 100644
--- a/cpukit/posix/src/semclose.c
+++ b/cpukit/posix/src/semclose.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Close a Named Semaphore
+ * @ingroup POSIX_SEMAPHORE
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -25,15 +32,6 @@
#include <rtems/posix/time.h>
#include <rtems/seterr.h>
-
-/*
- * sem_close
- *
- * Routine to close a semaphore that has been opened or initialized.
- *
- * 11.2.4 Close a Named Semaphore, P1003.1b-1993, p.224
- */
-
int sem_close(
sem_t *sem
)
diff --git a/cpukit/posix/src/semdestroy.c b/cpukit/posix/src/semdestroy.c
index b2a03f5ff7..14ba520fa3 100644
--- a/cpukit/posix/src/semdestroy.c
+++ b/cpukit/posix/src/semdestroy.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Destroy an Unnamed Semaphore
+ * @ingroup POSIX_SEMAPHORE
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -25,10 +32,6 @@
#include <rtems/posix/time.h>
#include <rtems/seterr.h>
-/*
- * 11.2.2 Destroy an Unnamed Semaphore, P1003.1b-1993, p.220
- */
-
int sem_destroy(
sem_t *sem
)
diff --git a/cpukit/posix/src/semgetvalue.c b/cpukit/posix/src/semgetvalue.c
index 7b21c82df9..8ea0bdad07 100644
--- a/cpukit/posix/src/semgetvalue.c
+++ b/cpukit/posix/src/semgetvalue.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get the Value of a Semaphore
+ * @ingroup POSIX_SEMAPHORE
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -25,10 +32,6 @@
#include <rtems/posix/time.h>
#include <rtems/seterr.h>
-/*
- * 11.2.8 Get the Value of a Semaphore, P1003.1b-1993, p.229
- */
-
int sem_getvalue(
sem_t *sem,
int *sval
diff --git a/cpukit/posix/src/seminit.c b/cpukit/posix/src/seminit.c
index 42dd0405d1..be7056dcad 100644
--- a/cpukit/posix/src/seminit.c
+++ b/cpukit/posix/src/seminit.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Initializing of an Unnamed Semaphore
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/semopen.c b/cpukit/posix/src/semopen.c
index 3354369936..1ecd75105b 100644
--- a/cpukit/posix/src/semopen.c
+++ b/cpukit/posix/src/semopen.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Creates New POSIX semaphore or Opens an existing Semaphore
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/sempost.c b/cpukit/posix/src/sempost.c
index e1d6221ad7..7ce367986f 100644
--- a/cpukit/posix/src/sempost.c
+++ b/cpukit/posix/src/sempost.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Unlock a Semaphore
+ * @ingroup POSIX_SEMAPHORE
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -25,10 +32,6 @@
#include <rtems/posix/time.h>
#include <rtems/seterr.h>
-/*
- * 11.2.7 Unlock a Semaphore, P1003.1b-1993, p.227
- */
-
int sem_post(
sem_t *sem
)
diff --git a/cpukit/posix/src/semtimedwait.c b/cpukit/posix/src/semtimedwait.c
index 33008366f5..9f54ad3add 100644
--- a/cpukit/posix/src/semtimedwait.c
+++ b/cpukit/posix/src/semtimedwait.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Lock a Semaphore
+ * @ingroup POSIX_SEMAPHORE POSIX Semaphores Support
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/semtrywait.c b/cpukit/posix/src/semtrywait.c
index e8c4e7689b..b80e515afd 100644
--- a/cpukit/posix/src/semtrywait.c
+++ b/cpukit/posix/src/semtrywait.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Lock a Semaphore
+ * @ingroup POSIX_SEMAPHORE
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
@@ -25,12 +32,6 @@
#include <rtems/posix/time.h>
#include <rtems/seterr.h>
-/*
- * 11.2.6 Lock a Semaphore, P1003.1b-1993, p.226
- *
- * NOTE: P1003.4b/D8 adds sem_timedwait(), p. 27
- */
-
int sem_trywait(
sem_t *sem
)
diff --git a/cpukit/posix/src/semunlink.c b/cpukit/posix/src/semunlink.c
index 16c9525e3f..c34add8131 100644
--- a/cpukit/posix/src/semunlink.c
+++ b/cpukit/posix/src/semunlink.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Remove a Named Semaphore
+ * @ingroup POSIX_SEMAPHORE
+ */
+
/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
@@ -25,15 +32,6 @@
#include <rtems/posix/time.h>
#include <rtems/seterr.h>
-/*
- * sem_unlink
- *
- * Unlinks a named semaphore, sem_close must also be called to remove
- * the semaphore.
- *
- * 11.2.5 Remove a Named Semaphore, P1003.1b-1993, p.225
- */
-
int sem_unlink(
const char *name
)
diff --git a/cpukit/posix/src/semwait.c b/cpukit/posix/src/semwait.c
index 32b896a4df..16fc9076d4 100644
--- a/cpukit/posix/src/semwait.c
+++ b/cpukit/posix/src/semwait.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Lock a Semaphore
+ * @ingroup POSIX_SEMAPHORE
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
@@ -25,12 +32,6 @@
#include <rtems/posix/time.h>
#include <rtems/seterr.h>
-/*
- * 11.2.6 Lock a Semaphore, P1003.1b-1993, p.226
- *
- * NOTE: P1003.4b/D8 adds sem_timedwait(), p. 27
- */
-
int sem_wait(
sem_t *sem
)
diff --git a/cpukit/posix/src/setcanceltype.c b/cpukit/posix/src/setcanceltype.c
index c0278dd10a..6a82374229 100644
--- a/cpukit/posix/src/setcanceltype.c
+++ b/cpukit/posix/src/setcanceltype.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Sets the Cancelability Type of Calling Thread to value given in type
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/setitimer.c b/cpukit/posix/src/setitimer.c
index 7a40419463..f8ab9efa56 100644
--- a/cpukit/posix/src/setitimer.c
+++ b/cpukit/posix/src/setitimer.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Set the Timer
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/sigaction.c b/cpukit/posix/src/sigaction.c
index 9fb04a042d..b2906558e0 100644
--- a/cpukit/posix/src/sigaction.c
+++ b/cpukit/posix/src/sigaction.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Allows calling process to examine action of a Specific Signal
+ * @ingroup POSIX
+ */
+
/*
* 3.3.4 Examine and Change Signal Action, P1003.1b-1993, p. 70
*
diff --git a/cpukit/posix/src/sigaddset.c b/cpukit/posix/src/sigaddset.c
index dac1cda520..d4e324fe5e 100644
--- a/cpukit/posix/src/sigaddset.c
+++ b/cpukit/posix/src/sigaddset.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Adds Signal from Set
+ * @ingroup POSIX
+ */
+
/*
* 3.3.3 Manipulate Signal Sets, P1003.1b-1993, p. 69
*
diff --git a/cpukit/posix/src/sigdelset.c b/cpukit/posix/src/sigdelset.c
index a559e64bbb..7567689ccd 100644
--- a/cpukit/posix/src/sigdelset.c
+++ b/cpukit/posix/src/sigdelset.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Deleted Signal from Set
+ * @ingroup POSIX
+ */
+
/*
* 3.3.3 Manipulate Signal Sets, P1003.1b-1993, p. 69
*
diff --git a/cpukit/posix/src/sigfillset.c b/cpukit/posix/src/sigfillset.c
index 75b0ede57e..32b1ef15d0 100644
--- a/cpukit/posix/src/sigfillset.c
+++ b/cpukit/posix/src/sigfillset.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/sigismember.c b/cpukit/posix/src/sigismember.c
index 545df3ec28..5591085af4 100644
--- a/cpukit/posix/src/sigismember.c
+++ b/cpukit/posix/src/sigismember.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/signal_2.c b/cpukit/posix/src/signal_2.c
index b1bf93cc79..75f13d8f92 100644
--- a/cpukit/posix/src/signal_2.c
+++ b/cpukit/posix/src/signal_2.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief POSIX Function Installs signal Handler
+ * @ingroup POSIX
+ */
+
/*
* signal(2) - Install signal handler
*
diff --git a/cpukit/posix/src/sigprocmask.c b/cpukit/posix/src/sigprocmask.c
index 26435f7c03..464343bab0 100644
--- a/cpukit/posix/src/sigprocmask.c
+++ b/cpukit/posix/src/sigprocmask.c
@@ -1,8 +1,11 @@
-/*
- * 3.3.5 Examine and Change Blocked Signals, P1003.1b-1993, p. 73
- *
- * NOTE: P1003.1c/D10, p. 37 adds pthread_sigmask().
+/**
+ * @file
*
+ * @brief Examine and Change Blocked Signals
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -18,6 +21,11 @@
#include <pthread.h>
#include <signal.h>
+/**
+ * 3.3.5 Examine and Change Blocked Signals, P1003.1b-1993, p. 73
+ *
+ * NOTE: P1003.1c/D10, p. 37 adds pthread_sigmask().
+ */
int sigprocmask(
int how,
const sigset_t *set,
diff --git a/cpukit/posix/src/sigqueue.c b/cpukit/posix/src/sigqueue.c
index b1f6cee67e..8b65aba0cb 100644
--- a/cpukit/posix/src/sigqueue.c
+++ b/cpukit/posix/src/sigqueue.c
@@ -1,6 +1,11 @@
-/*
- * 3.3.9 Queue a Signal to a Process, P1003.1b-1993, p. 78
+/**
+ * @file
*
+ * @brief Queue a Signal to a Process
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/sigsuspend.c b/cpukit/posix/src/sigsuspend.c
index f84d11f119..b1f1c4cc77 100644
--- a/cpukit/posix/src/sigsuspend.c
+++ b/cpukit/posix/src/sigsuspend.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Replacing signal mask with *sigmask and suspending calling process
+ * @ingroup POSIX
+ */
+
/*
* 3.3.7 Wait for a Signal, P1003.1b-1993, p. 75
*
diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c
index 1f23356056..b350a2cc33 100644
--- a/cpukit/posix/src/sigtimedwait.c
+++ b/cpukit/posix/src/sigtimedwait.c
@@ -1,6 +1,11 @@
-/*
- * 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76
+/**
+ * @file
*
+ * @brief Wait for Queued Signals
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
@@ -58,6 +63,9 @@ found_it:
return signo;
}
+/**
+ * 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76
+ */
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
diff --git a/cpukit/posix/src/sigwait.c b/cpukit/posix/src/sigwait.c
index cfb733034b..24afa80602 100644
--- a/cpukit/posix/src/sigwait.c
+++ b/cpukit/posix/src/sigwait.c
@@ -1,8 +1,11 @@
-/*
- * 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76
- *
- * NOTE: P1003.1c/D10, p. 39 adds sigwait().
+/**
+ * @file
*
+ * @brief Synchronously Accept a Signal
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/sigwaitinfo.c b/cpukit/posix/src/sigwaitinfo.c
index 0b2045bcad..4538f5df07 100644
--- a/cpukit/posix/src/sigwaitinfo.c
+++ b/cpukit/posix/src/sigwaitinfo.c
@@ -1,3 +1,9 @@
+/**
+ * @file
+ *
+ * @brief Suspends Execution of Calling Thread until Signals in set Deleivered
+ */
+
/*
* 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76
*
diff --git a/cpukit/posix/src/testcancel.c b/cpukit/posix/src/testcancel.c
index 400ab7efe5..6228af6165 100644
--- a/cpukit/posix/src/testcancel.c
+++ b/cpukit/posix/src/testcancel.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Setting test on Cancelability State
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/timerdelete.c b/cpukit/posix/src/timerdelete.c
index 89cfe2f056..473c0df3fe 100644
--- a/cpukit/posix/src/timerdelete.c
+++ b/cpukit/posix/src/timerdelete.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Deletes a POSIX Interval Timer
+ * @ingroup POSIX
+ */
+
/*
* 14.2.3 Delete a Per_process Timer, P1003.1b-1993, p. 266
*
diff --git a/cpukit/posix/src/timergetoverrun.c b/cpukit/posix/src/timergetoverrun.c
index 9403d02f5c..23a4e6f3fe 100644
--- a/cpukit/posix/src/timergetoverrun.c
+++ b/cpukit/posix/src/timergetoverrun.c
@@ -1,6 +1,11 @@
-/*
- * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
+/**
+ * @file
*
+ * @brief Get Overrun Count for a POSIX Per-Process Timer
+ * @ingroup POSIX_PRIV_TIMERS
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
@@ -21,13 +26,6 @@
#include <rtems/score/thread.h>
#include <rtems/posix/timer.h>
-/*
- * timer_getoverrun
- *
- * The expiration of a timer must increase by one a counter.
- * After the signal handler associated to the timer finishes
- * its execution, _POSIX_Timer_TSR will have to set this counter to 0.
- */
int timer_getoverrun(
timer_t timerid
)
diff --git a/cpukit/posix/src/timergettime.c b/cpukit/posix/src/timergettime.c
index 3aa63e32f7..823989a4e4 100644
--- a/cpukit/posix/src/timergettime.c
+++ b/cpukit/posix/src/timergettime.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Fetches State of POSIX Per-Process Timers
+ * @ingroup POSIX
+ */
+
/*
* 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
*
diff --git a/cpukit/posix/src/timerinserthelper.c b/cpukit/posix/src/timerinserthelper.c
index 9e2aa6a437..a1726770d9 100644
--- a/cpukit/posix/src/timerinserthelper.c
+++ b/cpukit/posix/src/timerinserthelper.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Helper Routine for POSIX TIMERS
+ * @ingroup POSIX
+ */
+
/*
* Helper routine for POSIX timers
*
diff --git a/cpukit/posix/src/timersettime.c b/cpukit/posix/src/timersettime.c
index b0c3061023..00cce57b59 100644
--- a/cpukit/posix/src/timersettime.c
+++ b/cpukit/posix/src/timersettime.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Function Arms or Disarms the Timer Identified by timerid
+ * @ingroup POSIX
+ */
+
/*
* 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
*
diff --git a/cpukit/posix/src/ualarm.c b/cpukit/posix/src/ualarm.c
index 2a2f975d67..34ab0a41cc 100644
--- a/cpukit/posix/src/ualarm.c
+++ b/cpukit/posix/src/ualarm.c
@@ -1,6 +1,11 @@
-/*
- * 3.4.1 Schedule Alarm, P1003.1b-1993, p. 79
+/**
+ * @file
*
+ * @brief Schedule Alarm
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/vfork.c b/cpukit/posix/src/vfork.c
index 64838c8d87..3bb0f31b83 100644
--- a/cpukit/posix/src/vfork.c
+++ b/cpukit/posix/src/vfork.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Creates Child process Of The Calling process
+ * @ingroup POSIX
+ */
+
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/posix/src/wait.c b/cpukit/posix/src/wait.c
index 1984c47741..8e48af71d6 100644
--- a/cpukit/posix/src/wait.c
+++ b/cpukit/posix/src/wait.c
@@ -1,6 +1,11 @@
-/*
- * waitpid() - POSIX 1003.1b 3.2.1
+/**
+ * @file
*
+ * @brief Wait for Process to Change State
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/posix/src/waitpid.c b/cpukit/posix/src/waitpid.c
index 0ae199156f..03e4f7d731 100644
--- a/cpukit/posix/src/waitpid.c
+++ b/cpukit/posix/src/waitpid.c
@@ -1,6 +1,11 @@
-/*
- * waitpid() - POSIX 1003.1 3.2.1
+/**
+ * @file
*
+ * @brief Wait for Process to Change State
+ * @ingroup POSIX
+ */
+
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/sapi/include/rtems/io.h b/cpukit/sapi/include/rtems/io.h
index f4e7d49edc..2a268fa51e 100644
--- a/cpukit/sapi/include/rtems/io.h
+++ b/cpukit/sapi/include/rtems/io.h
@@ -4,6 +4,9 @@
* @ingroup ClassicIO
*
* @brief Classic Input/Output Manager API.
+ *
+ * This file emulates the old Classic RTEMS IO manager directives
+ * which register and lookup names using the in-memory filesystem.
*/
/*
@@ -115,9 +118,11 @@ rtems_status_code rtems_io_unregister_driver(
/**
* @brief Registers the name @a device_name in the file system for the device
* with number tuple @a major and @a minor.
+ *
+ * This assumes that all registered devices are character devices.
*
* @retval RTEMS_SUCCESSFUL Name successfully registered.
- * @retval RTEMS_TOO_MANY Name already in use or other errors.
+ * @retval RTEMS_TOO_MANY Name already in use or other errors.
*/
rtems_status_code rtems_io_register_name(
const char *device_name,
diff --git a/cpukit/score/include/rtems/score/heap.h b/cpukit/score/include/rtems/score/heap.h
index 36ef48f3b6..f3d259d6cf 100644
--- a/cpukit/score/include/rtems/score/heap.h
+++ b/cpukit/score/include/rtems/score/heap.h
@@ -558,7 +558,7 @@ bool _Heap_Free( Heap_Control *heap, void *addr );
* If @a dump is @c true, then diagnostic messages will be printed to standard
* output. In this case @a source is used to mark the output lines.
*
- * Returns @c true if no errors occured, and @c false if the heap is corrupt.
+ * Returns @c true if no errors occurred, and @c false if the heap is corrupt.
*/
bool _Heap_Walk(
Heap_Control *heap,
diff --git a/cpukit/score/inline/rtems/score/rbtree.inl b/cpukit/score/inline/rtems/score/rbtree.inl
index c5187a02ae..439b40a0ba 100644
--- a/cpukit/score/inline/rtems/score/rbtree.inl
+++ b/cpukit/score/inline/rtems/score/rbtree.inl
@@ -221,7 +221,7 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Has_only_one_node(
const RBTree_Control *the_rbtree
)
{
- if(!the_rbtree) return NULL; /* TODO: expected behavior? */
+ if(!the_rbtree) return false; /* TODO: expected behavior? */
return (the_rbtree->root->child[RBT_LEFT] == NULL && the_rbtree->root->child[RBT_RIGHT] == NULL);
}
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index 119774277b..f6f1b0d5a6 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -1,6 +1,7 @@
ACLOCAL_AMFLAGS = -I ../aclocal
SUBDIRS = POSIX
+SUBDIRS += md501
SUBDIRS += sparsedisk01
SUBDIRS += block16
SUBDIRS += block15
diff --git a/testsuites/libtests/configure.ac b/testsuites/libtests/configure.ac
index b8be927f47..b07b9bc3df 100644
--- a/testsuites/libtests/configure.ac
+++ b/testsuites/libtests/configure.ac
@@ -43,6 +43,7 @@ AM_CONDITIONAL(HAS_POSIX,test x"${rtems_cv_RTEMS_POSIX_API}" = x"yes")
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
+md501/Makefile
sparsedisk01/Makefile
block16/Makefile
mghttpd01/Makefile
diff --git a/testsuites/libtests/md501/Makefile.am b/testsuites/libtests/md501/Makefile.am
new file mode 100644
index 0000000000..5751738069
--- /dev/null
+++ b/testsuites/libtests/md501/Makefile.am
@@ -0,0 +1,19 @@
+rtems_tests_PROGRAMS = md501
+md501_SOURCES = init.c
+
+dist_rtems_tests_DATA = md501.scn md501.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(md501_OBJECTS)
+LINK_LIBS = $(md501_LDLIBS)
+
+md501$(EXEEXT): $(md501_OBJECTS) $(md501_DEPENDENCIES)
+ @rm -f md501$(EXEEXT)
+ $(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/libtests/md501/init.c b/testsuites/libtests/md501/init.c
new file mode 100644
index 0000000000..cf888fba05
--- /dev/null
+++ b/testsuites/libtests/md501/init.c
@@ -0,0 +1,254 @@
+/*
+ * Copyright (c) 2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include "tmacros.h"
+
+#include <md5.h>
+
+#ifndef MD5_BLOCK_SIZE
+ #define MD5_BLOCK_SIZE 64
+#endif
+
+#ifndef MD5_DIGEST_LENGTH
+ #define MD5_DIGEST_LENGTH 16
+#endif
+
+/* Test cases according to RFC 2202 */
+
+static const uint8_t key_1[] = {
+ 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
+ 0x0b, 0x0b, 0x0b
+};
+
+static const uint8_t data_1[] = {
+ 'H', 'i', ' ', 'T', 'h', 'e', 'r', 'e'
+};
+
+static const uint8_t digest_1[MD5_DIGEST_LENGTH] = {
+ 0x92, 0x94, 0x72, 0x7a, 0x36, 0x38, 0xbb, 0x1c, 0x13, 0xf4, 0x8e, 0xf8, 0x15,
+ 0x8b, 0xfc, 0x9d
+};
+
+static const uint8_t key_2[] = {
+ 'J', 'e', 'f', 'e'
+};
+
+static const uint8_t data_2[] = {
+ 'w', 'h', 'a', 't', ' ', 'd', 'o', ' ', 'y', 'a', ' ', 'w', 'a', 'n', 't',
+ ' ', 'f', 'o', 'r', ' ', 'n', 'o', 't', 'h', 'i', 'n', 'g', '?'
+};
+
+static const uint8_t digest_2[MD5_DIGEST_LENGTH] = {
+ 0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03, 0xea, 0xa8, 0x6e, 0x31, 0x0a,
+ 0x5d, 0xb7, 0x38
+};
+
+static const uint8_t key_3[] = {
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa, 0xaa
+};
+
+static const uint8_t data_3[] = {
+ 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+ 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+ 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
+ 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd
+};
+
+static const uint8_t digest_3[MD5_DIGEST_LENGTH] = {
+ 0x56, 0xbe, 0x34, 0x52, 0x1d, 0x14, 0x4c, 0x88, 0xdb, 0xb8, 0xc7, 0x33, 0xf0,
+ 0xe8, 0xb3, 0xf6
+};
+
+static const uint8_t key_4[] = {
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,
+ 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19
+};
+
+static const uint8_t data_4[] = {
+ 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+ 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+ 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
+ 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd
+};
+
+static const uint8_t digest_4[MD5_DIGEST_LENGTH] = {
+ 0x69, 0x7e, 0xaf, 0x0a, 0xca, 0x3a, 0x3a, 0xea, 0x3a, 0x75, 0x16, 0x47, 0x46,
+ 0xff, 0xaa, 0x79
+};
+
+static const uint8_t key_5[] = {
+ 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
+ 0x0c, 0x0c, 0x0c
+};
+
+static const uint8_t data_5[] = {
+ 'T', 'e', 's', 't', ' ', 'W', 'i', 't', 'h', ' ', 'T', 'r', 'u', 'n', 'c',
+ 'a', 't', 'i', 'o', 'n'
+};
+
+static const uint8_t digest_5[MD5_DIGEST_LENGTH] = {
+ 0x56, 0x46, 0x1e, 0xf2, 0x34, 0x2e, 0xdc, 0x00, 0xf9, 0xba, 0xb9, 0x95, 0x69,
+ 0x0e, 0xfd, 0x4c
+};
+
+static const uint8_t key_6[] = {
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa
+};
+
+static const uint8_t data_6[] = {
+ 'T', 'e', 's', 't', ' ', 'U', 's', 'i', 'n', 'g', ' ', 'L', 'a', 'r', 'g',
+ 'e', 'r', ' ', 'T', 'h', 'a', 'n', ' ', 'B', 'l', 'o', 'c', 'k', '-', 'S',
+ 'i', 'z', 'e', ' ', 'K', 'e', 'y', ' ', '-', ' ', 'H', 'a', 's', 'h', ' ',
+ 'K', 'e', 'y', ' ', 'F', 'i', 'r', 's', 't'
+};
+
+static const uint8_t digest_6[MD5_DIGEST_LENGTH] = {
+ 0x6b, 0x1a, 0xb7, 0xfe, 0x4b, 0xd7, 0xbf, 0x8f, 0x0b, 0x62, 0xe6, 0xce, 0x61,
+ 0xb9, 0xd0, 0xcd
+};
+
+static const uint8_t key_7[] = {
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
+ 0xaa, 0xaa
+};
+
+static const uint8_t data_7[] = {
+ 'T', 'e', 's', 't', ' ', 'U', 's', 'i', 'n', 'g', ' ', 'L', 'a', 'r', 'g',
+ 'e', 'r', ' ', 'T', 'h', 'a', 'n', ' ', 'B', 'l', 'o', 'c', 'k', '-', 'S',
+ 'i', 'z', 'e', ' ', 'K', 'e', 'y', ' ', 'a', 'n', 'd', ' ', 'L', 'a', 'r',
+ 'g', 'e', 'r', ' ', 'T', 'h', 'a', 'n', ' ', 'O', 'n', 'e', ' ', 'B', 'l',
+ 'o', 'c', 'k', '-', 'S', 'i', 'z', 'e', ' ', 'D', 'a', 't', 'a'
+};
+
+static const uint8_t digest_7[MD5_DIGEST_LENGTH] = {
+ 0x6f, 0x63, 0x0f, 0xad, 0x67, 0xcd, 0xa0, 0xee, 0x1f, 0xb1, 0xf5, 0x62, 0xdb,
+ 0x3a, 0xa5, 0x3e
+};
+
+static void test_md5(
+ const uint8_t *key,
+ size_t key_size,
+ const uint8_t *data,
+ size_t data_size,
+ const uint8_t expected_digest[MD5_DIGEST_LENGTH]
+)
+{
+ MD5_CTX inner_ctx;
+ MD5_CTX outer_ctx;
+ uint8_t inner_digest[MD5_DIGEST_LENGTH];
+ uint8_t outer_digest[MD5_DIGEST_LENGTH];
+ uint8_t key_buf[MD5_DIGEST_LENGTH];
+ uint8_t buf[MD5_BLOCK_SIZE];
+ size_t i;
+
+ if (key_size > MD5_BLOCK_SIZE) {
+ MD5_CTX tmp_ctx;
+
+ MD5Init(&tmp_ctx);
+ MD5Update(&tmp_ctx, key, key_size);
+ MD5Final(&key_buf[0], &tmp_ctx);
+
+ key = &key_buf[0];
+ key_size = MD5_DIGEST_LENGTH;
+ }
+
+ /* Inner digest */
+
+ MD5Init(&inner_ctx);
+
+ /* Pad the key for the inner digest */
+ for (i = 0; i < key_size; ++i) {
+ buf[i] = key[i] ^ 0x36;
+ }
+ for (i = key_size; i < MD5_BLOCK_SIZE; ++i) {
+ buf[i] = 0x36;
+ }
+
+ MD5Update(&inner_ctx, &buf[0], MD5_BLOCK_SIZE);
+ MD5Update(&inner_ctx, data, data_size);
+
+ MD5Final(&inner_digest[0], &inner_ctx);
+
+ /* Outer digest */
+
+ MD5Init(&outer_ctx);
+
+ /* Pad the key for outer digest */
+ for (i = 0; i < key_size; ++i) {
+ buf[i] = key[i] ^ 0x5c;
+ }
+ for (i = key_size; i < MD5_BLOCK_SIZE; ++i) {
+ buf[i] = 0x5c;
+ }
+
+ MD5Update(&outer_ctx, &buf[0], MD5_BLOCK_SIZE);
+ MD5Update(&outer_ctx, &inner_digest[0], MD5_DIGEST_LENGTH);
+
+ MD5Final(&outer_digest[0], &outer_ctx);
+
+ rtems_test_assert(
+ memcmp(&outer_digest[0], expected_digest, sizeof(outer_digest)) == 0
+ );
+}
+
+static void test(void)
+{
+ test_md5(&key_1[0], sizeof(key_1), &data_1[0], sizeof(data_1), &digest_1[0]);
+ test_md5(&key_2[0], sizeof(key_2), &data_2[0], sizeof(data_2), &digest_2[0]);
+ test_md5(&key_3[0], sizeof(key_3), &data_3[0], sizeof(data_3), &digest_3[0]);
+ test_md5(&key_4[0], sizeof(key_4), &data_4[0], sizeof(data_4), &digest_4[0]);
+ test_md5(&key_5[0], sizeof(key_5), &data_5[0], sizeof(data_5), &digest_5[0]);
+ test_md5(&key_6[0], sizeof(key_6), &data_6[0], sizeof(data_6), &digest_6[0]);
+ test_md5(&key_7[0], sizeof(key_7), &data_7[0], sizeof(data_7), &digest_7[0]);
+}
+
+static void Init(rtems_task_argument arg)
+{
+ puts("\n\n*** TEST MD5 1 ***");
+
+ test();
+
+ puts("*** END OF TEST MD5 1 ***");
+
+ rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/libtests/md501/md501.doc b/testsuites/libtests/md501/md501.doc
new file mode 100644
index 0000000000..62936e7243
--- /dev/null
+++ b/testsuites/libtests/md501/md501.doc
@@ -0,0 +1,14 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: md501
+
+directives:
+
+ - MD5Init
+ - MD5Update
+ - MD5Final
+
+concepts:
+
+ - Ensures that the MD5 digest is calucated correctly for a sample data set.
+ - Test cases are from RFC 2202.
diff --git a/testsuites/libtests/md501/md501.scn b/testsuites/libtests/md501/md501.scn
new file mode 100644
index 0000000000..3a7d31819f
--- /dev/null
+++ b/testsuites/libtests/md501/md501.scn
@@ -0,0 +1,2 @@
+*** TEST MD5 1 ***
+*** END OF TEST MD5 1 ***