diff options
Diffstat (limited to 'cpukit/libcsupport/src')
115 files changed, 1006 insertions, 385 deletions
diff --git a/cpukit/libcsupport/src/__assert.c b/cpukit/libcsupport/src/__assert.c index 07af01bc40..be0fa6c2e9 100644 --- a/cpukit/libcsupport/src/__assert.c +++ b/cpukit/libcsupport/src/__assert.c @@ -1,5 +1,11 @@ -/* __assert - small RTEMS Specific Implementation +/** + * @file * + * @brief Evaluate Assertion + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 2007. * On-Line Applications Research Corporation (OAR). * @@ -16,7 +22,8 @@ #include <rtems.h> #if defined(RTEMS_NEWLIB) && !defined(HAVE___ASSERT_FUNC) -/* + +/** * Newlib 1.16.0 added this method. Together these provide an * RTEMS safe, low memory implementation. */ @@ -39,6 +46,10 @@ void __assert_func( #endif #if defined(RTEMS_NEWLIB) && !defined(HAVE___ASSERT) + +/** + * small RTEMS Specific Implementation + */ void __assert( const char *file, int line, diff --git a/cpukit/libcsupport/src/__getpid.c b/cpukit/libcsupport/src/__getpid.c index 932a4f170a..96e1a3f813 100644 --- a/cpukit/libcsupport/src/__getpid.c +++ b/cpukit/libcsupport/src/__getpid.c @@ -1,6 +1,8 @@ -/* - * Some C Libraries reference this routine since they think getpid is - * a real system call. +/** + * @file + * + * @brief Get Process Id + * @ingroup libcsupport */ #if HAVE_CONFIG_H @@ -9,6 +11,10 @@ #include <unistd.h> +/** + * Some C Libraries reference this routine since they think getpid is + * a real system call. + */ pid_t __getpid(void) { return getpid(); diff --git a/cpukit/libcsupport/src/__usrenv.c b/cpukit/libcsupport/src/__usrenv.c index 6a793755ab..a0d96cb7eb 100644 --- a/cpukit/libcsupport/src/__usrenv.c +++ b/cpukit/libcsupport/src/__usrenv.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief RTEMS File System Location Support + * @ingroup LibIOInternal + */ + /* * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). diff --git a/cpukit/libcsupport/src/_calloc_r.c b/cpukit/libcsupport/src/_calloc_r.c index 391643cf63..c86d3604b3 100644 --- a/cpukit/libcsupport/src/_calloc_r.c +++ b/cpukit/libcsupport/src/_calloc_r.c @@ -1,6 +1,11 @@ -/* - * _calloc_r Implementation +/** + * @file * + * @brief Allocate Space for Array in Memory + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/_free_r.c b/cpukit/libcsupport/src/_free_r.c index 22f99ae260..411cb2b3ce 100644 --- a/cpukit/libcsupport/src/_free_r.c +++ b/cpukit/libcsupport/src/_free_r.c @@ -1,6 +1,11 @@ -/* - * _free_r Implementation +/** + * @file * + * @brief Allocate and Free Dynamic Memory + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/_rename_r.c b/cpukit/libcsupport/src/_rename_r.c index c501472fc1..183717fc1d 100644 --- a/cpukit/libcsupport/src/_rename_r.c +++ b/cpukit/libcsupport/src/_rename_r.c @@ -1,6 +1,11 @@ -/* - * _rename_r() - POSIX 1003.1b - 5.3.4 - Rename a file +/** + * @file * + * @brief Rename a File + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * @@ -22,6 +27,9 @@ #include <rtems/libio_.h> +/** + * POSIX 1003.1b - 5.3.4 - Rename a file + */ int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, diff --git a/cpukit/libcsupport/src/assoclocalbyremote.c b/cpukit/libcsupport/src/assoclocalbyremote.c index 6146fd32ca..24a86d82c7 100644 --- a/cpukit/libcsupport/src/assoclocalbyremote.c +++ b/cpukit/libcsupport/src/assoclocalbyremote.c @@ -1,6 +1,8 @@ -/* - * assoc.c - * rtems assoc routines +/** + * @file + * + * @brief RTEMS Associate Local by Remote + * @ingroup Associativity */ #if HAVE_CONFIG_H diff --git a/cpukit/libcsupport/src/assocnamebad.c b/cpukit/libcsupport/src/assocnamebad.c index 375aabc35c..7977f88949 100644 --- a/cpukit/libcsupport/src/assocnamebad.c +++ b/cpukit/libcsupport/src/assocnamebad.c @@ -1,6 +1,8 @@ -/* - * assoc.c - * rtems assoc routines +/** + * @file + * + * @brief RTEMS Associate Bad Name + * @ingroup SET */ #if HAVE_CONFIG_H @@ -15,11 +17,6 @@ #include <inttypes.h> #include <stdio.h> /* sprintf */ -/* - * what to return if a value is not found - * this is not reentrant, but it really shouldn't be invoked anyway - */ - const char * rtems_assoc_name_bad( #ifdef RTEMS_DEBUG diff --git a/cpukit/libcsupport/src/assocnamebylocal.c b/cpukit/libcsupport/src/assocnamebylocal.c index 16cf8de481..0dd47b86e8 100644 --- a/cpukit/libcsupport/src/assocnamebylocal.c +++ b/cpukit/libcsupport/src/assocnamebylocal.c @@ -1,6 +1,8 @@ -/* - * assoc.c - * rtems assoc routines +/** + * @file + * + * @brief RTEMS Associate Name by Local + * @ingroup Associativity */ #if HAVE_CONFIG_H diff --git a/cpukit/libcsupport/src/assocnamebylocalbitfield.c b/cpukit/libcsupport/src/assocnamebylocalbitfield.c index b19364006c..d8895cbfd5 100644 --- a/cpukit/libcsupport/src/assocnamebylocalbitfield.c +++ b/cpukit/libcsupport/src/assocnamebylocalbitfield.c @@ -1,6 +1,8 @@ -/* - * assoc.c - * rtems assoc routines +/** + * @file + * + * @brief RTEMS Associate Name by Local Bitfield + * @ingroup Associativity */ #if HAVE_CONFIG_H diff --git a/cpukit/libcsupport/src/assocnamebyremotebitfield.c b/cpukit/libcsupport/src/assocnamebyremotebitfield.c index 0bc9111e0c..97876ea6ca 100644 --- a/cpukit/libcsupport/src/assocnamebyremotebitfield.c +++ b/cpukit/libcsupport/src/assocnamebyremotebitfield.c @@ -1,6 +1,8 @@ -/* - * assoc.c - * rtems assoc routines +/** + * @file + * + * @brief RTEMS Associate Name by Remote Bitfield + * @ingroup Associativity */ #if HAVE_CONFIG_H diff --git a/cpukit/libcsupport/src/assocptrbylocal.c b/cpukit/libcsupport/src/assocptrbylocal.c index 8cba79ce52..a0e7c3ce5b 100644 --- a/cpukit/libcsupport/src/assocptrbylocal.c +++ b/cpukit/libcsupport/src/assocptrbylocal.c @@ -1,6 +1,8 @@ -/* - * assoc.c - * rtems assoc routines +/** + * @file + * + * @brief RTEMS Associate Pointer by Local + * @ingroup Associativity */ #if HAVE_CONFIG_H diff --git a/cpukit/libcsupport/src/assocptrbyname.c b/cpukit/libcsupport/src/assocptrbyname.c index 1afc12e382..a01b9cb143 100644 --- a/cpukit/libcsupport/src/assocptrbyname.c +++ b/cpukit/libcsupport/src/assocptrbyname.c @@ -1,6 +1,8 @@ -/* - * assoc.c - * rtems assoc routines +/** + * @file + * + * @brief RTEMS Associate Pointer by Name + * @ingroup Associativity */ #if HAVE_CONFIG_H diff --git a/cpukit/libcsupport/src/assocptrbyremote.c b/cpukit/libcsupport/src/assocptrbyremote.c index 1c929425a7..465158195b 100644 --- a/cpukit/libcsupport/src/assocptrbyremote.c +++ b/cpukit/libcsupport/src/assocptrbyremote.c @@ -1,6 +1,8 @@ -/* - * assoc.c - * rtems assoc routines +/** + * @file + * + * @brief RTEMS Associate Pointer by Remote + * @ingroup Associativity */ #if HAVE_CONFIG_H diff --git a/cpukit/libcsupport/src/assocremotebyname.c b/cpukit/libcsupport/src/assocremotebyname.c index 0233d468da..8a894fc896 100644 --- a/cpukit/libcsupport/src/assocremotebyname.c +++ b/cpukit/libcsupport/src/assocremotebyname.c @@ -1,6 +1,8 @@ -/* - * assoc.c - * rtems assoc routines +/** + * @file + * + * @brief RTEMS Associate Remote by Name + * @ingroup Associativity */ #if HAVE_CONFIG_H diff --git a/cpukit/libcsupport/src/base_fs.c b/cpukit/libcsupport/src/base_fs.c index df1b516a67..33712a7862 100644 --- a/cpukit/libcsupport/src/base_fs.c +++ b/cpukit/libcsupport/src/base_fs.c @@ -1,6 +1,11 @@ -/* - * Base file system initialization +/** + * @file * + * @brief Base File System Initialization + * @ingroup LibIO + */ + +/* * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * @@ -24,16 +29,6 @@ * Default mode for created files. */ - -/* - * rtems_filesystem_initialize - * - * Initialize the foundation of the file system. This is specified - * by the structure rtems_filesystem_mount_table. The usual - * configuration is a single instantiation of the IMFS or miniIMFS with - * a single "/dev" directory in it. - */ - void rtems_filesystem_initialize( void ) { int rv = 0; diff --git a/cpukit/libcsupport/src/calloc.c b/cpukit/libcsupport/src/calloc.c index 88928cca19..279c16c7be 100644 --- a/cpukit/libcsupport/src/calloc.c +++ b/cpukit/libcsupport/src/calloc.c @@ -1,6 +1,11 @@ -/* - * calloc() +/** + * @file * + * @brief Allocate Space for Array in Memory + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/cfgetospeed.c b/cpukit/libcsupport/src/cfgetospeed.c index 388c26e290..f1a4fc8dac 100644 --- a/cpukit/libcsupport/src/cfgetospeed.c +++ b/cpukit/libcsupport/src/cfgetospeed.c @@ -1,6 +1,11 @@ -/* - * cfgetospeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions +/** + * @file * + * @brief Baud Rate Functions + * @ingroup Termios + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -21,6 +26,9 @@ #include <errno.h> #include <termios.h> +/** + * POSIX 1003.1b 7.1.3 - Baud Rate Functions + */ speed_t cfgetospeed( const struct termios *tp ) diff --git a/cpukit/libcsupport/src/cfsetispeed.c b/cpukit/libcsupport/src/cfsetispeed.c index 571407d0f7..d4cce532e8 100644 --- a/cpukit/libcsupport/src/cfsetispeed.c +++ b/cpukit/libcsupport/src/cfsetispeed.c @@ -1,6 +1,11 @@ -/* - * cfsetispeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions +/** + * @file * + * @brief Baud Rate Functions + * @ingroup Termios + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -24,6 +29,9 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> +/** + * POSIX 1003.1b 7.1.3 - Baud Rate Functions + */ int cfsetispeed( struct termios *tp, speed_t speed diff --git a/cpukit/libcsupport/src/cfsetospeed.c b/cpukit/libcsupport/src/cfsetospeed.c index 850f4bbdb0..a6b4d4b6ee 100644 --- a/cpukit/libcsupport/src/cfsetospeed.c +++ b/cpukit/libcsupport/src/cfsetospeed.c @@ -1,6 +1,11 @@ -/* - * cfsetospeed() - POSIX 1003.1b 7.1.3 - Baud Rate Functions +/** + * @file * + * @brief Baud Rate Functions + * @ingroup Termios + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -24,6 +29,9 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> +/** + * POSIX 1003.1b 7.1.3 - Baud Rate Functions + */ int cfsetospeed( struct termios *tp, speed_t speed diff --git a/cpukit/libcsupport/src/chmod.c b/cpukit/libcsupport/src/chmod.c index 47de601b98..8b91b60eae 100644 --- a/cpukit/libcsupport/src/chmod.c +++ b/cpukit/libcsupport/src/chmod.c @@ -1,6 +1,11 @@ -/* - * chmod() - POSIX 1003.1b 5.6.4 - Change File Modes +/** + * @file * + * @brief Change File Modes + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -17,6 +22,9 @@ #include <rtems/libio_.h> +/** + * POSIX 1003.1b 5.6.4 - Change File Modes + */ int chmod( const char *path, mode_t mode ) { int rv = 0; diff --git a/cpukit/libcsupport/src/chown.c b/cpukit/libcsupport/src/chown.c index 7cc03a2a07..434fc2b1a2 100644 --- a/cpukit/libcsupport/src/chown.c +++ b/cpukit/libcsupport/src/chown.c @@ -1,6 +1,11 @@ -/* - * chown() - POSIX 1003.1b 5.6.5 - Change Owner and Group of a File +/** + * @file * + * @brief Change Owner and Group of a File + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -41,6 +46,9 @@ int rtems_filesystem_chown( return rv; } +/** + * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File + */ int chown( const char *path, uid_t owner, gid_t group ) { return rtems_filesystem_chown( path, owner, group, RTEMS_FS_FOLLOW_LINK ); diff --git a/cpukit/libcsupport/src/clonenode.c b/cpukit/libcsupport/src/clonenode.c index 0ac7c9ef40..3004def15b 100644 --- a/cpukit/libcsupport/src/clonenode.c +++ b/cpukit/libcsupport/src/clonenode.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Clones a Node + * @ingroup LibIOInternal + */ + /* * Copyright (c) 2012 embedded brains GmbH. All rights reserved. * diff --git a/cpukit/libcsupport/src/ctermid.c b/cpukit/libcsupport/src/ctermid.c index 5699dcee1f..8df70e1263 100644 --- a/cpukit/libcsupport/src/ctermid.c +++ b/cpukit/libcsupport/src/ctermid.c @@ -1,6 +1,11 @@ -/* - * ctermid() - POSIX 1003.1b 4.7.1 - Generate Terminal Pathname +/** + * @file * + * @brief Generate Terminal Pathname + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * @@ -21,6 +26,9 @@ static char *ctermid_name = "/dev/console"; +/** + * ctermid() - POSIX 1003.1b 4.7.1 - Generate Terminal Pathname + */ char *ctermid( char *s ) diff --git a/cpukit/libcsupport/src/dup2.c b/cpukit/libcsupport/src/dup2.c index ba60acb85b..37c93a7398 100644 --- a/cpukit/libcsupport/src/dup2.c +++ b/cpukit/libcsupport/src/dup2.c @@ -1,6 +1,11 @@ -/* - * dup2() - POSIX 1003.1b 6.2.1 Duplicate an Open File Descriptor +/** + * @file * + * @brief Duplicate an Open File Descriptor + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -18,6 +23,9 @@ #include <rtems/libio_.h> +/** + * POSIX 1003.1b 6.2.1 Duplicate an Open File Descriptor + */ int dup2( int fildes, int fildes2 diff --git a/cpukit/libcsupport/src/envlock.c b/cpukit/libcsupport/src/envlock.c index cd24a6d467..bc6f02c9f7 100644 --- a/cpukit/libcsupport/src/envlock.c +++ b/cpukit/libcsupport/src/envlock.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Global Environment Lock Support + * @ingroup libcsupport + */ + /* * Author: Till Straumann <strauman@slac.stanford.edu>, 3/2002 */ diff --git a/cpukit/libcsupport/src/error.c b/cpukit/libcsupport/src/error.c index f8d2e40255..a77dfbbb34 100644 --- a/cpukit/libcsupport/src/error.c +++ b/cpukit/libcsupport/src/error.c @@ -1,46 +1,14 @@ -/* - * report errors and panics to RTEMS' stderr. - * Currently just used by RTEMS monitor. +/** + * @file + * + * @brief Error and Panic Report Support + * @ingroup ErrorPanicSupport */ #if HAVE_CONFIG_H #include "config.h" #endif -/* - * These routines provide general purpose error reporting. - * rtems_error reports an error to stderr and allows use of - * printf style formatting. A newline is appended to all messages. - * - * error_flag can be specified as any of the following: - * - * RTEMS_ERROR_ERRNO -- include errno text in output - * RTEMS_ERROR_PANIC -- halts local system after output - * RTEMS_ERROR_ABORT -- abort after output - * - * It can also include a rtems_status value which can be OR'd - * with the above flags. * - * - * EXAMPLE - * #include <rtems.h> - * #include <rtems/error.h> - * rtems_error(0, "stray interrupt %d", intr); - * - * EXAMPLE - * if ((status = rtems_task_create(...)) != RTEMS_SUCCCESSFUL) - * { - * rtems_error(status | RTEMS_ERROR_ABORT, - * "could not create task"); - * } - * - * EXAMPLE - * if ((fd = open(pathname, O_RDNLY)) < 0) - * { - * rtems_error(RTEMS_ERROR_ERRNO, "open of '%s' failed", pathname); - * goto failed; - * } - */ - /* This is always defined on RTEMS Scheduler Simulator and thus * we get a redefined warning if this is not present. */ @@ -153,15 +121,6 @@ static int rtems_verror( return chars_written; } - -/* - * Report an error. - * error_flag is as above; printf_format is a normal - * printf(3) format string, with its concommitant arguments. - * - * Returns the number of characters written. - */ - int rtems_error( rtems_error_code_t error_flag, const char *printf_format, @@ -187,10 +146,6 @@ int rtems_error( return chars_written; } -/* - * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...) - */ - void rtems_panic( const char *printf_format, ... diff --git a/cpukit/libcsupport/src/fchdir.c b/cpukit/libcsupport/src/fchdir.c index 255e58fa5d..c5fec5ba9e 100644 --- a/cpukit/libcsupport/src/fchdir.c +++ b/cpukit/libcsupport/src/fchdir.c @@ -1,6 +1,11 @@ -/* - * fchdir() - compatible with SVr4, 4.4BSD and X/OPEN - Change Directory +/** + * @file * + * @brief Change Directory + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * @@ -20,6 +25,9 @@ #include <rtems/libio_.h> +/** + * compatible with SVr4, 4.4BSD and X/OPEN - Change Directory + */ int fchdir( int fd ) { int rv = 0; diff --git a/cpukit/libcsupport/src/fchmod.c b/cpukit/libcsupport/src/fchmod.c index 944873817d..94e82647fc 100644 --- a/cpukit/libcsupport/src/fchmod.c +++ b/cpukit/libcsupport/src/fchmod.c @@ -1,6 +1,11 @@ -/* - * fchmod() - POSIX 1003.1b 5.6.4 - Change File Modes +/** + * @file * + * @brief Change File Modes + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * @@ -17,6 +22,9 @@ #include <rtems/libio_.h> +/** + * POSIX 1003.1b 5.6.4 - Change File Modes + */ int fchmod( int fd, mode_t mode ) { int rv; diff --git a/cpukit/libcsupport/src/fchown.c b/cpukit/libcsupport/src/fchown.c index 6dfbc52ff3..ec84fe4f47 100644 --- a/cpukit/libcsupport/src/fchown.c +++ b/cpukit/libcsupport/src/fchown.c @@ -1,6 +1,11 @@ -/* - * fchown() - POSIX 1003.1b 5.6.5 - Change Owner and Group of a File +/** + * @file * + * @brief Change Owner and Group of a File + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -17,6 +22,9 @@ #include <rtems/libio_.h> +/** + * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File + */ int fchown( int fd, uid_t owner, gid_t group ) { int rv = 0; diff --git a/cpukit/libcsupport/src/flockfile.c b/cpukit/libcsupport/src/flockfile.c index 5fc6e25dbf..b4c28d8ce5 100644 --- a/cpukit/libcsupport/src/flockfile.c +++ b/cpukit/libcsupport/src/flockfile.c @@ -1,3 +1,9 @@ +/** + * @file + * + * @brief Lock File for Stdio + * @ingroup SET + */ /* * Copyright (c) 2009 by * Ralf Corsépius, Ulm, Germany. All rights reserved. @@ -14,7 +20,9 @@ #include <stdio.h> -/* This is a non-functional stub */ +/** + * This is a non-functional stub + */ void flockfile(FILE* file __attribute__((unused))) { } diff --git a/cpukit/libcsupport/src/fpathconf.c b/cpukit/libcsupport/src/fpathconf.c index a48c5d35fc..104a3512e8 100644 --- a/cpukit/libcsupport/src/fpathconf.c +++ b/cpukit/libcsupport/src/fpathconf.c @@ -1,6 +1,11 @@ -/* - * fpathconf() - POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables +/** + * @file * + * @brief Configurable Pathname Varables + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * @@ -19,6 +24,9 @@ #include <unistd.h> #include <errno.h> +/** + * POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables + */ long fpathconf( int fd, int name diff --git a/cpukit/libcsupport/src/fsync.c b/cpukit/libcsupport/src/fsync.c index 2bdf982090..885d32718a 100644 --- a/cpukit/libcsupport/src/fsync.c +++ b/cpukit/libcsupport/src/fsync.c @@ -1,6 +1,11 @@ -/* - * fsync() - POSIX 1003.1b 6.6.1 - Synchronize the State of a File +/** + * @file * + * @brief Synchronize the State of a File + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * @@ -18,6 +23,9 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> +/** + * POSIX 1003.1b 6.6.1 - Synchronize the State of a File + */ int fsync( int fd ) diff --git a/cpukit/libcsupport/src/ftruncate.c b/cpukit/libcsupport/src/ftruncate.c index a6eb16fd0d..8ec852de38 100644 --- a/cpukit/libcsupport/src/ftruncate.c +++ b/cpukit/libcsupport/src/ftruncate.c @@ -1,6 +1,11 @@ -/* - * ftruncate() - Truncate a File to the Specified Length +/** + * @file * + * @brief Truncate a File to the Specified Length + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/funlockfile.c b/cpukit/libcsupport/src/funlockfile.c index 53362cf959..46e8af33bb 100644 --- a/cpukit/libcsupport/src/funlockfile.c +++ b/cpukit/libcsupport/src/funlockfile.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Unlock File for Stdio + * @ingroup libcsupport + */ + /* * Copyright (c) 2009 by * Ralf Corsépius, Ulm, Germany. All rights reserved. @@ -14,7 +21,9 @@ #include <stdio.h> -/* This is a non-functional stub */ +/** + * This is a non-functional stub + */ void funlockfile(FILE* file __attribute__((unused))) { } diff --git a/cpukit/libcsupport/src/getdents.c b/cpukit/libcsupport/src/getdents.c index 4f68240512..9e26a3cc2d 100644 --- a/cpukit/libcsupport/src/getdents.c +++ b/cpukit/libcsupport/src/getdents.c @@ -1,12 +1,11 @@ -/* - * getdents() - Get Directory Entries - * - * SVR4 and SVID extension required by Newlib readdir() family. - * - * This routine will dd_len / (sizeof dirent) directory entries relative to - * the current directory position index. These entries will be placed in - * character array pointed to by -dd_buf- +/** + * @file * + * @brief Get Directory Entries + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -24,6 +23,13 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> +/** + * SVR4 and SVID extension required by Newlib readdir() family. + * + * This routine will dd_len / (sizeof dirent) directory entries relative to + * the current directory position index. These entries will be placed in + * character array pointed to by -dd_buf- + */ int getdents( int dd_fd, char *dd_buf, diff --git a/cpukit/libcsupport/src/getegid.c b/cpukit/libcsupport/src/getegid.c index 222942066b..9ec6f0b6fc 100644 --- a/cpukit/libcsupport/src/getegid.c +++ b/cpukit/libcsupport/src/getegid.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Get Real User, Effective User, Ral Group, and Effective Group IDs + * @ingroup libcsupport + */ + #if HAVE_CONFIG_H #include "config.h" #endif @@ -9,11 +16,10 @@ #include <rtems/seterr.h> #include <rtems/userenv.h> -/* +/** * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ - gid_t getegid( void ) { return _POSIX_types_Egid; diff --git a/cpukit/libcsupport/src/geteuid.c b/cpukit/libcsupport/src/geteuid.c index 753dabf997..bc4ee75601 100644 --- a/cpukit/libcsupport/src/geteuid.c +++ b/cpukit/libcsupport/src/geteuid.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Get Real User, Effective User, Ral Group, and Effective Group IDs + * @ingroup libcsupport + */ + #if HAVE_CONFIG_H #include "config.h" #endif @@ -15,11 +22,10 @@ uid_t _POSIX_types_Euid = 0; */ -/* +/** * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ - uid_t geteuid( void ) { return _POSIX_types_Euid; diff --git a/cpukit/libcsupport/src/getgid.c b/cpukit/libcsupport/src/getgid.c index 3e38dde0ef..cb8e7e97fc 100644 --- a/cpukit/libcsupport/src/getgid.c +++ b/cpukit/libcsupport/src/getgid.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Get Real User, Effective User, Ral Group, and Effective Group IDs + * @ingroup libcsupport + */ + #if HAVE_CONFIG_H #include "config.h" #endif @@ -5,7 +12,7 @@ #include <unistd.h> #include <rtems/userenv.h> -/* +/** * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ diff --git a/cpukit/libcsupport/src/getgroups.c b/cpukit/libcsupport/src/getgroups.c index d6eebb852c..6bf58a70fe 100644 --- a/cpukit/libcsupport/src/getgroups.c +++ b/cpukit/libcsupport/src/getgroups.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Get Supplementary IDs + * @ingroup libcsupport + */ + #if HAVE_CONFIG_H #include "config.h" #endif @@ -5,10 +12,9 @@ #include <sys/types.h> #include <unistd.h> -/* +/** * 4.2.3 Get Supplementary IDs, P1003.1b-1993, p. 86 */ - int getgroups( int gidsetsize __attribute__((unused)), gid_t grouplist[] __attribute__((unused)) diff --git a/cpukit/libcsupport/src/getpagesize.c b/cpukit/libcsupport/src/getpagesize.c index 2b93415f21..24776ec920 100644 --- a/cpukit/libcsupport/src/getpagesize.c +++ b/cpukit/libcsupport/src/getpagesize.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Get System Page Size + * @ingroup libcsupport + */ + #if HAVE_CONFIG_H #include "config.h" #endif @@ -5,7 +12,7 @@ #include <unistd.h> #include <sys/param.h> -/* +/** * Get System Page Size (from SVR4 and 4.2+ BSD) * * This is not a functional version but the SPARC backend for at least diff --git a/cpukit/libcsupport/src/getpid.c b/cpukit/libcsupport/src/getpid.c index a46fbb59a9..27825e50b5 100644 --- a/cpukit/libcsupport/src/getpid.c +++ b/cpukit/libcsupport/src/getpid.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Process and Parent Process IDs + * @ingroup libcsupport + */ + #if HAVE_CONFIG_H #include "config.h" #endif @@ -8,25 +15,21 @@ #include <rtems/score/object.h> #include <rtems/seterr.h> -/* +/** * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ - pid_t getpid( void ) { return _Objects_Local_node; } -/* - * _getpid_r - * - * This is the Newlib dependent reentrant version of getpid(). - */ - #if defined(RTEMS_NEWLIB) && !defined(HAVE__GETPID_R) #include <reent.h> +/** + * This is the Newlib dependent reentrant version of getpid(). + */ pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) diff --git a/cpukit/libcsupport/src/getppid.c b/cpukit/libcsupport/src/getppid.c index 0341356a1f..b0269d4aea 100644 --- a/cpukit/libcsupport/src/getppid.c +++ b/cpukit/libcsupport/src/getppid.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Get Process and Parent Process IDs + * @ingroup libcsupport + */ + #if HAVE_CONFIG_H #include "config.h" #endif @@ -10,10 +17,9 @@ pid_t _POSIX_types_Ppid = 0; -/* +/** * 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83 */ - pid_t getppid( void ) { return _POSIX_types_Ppid; diff --git a/cpukit/libcsupport/src/getpwent.c b/cpukit/libcsupport/src/getpwent.c index 75181fd8f1..618f318885 100644 --- a/cpukit/libcsupport/src/getpwent.c +++ b/cpukit/libcsupport/src/getpwent.c @@ -1,6 +1,11 @@ -/* - * POSIX 1003.1b - 9.2.2 - User Database Access Routines +/** + * @file * + * @brief User Database Access Routines + * @ingroup libcsupport + */ + +/* * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. @@ -24,6 +29,10 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> +/** + * POSIX 1003.1b - 9.2.2 - User Database Access Routines + */ + /* * Static, thread-unsafe, buffers */ @@ -34,8 +43,8 @@ static FILE *group_fp; static char grbuf[200]; static struct group grent; -/* - * Initialize useable but dummy databases +/** + * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { @@ -74,8 +83,8 @@ void init_etc_passwd_group(void) } } -/* - * Extract a string value from the database +/** + * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) @@ -109,8 +118,8 @@ scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) return 1; } -/* - * Extract an integer value from the database +/** + * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) @@ -279,8 +288,8 @@ void endpwent(void) fclose(passwd_fp); } -/* - * Extract a single group record from the database +/** + * Extract a single group record from the database */ static int scangr( FILE *fp, diff --git a/cpukit/libcsupport/src/getuid.c b/cpukit/libcsupport/src/getuid.c index 6c4dbf0bb7..f01c163caf 100644 --- a/cpukit/libcsupport/src/getuid.c +++ b/cpukit/libcsupport/src/getuid.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Get Real User, Effective User, Ral Group, and Effective Group IDs + * @ingroup libcsupport + */ + /* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). @@ -15,7 +22,7 @@ #include <rtems/userenv.h> -/* +/** * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ diff --git a/cpukit/libcsupport/src/gxx_wrappers.c b/cpukit/libcsupport/src/gxx_wrappers.c index 2979da4b38..cd1ecc6339 100644 --- a/cpukit/libcsupport/src/gxx_wrappers.c +++ b/cpukit/libcsupport/src/gxx_wrappers.c @@ -1,6 +1,11 @@ -/* - * RTEMS threads compatibility routines for libgcc2. +/** + * @file * + * @brief RTEMS Threads Compatibility Routines for Libgcc2 + * @ingroup GxxWrappersSupport + */ + +/* * by: Rosimildo da Silva (rdasilva@connecttel.com) * * Used ideas from: diff --git a/cpukit/libcsupport/src/isatty.c b/cpukit/libcsupport/src/isatty.c index 1149f73437..54e2c69ae6 100644 --- a/cpukit/libcsupport/src/isatty.c +++ b/cpukit/libcsupport/src/isatty.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Test whether a File Descriptor Refers to a Terminal + * @ingroup libcsupport + */ + /* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). diff --git a/cpukit/libcsupport/src/isatty_r.c b/cpukit/libcsupport/src/isatty_r.c index 56751dc008..13ba6b4b34 100644 --- a/cpukit/libcsupport/src/isatty_r.c +++ b/cpukit/libcsupport/src/isatty_r.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Test for a Terminal Device + * @ingroup libcsupport + */ + /* * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). @@ -11,14 +18,11 @@ #include "config.h" #endif -/* - * _isatty_r - * - * This is the Newlib dependent reentrant version of isatty(). - */ - #if defined(RTEMS_NEWLIB) && !defined(HAVE__ISATTY_R) + /** + * This is the Newlib dependent reentrant version of isatty(). + */ #include <unistd.h> #include <reent.h> #include <sys/stat.h> diff --git a/cpukit/libcsupport/src/issetugid.c b/cpukit/libcsupport/src/issetugid.c index 375fea8d9b..0cb870ea00 100644 --- a/cpukit/libcsupport/src/issetugid.c +++ b/cpukit/libcsupport/src/issetugid.c @@ -1,12 +1,20 @@ -/* - * Dummy version of BSD routine +/** + * @file + * + * @brief Dummy Version of BSD Routine + * @ingroup libcsupport */ + #if HAVE_CONFIG_H #include "config.h" #endif #if defined(RTEMS_NEWLIB) && !defined(HAVE_ISSETUGID) + +/** + * Dummy version of BSD routine + */ int issetugid (void) { return 0; diff --git a/cpukit/libcsupport/src/link.c b/cpukit/libcsupport/src/link.c index f49cca2302..7ec103c15c 100644 --- a/cpukit/libcsupport/src/link.c +++ b/cpukit/libcsupport/src/link.c @@ -1,6 +1,11 @@ -/* - * link() - POSIX 1003.1b - 5.3.4 - Create a new link +/** + * @file * + * @brief Create a new link + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -17,6 +22,9 @@ #include <rtems/libio_.h> +/** + * link() - POSIX 1003.1b - 5.3.4 - Create a new link + */ int link( const char *path1, const char *path2 ) { int rv = 0; @@ -50,16 +58,13 @@ int link( const char *path1, const char *path2 ) return rv; } -/* - * _link_r - * - * This is the Newlib dependent reentrant version of link(). - */ - #if defined(RTEMS_NEWLIB) #include <reent.h> +/** + * This is the Newlib dependent reentrant version of link(). + */ int _link_r( struct _reent *ptr __attribute__((unused)), const char *path1, diff --git a/cpukit/libcsupport/src/lstat.c b/cpukit/libcsupport/src/lstat.c index 3cf93bee27..abdc0465cd 100644 --- a/cpukit/libcsupport/src/lstat.c +++ b/cpukit/libcsupport/src/lstat.c @@ -1,6 +1,11 @@ -/* - * lstat() - BSD 4.3 and SVR4 - Get File Status +/** + * @file * + * @brief Get File Status + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -18,3 +23,7 @@ #define _STAT_FOLLOW_LINKS RTEMS_FS_FOLLOW_HARD_LINK #include "stat.c" + +/** + * BSD 4.3 and SVR4 - Get File Status + */
\ No newline at end of file diff --git a/cpukit/libcsupport/src/malloc.c b/cpukit/libcsupport/src/malloc.c index dea6f8f3c7..f79e3bb4f7 100644 --- a/cpukit/libcsupport/src/malloc.c +++ b/cpukit/libcsupport/src/malloc.c @@ -1,7 +1,11 @@ -/* - * RTEMS Malloc Family Implementation - * +/** + * @file * + * @brief RTEMS Malloc Family Implementation + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/malloc_deferred.c b/cpukit/libcsupport/src/malloc_deferred.c index 28c6379b86..d1ad56f64b 100644 --- a/cpukit/libcsupport/src/malloc_deferred.c +++ b/cpukit/libcsupport/src/malloc_deferred.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Malloc Deferred Support + * @ingroup libcsupport + */ + /* * Process free requests deferred because they were from ISR * or other critical section. diff --git a/cpukit/libcsupport/src/malloc_report_statistics.c b/cpukit/libcsupport/src/malloc_report_statistics.c index 7af92d45d5..09c7b0f32f 100644 --- a/cpukit/libcsupport/src/malloc_report_statistics.c +++ b/cpukit/libcsupport/src/malloc_report_statistics.c @@ -1,6 +1,11 @@ -/* - * malloc_report_statistics Implementation +/** + * @file * + * @brief Print Malloc Statistic Usage Report + * @ingroup MallocSupport + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/malloc_statistics_helpers.c b/cpukit/libcsupport/src/malloc_statistics_helpers.c index 8de5320fbb..0e788c04f1 100644 --- a/cpukit/libcsupport/src/malloc_statistics_helpers.c +++ b/cpukit/libcsupport/src/malloc_statistics_helpers.c @@ -1,6 +1,11 @@ -/* - * _calloc_r Implementation +/** + * @file * + * @brief Malloc Statistics Support + * @ingroup MallocSupport + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * @@ -48,7 +53,7 @@ static void rtems_malloc_statistics_at_malloc( s->max_depth = current_depth; } -/* +/** * If the pointer is not in the heap, then we won't be able to get its * size and thus we skip updating the statistics. */ diff --git a/cpukit/libcsupport/src/malloc_walk.c b/cpukit/libcsupport/src/malloc_walk.c index fa810888c9..d06106beef 100644 --- a/cpukit/libcsupport/src/malloc_walk.c +++ b/cpukit/libcsupport/src/malloc_walk.c @@ -1,6 +1,11 @@ -/* - * malloc_walk Implementation +/** + * @file * + * @brief Malloc Walk + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/mallocgetheapptr.c b/cpukit/libcsupport/src/mallocgetheapptr.c index a25426ae6e..7392d67831 100644 --- a/cpukit/libcsupport/src/mallocgetheapptr.c +++ b/cpukit/libcsupport/src/mallocgetheapptr.c @@ -1,6 +1,11 @@ -/* - * RTEMS Malloc Get Heap Pointer -- Primarily for Debug +/** + * @file * + * @brief RTEMS Malloc Get Heap Pointer + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/mallocinfo.c b/cpukit/libcsupport/src/mallocinfo.c index 1532608420..63c349d762 100644 --- a/cpukit/libcsupport/src/mallocinfo.c +++ b/cpukit/libcsupport/src/mallocinfo.c @@ -1,7 +1,11 @@ -/* - * RTEMS Malloc Get Status Information - * +/** + * @file * + * @brief RTEMS Malloc Get Status Information + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * @@ -17,10 +21,6 @@ #include <rtems/malloc.h> #include <rtems/score/protectedheap.h> -/* - * Find amount of free heap remaining - */ - int malloc_info( Heap_Information_block *the_info ) diff --git a/cpukit/libcsupport/src/mallocsetheapptr.c b/cpukit/libcsupport/src/mallocsetheapptr.c index 42e887810d..414918a4b5 100644 --- a/cpukit/libcsupport/src/mallocsetheapptr.c +++ b/cpukit/libcsupport/src/mallocsetheapptr.c @@ -1,6 +1,11 @@ -/* - * RTEMS Malloc Set Heap Pointer -- Primarily for Debug +/** + * @file * + * @brief RTEMS Malloc Set Heap Pointer + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/mkdir.c b/cpukit/libcsupport/src/mkdir.c index 7b823141b0..e1c4b7c001 100644 --- a/cpukit/libcsupport/src/mkdir.c +++ b/cpukit/libcsupport/src/mkdir.c @@ -1,6 +1,11 @@ -/* - * mkdir() - POSIX 1003.1b 5.4.1 - Make a Directory +/** + * @file * + * @brief Make a Directory + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -19,6 +24,9 @@ #include <errno.h> #include <stdlib.h> +/** + * POSIX 1003.1b 5.4.1 - Make a Directory + */ int mkdir( const char *pathname, mode_t mode diff --git a/cpukit/libcsupport/src/mkfifo.c b/cpukit/libcsupport/src/mkfifo.c index 2ed351fe9d..ac4bb40cae 100644 --- a/cpukit/libcsupport/src/mkfifo.c +++ b/cpukit/libcsupport/src/mkfifo.c @@ -1,6 +1,11 @@ -/* - * mkfifo() - POSIX 1003.1b 5.4.1 - Make a FIFO Special File +/** + * @file * + * @brief Make a FIFO Special File + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -17,6 +22,9 @@ #include <sys/stat.h> #include <errno.h> +/** + * POSIX 1003.1b 5.4.1 - Make a FIFO Special File + */ int mkfifo( const char *path, mode_t mode diff --git a/cpukit/libcsupport/src/mknod.c b/cpukit/libcsupport/src/mknod.c index 6a63455d81..0a639f0813 100644 --- a/cpukit/libcsupport/src/mknod.c +++ b/cpukit/libcsupport/src/mknod.c @@ -1,10 +1,11 @@ -/* - * mknod() - * - * This routine is not defined in the POSIX 1003.1b standard but is - * commonly supported on most UNIX and POSIX systems. It is the - * foundation for creating file system objects. +/** + * @file * + * @brief Create a Special or Ordinary File + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -55,6 +56,11 @@ int rtems_filesystem_mknod( return rv; } +/** + * This routine is not defined in the POSIX 1003.1b standard but is + * commonly supported on most UNIX and POSIX systems. It is the + * foundation for creating file system objects. + */ int mknod( const char *path, mode_t mode, dev_t dev ) { int rv = 0; diff --git a/cpukit/libcsupport/src/mount.c b/cpukit/libcsupport/src/mount.c index 8eb4796fb2..92033e1904 100644 --- a/cpukit/libcsupport/src/mount.c +++ b/cpukit/libcsupport/src/mount.c @@ -1,12 +1,11 @@ -/* - * mount() - * - * XXX - * - * XXX make sure no required ops are NULL - * XXX make sure no optional ops you are using are NULL - * XXX unmount should be required. +/** + * @file * + * @brief Mounts a File System + * @ingroup FileSystemTypesAndMount + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * @@ -28,9 +27,6 @@ RTEMS_CHAIN_DEFINE_EMPTY(rtems_filesystem_mount_table); -/* - * Default pathconfs. - */ const rtems_filesystem_limits_and_options_t rtems_filesystem_default_pathconf = { 5, /* link_max: count */ 128, /* max_canon: max formatted input line size */ diff --git a/cpukit/libcsupport/src/newlibc_init.c b/cpukit/libcsupport/src/newlibc_init.c index ff6d438b33..110f721554 100644 --- a/cpukit/libcsupport/src/newlibc_init.c +++ b/cpukit/libcsupport/src/newlibc_init.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Newlib Initialization + * @ingroup libcsupport + */ + /* * Implementation of hooks for the CYGNUS newlib libc * These hooks set things up so that: @@ -17,7 +24,7 @@ #if defined(RTEMS_NEWLIB) -/* +/** * Init libc for CYGNUS newlib * * Set up _REENT to use our global libc_global_reent. @@ -29,8 +36,6 @@ * create, delete, switch, exit, etc. * */ - - void libc_init(void) { diff --git a/cpukit/libcsupport/src/newlibc_reent.c b/cpukit/libcsupport/src/newlibc_reent.c index 91b5bde5c9..72aa7f592c 100644 --- a/cpukit/libcsupport/src/newlibc_reent.c +++ b/cpukit/libcsupport/src/newlibc_reent.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Newlib Support + * @ingroup libcsupport + */ + /* * The license and distribution terms for this file may be * found in the file LICENSE in this distribution or at @@ -98,9 +105,7 @@ void newlib_begin_hook(rtems_tcb *current_task) * Called when a task is deleted. * Must restore the new lib reentrancy state for the new current * task. - * */ - int newlib_free_buffers( FILE *fp ) diff --git a/cpukit/libcsupport/src/open.c b/cpukit/libcsupport/src/open.c index 02436b66e7..ead76a6fa3 100644 --- a/cpukit/libcsupport/src/open.c +++ b/cpukit/libcsupport/src/open.c @@ -1,6 +1,11 @@ -/* - * open() - POSIX 1003.1 5.3.1 - Open a File +/** + * @file * + * @brief Open a File + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * @@ -120,6 +125,9 @@ static int do_open( return rv; } +/** +* POSIX 1003.1 5.3.1 - Open a File +*/ int open( const char *path, int oflag, ... ) { int rv = 0; @@ -144,16 +152,15 @@ int open( const char *path, int oflag, ... ) return rv; } -/* - * _open_r - * - * This is the Newlib dependent reentrant version of open(). - */ + #if defined(RTEMS_NEWLIB) && !defined(HAVE__OPEN_R) #include <reent.h> +/** + * This is the Newlib dependent reentrant version of open(). + */ int _open_r( struct _reent *ptr __attribute__((unused)), const char *buf, diff --git a/cpukit/libcsupport/src/pathconf.c b/cpukit/libcsupport/src/pathconf.c index c337d44955..690817c3e8 100644 --- a/cpukit/libcsupport/src/pathconf.c +++ b/cpukit/libcsupport/src/pathconf.c @@ -1,6 +1,11 @@ -/* - * pathconf() - POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables +/** + * @file * + * @brief Configurable Pathname Varables + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -19,6 +24,9 @@ #include <sys/stat.h> #include <fcntl.h> +/** + * POSIX 1003.1b - 5.7.1 - Configurable Pathname Varables + */ long pathconf( const char *path, int name diff --git a/cpukit/libcsupport/src/pipe.c b/cpukit/libcsupport/src/pipe.c index 97f2bd4b65..21d3205cf1 100644 --- a/cpukit/libcsupport/src/pipe.c +++ b/cpukit/libcsupport/src/pipe.c @@ -1,6 +1,11 @@ -/* - * pipe() - POSIX 1003.1b 6.1.1 Create an Inter-Process Channel +/** + * @file * + * @brief Create an Inter-Process Channel + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -20,6 +25,9 @@ #include <rtems/seterr.h> #include <rtems/pipe.h> +/** + * POSIX 1003.1b 6.1.1 Create an Inter-Process Channel + */ int pipe( int filsdes[2] ) diff --git a/cpukit/libcsupport/src/printf_plugin.c b/cpukit/libcsupport/src/printf_plugin.c index 87913277f9..5814f6e4c1 100644 --- a/cpukit/libcsupport/src/printf_plugin.c +++ b/cpukit/libcsupport/src/printf_plugin.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief RTEMS Plugin Printf + * @ingroup libcsupport + */ + /* * Copyright (c) 2012 embedded brains GmbH. All rights reserved. * diff --git a/cpukit/libcsupport/src/printk.c b/cpukit/libcsupport/src/printk.c index 0a2989226c..badbd0d591 100644 --- a/cpukit/libcsupport/src/printk.c +++ b/cpukit/libcsupport/src/printk.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Kernel Printf Function + * @ingroup libcsupport + */ + /* * (C) Copyright 1997 - * - NavIST Group - Real-Time Distributed Systems and Industrial Automation @@ -22,10 +29,8 @@ #include <stdio.h> #include <rtems/bspIo.h> -/* - * printk - * - * Kernel printf function requiring minimal infrastructure. +/** + * Kernel printf function requiring minimal infrastructure. */ void printk(const char *fmt, ...) { diff --git a/cpukit/libcsupport/src/printk_plugin.c b/cpukit/libcsupport/src/printk_plugin.c index 70fd19a6cc..12f9495248 100644 --- a/cpukit/libcsupport/src/printk_plugin.c +++ b/cpukit/libcsupport/src/printk_plugin.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Plugin Printk + * @ingroup libcsupport + */ + /* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). diff --git a/cpukit/libcsupport/src/privateenv.c b/cpukit/libcsupport/src/privateenv.c index 04622fd432..f5fd67db95 100644 --- a/cpukit/libcsupport/src/privateenv.c +++ b/cpukit/libcsupport/src/privateenv.c @@ -1,12 +1,11 @@ /** - * @file + * @file * - * @ingroup LibIOEnv + * @brief Instantiate a Private User Environment + * @ingroup LibIOEnv */ /* - * Instantiate a private user environment for the calling thread. - * * Submitted by: fernando.ruiz@ctv.es (correo@fernando-ruiz.com) * * COPYRIGHT (c) 1989-2010. @@ -28,6 +27,10 @@ #include <rtems/libio_.h> #include <rtems/score/thread.h> +/** + * Instantiate a private user environment for the calling thread. + */ + static void free_user_env(void *arg) { rtems_user_env_t *env = arg; diff --git a/cpukit/libcsupport/src/putk.c b/cpukit/libcsupport/src/putk.c index 53265ffbb5..f3d7758f67 100644 --- a/cpukit/libcsupport/src/putk.c +++ b/cpukit/libcsupport/src/putk.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Write Character to Stream + * @ingroup libcsupport + */ + /* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). @@ -13,9 +20,7 @@ #include <rtems/bspIo.h> -/* - * putk - * +/** * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) diff --git a/cpukit/libcsupport/src/read.c b/cpukit/libcsupport/src/read.c index ee10166dc8..c1a0d085a3 100644 --- a/cpukit/libcsupport/src/read.c +++ b/cpukit/libcsupport/src/read.c @@ -1,6 +1,11 @@ -/* - * read() - POSIX 1003.1b 6.4.1 - Read From a File +/** + * @file * + * @brief Read From a File + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * @@ -16,6 +21,9 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> +/** + * POSIX 1003.1b 6.4.1 - Read From a File + */ ssize_t read( int fd, void *buffer, @@ -37,16 +45,13 @@ ssize_t read( return (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); } -/* - * _read_r - * - * This is the Newlib dependent reentrant version of read(). - */ - #if defined(RTEMS_NEWLIB) && !defined(HAVE__READ_R) #include <reent.h> +/** + * This is the Newlib dependent reentrant version of read(). + */ ssize_t _read_r( struct _reent *ptr __attribute__((unused)), int fd, diff --git a/cpukit/libcsupport/src/readdir_r.c b/cpukit/libcsupport/src/readdir_r.c index 28c6dadfe0..ba0e53af92 100644 --- a/cpukit/libcsupport/src/readdir_r.c +++ b/cpukit/libcsupport/src/readdir_r.c @@ -1,5 +1,8 @@ -/* - * readdir_r - reentrant version of readdir() +/** + * @file + * + * @brief Read a Directory + * @ingroup libcsupport */ #if HAVE_CONFIG_H @@ -13,10 +16,10 @@ #include <errno.h> #include <stdio.h> -/* - * The RTEMS version of readdir is already thread-safe. +/** + * The RTEMS version of readdir is already thread-safe. + * This routine is reentrant version of readdir(). */ - int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) { *result = readdir(dirp); diff --git a/cpukit/libcsupport/src/readlink.c b/cpukit/libcsupport/src/readlink.c index 2cafcca10d..4abc68a955 100644 --- a/cpukit/libcsupport/src/readlink.c +++ b/cpukit/libcsupport/src/readlink.c @@ -1,6 +1,11 @@ -/* - * readlink() - POSIX 1003.1b - X.X.X - XXX +/** + * @file * + * @brief Read Value of a Symbolic Link + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -17,6 +22,9 @@ #include <rtems/libio_.h> +/** + * POSIX 1003.1b - X.X.X - XXX + */ ssize_t readlink( const char *path, char *buf, size_t bufsize ) { ssize_t rv = 0; diff --git a/cpukit/libcsupport/src/realloc.c b/cpukit/libcsupport/src/realloc.c index d606f91f4d..eee6f79e69 100644 --- a/cpukit/libcsupport/src/realloc.c +++ b/cpukit/libcsupport/src/realloc.c @@ -1,6 +1,11 @@ -/* - * calloc() +/** + * @file * + * @brief Reallocate Memory Block + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/rmdir.c b/cpukit/libcsupport/src/rmdir.c index 5e4c9f15be..4802aa364c 100644 --- a/cpukit/libcsupport/src/rmdir.c +++ b/cpukit/libcsupport/src/rmdir.c @@ -1,6 +1,11 @@ -/* - * rmdir() - POSIX 1003.1b - 5.2.2 - Remove a Directory +/** + * @file * + * @brief Remove a Directory + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -17,6 +22,9 @@ #include <rtems/libio_.h> +/** + * POSIX 1003.1b - 5.2.2 - Remove a Directory + */ int rmdir( const char *path ) { int rv = 0; diff --git a/cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c b/cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c index 831626b3d5..d27a3660a2 100644 --- a/cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c +++ b/cpukit/libcsupport/src/rtems_heap_extend_via_sbrk.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief RTEMS Extend Heap via Sbrk + * @ingroup MallocSupport + */ + /* * Copyright (c) 2012 embedded brains GmbH. All rights reserved. * diff --git a/cpukit/libcsupport/src/rtems_heap_greedy.c b/cpukit/libcsupport/src/rtems_heap_greedy.c index 7e5dc16e7e..a63ff913cd 100644 --- a/cpukit/libcsupport/src/rtems_heap_greedy.c +++ b/cpukit/libcsupport/src/rtems_heap_greedy.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Greedy Allocate that Empties the Heap + * @ingroup MallocSupport + */ + /* * Copyright (c) 2012 embedded brains GmbH. All rights reserved. * diff --git a/cpukit/libcsupport/src/rtems_memalign.c b/cpukit/libcsupport/src/rtems_memalign.c index b7760372f4..64bb489dae 100644 --- a/cpukit/libcsupport/src/rtems_memalign.c +++ b/cpukit/libcsupport/src/rtems_memalign.c @@ -1,6 +1,11 @@ -/* - * rtems_memalign() - Raw aligned allocate from Protected Heap +/** + * @file * + * @brief RTEMS Variation on Aligned Memory Allocation + * @ingroup MallocSupport + */ + +/* * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/rtems_putc.c b/cpukit/libcsupport/src/rtems_putc.c index 8a2b022192..caf4294c9a 100644 --- a/cpukit/libcsupport/src/rtems_putc.c +++ b/cpukit/libcsupport/src/rtems_putc.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief RTEMS Output a Character + * @ingroup libcsupport + */ + /* * Copyright (c) 2012 embedded brains GmbH. All rights reserved. * diff --git a/cpukit/libcsupport/src/setegid.c b/cpukit/libcsupport/src/setegid.c index d19ced41f9..249491102b 100644 --- a/cpukit/libcsupport/src/setegid.c +++ b/cpukit/libcsupport/src/setegid.c @@ -25,7 +25,7 @@ #include <rtems/seterr.h> #include <rtems/userenv.h> -/* +/** * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ diff --git a/cpukit/libcsupport/src/seteuid.c b/cpukit/libcsupport/src/seteuid.c index 406cc9ff24..6495decdc3 100644 --- a/cpukit/libcsupport/src/seteuid.c +++ b/cpukit/libcsupport/src/seteuid.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Set Effective User Id + * @ingroup libcsupport + */ + /* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). diff --git a/cpukit/libcsupport/src/setpgid.c b/cpukit/libcsupport/src/setpgid.c index 3b2011abf1..f3251bcacd 100644 --- a/cpukit/libcsupport/src/setpgid.c +++ b/cpukit/libcsupport/src/setpgid.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Set Process Group ID for Job Control + * @ingroup libcsupport + */ + #if HAVE_CONFIG_H #include "config.h" #endif @@ -6,10 +13,9 @@ #include <errno.h> #include <rtems/seterr.h> -/* +/** * 4.3.3 Set Process Group ID for Job Control, P1003.1b-1993, p. 89 */ - int setpgid( pid_t pid __attribute__((unused)), pid_t pgid __attribute__((unused)) diff --git a/cpukit/libcsupport/src/strlcat.c b/cpukit/libcsupport/src/strlcat.c index b617cb93e8..6ca17b9d40 100644 --- a/cpukit/libcsupport/src/strlcat.c +++ b/cpukit/libcsupport/src/strlcat.c @@ -1,6 +1,11 @@ -/* - * utils.c - various utility functions used in pppd. +/** + * @file * + * @brief Concatenate a Strings + * @ingroup libcsupport + */ + +/* * Copyright (c) 1999 The Australian National University. * All rights reserved. * @@ -24,9 +29,10 @@ #include <string.h> #ifndef HAVE_STRLCAT -/* - * strlcat - like strcat/strncat, doesn't overflow destination buffer, - * always leaves destination null-terminated (for len > 0). + +/** + * like strcat/strncat, doesn't overflow destination buffer, + * always leaves destination null-terminated (for len > 0). */ size_t strlcat( diff --git a/cpukit/libcsupport/src/sup_fs_deviceio.c b/cpukit/libcsupport/src/sup_fs_deviceio.c index 74f92cb44c..67e035301a 100644 --- a/cpukit/libcsupport/src/sup_fs_deviceio.c +++ b/cpukit/libcsupport/src/sup_fs_deviceio.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief RTEMS DeviceIO Support + * @ingroup Device + */ + /* * COPYRIGHT (c) 1989-2012. * On-Line Applications Research Corporation (OAR). diff --git a/cpukit/libcsupport/src/sup_fs_eval_path.c b/cpukit/libcsupport/src/sup_fs_eval_path.c index f323dbc8f3..ca31e5eb69 100644 --- a/cpukit/libcsupport/src/sup_fs_eval_path.c +++ b/cpukit/libcsupport/src/sup_fs_eval_path.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief RTEMS File Sysyem Path Eval Support + * @ingroup LibIOInternal + */ + /* * Copyright (c) 2012 embedded brains GmbH. All rights reserved. * diff --git a/cpukit/libcsupport/src/sup_fs_eval_path_generic.c b/cpukit/libcsupport/src/sup_fs_eval_path_generic.c index 27dd80145a..380e5a69ef 100644 --- a/cpukit/libcsupport/src/sup_fs_eval_path_generic.c +++ b/cpukit/libcsupport/src/sup_fs_eval_path_generic.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief RTEMS File System Eval Generic Path + * @ingroup LibIOInternal + */ + /* * Copyright (c) 2012 embedded brains GmbH. All rights reserved. * diff --git a/cpukit/libcsupport/src/sup_fs_exist_in_same_instance.c b/cpukit/libcsupport/src/sup_fs_exist_in_same_instance.c index 6d19ae4346..adb3d9ba1d 100644 --- a/cpukit/libcsupport/src/sup_fs_exist_in_same_instance.c +++ b/cpukit/libcsupport/src/sup_fs_exist_in_same_instance.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Checks that the Locations Exist in the Same File System Instance + * @ingroup LibIOInternal + */ + /* * Copyright (c) 2012 embedded brains GmbH. All rights reserved. * diff --git a/cpukit/libcsupport/src/sup_fs_next_token.c b/cpukit/libcsupport/src/sup_fs_next_token.c index 451d81bbfe..2034774834 100644 --- a/cpukit/libcsupport/src/sup_fs_next_token.c +++ b/cpukit/libcsupport/src/sup_fs_next_token.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief RTEMS File System Eval Eat Delimiter Path + * @ingroup LibIOInternal + */ + /* * Copyright (c) 2012 embedded brains GmbH. All rights reserved. * diff --git a/cpukit/libcsupport/src/sup_fs_node_type.c b/cpukit/libcsupport/src/sup_fs_node_type.c index 0eb4221402..561075c6dc 100644 --- a/cpukit/libcsupport/src/sup_fs_node_type.c +++ b/cpukit/libcsupport/src/sup_fs_node_type.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Returns the Type of a Node + * @ingroup LibIOInternal + */ + /* * Copyright (c) 2012 embedded brains GmbH. All rights reserved. * diff --git a/cpukit/libcsupport/src/symlink.c b/cpukit/libcsupport/src/symlink.c index 07ab87fc57..3c0fd7b41a 100644 --- a/cpukit/libcsupport/src/symlink.c +++ b/cpukit/libcsupport/src/symlink.c @@ -1,6 +1,11 @@ -/* - * symlink() - POSIX 1003.1b - X.X.X - XXX +/** + * @file * + * @brief Make a Symbolic Link to a File + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/sync.c b/cpukit/libcsupport/src/sync.c index 7b17db15ef..2e8386754c 100644 --- a/cpukit/libcsupport/src/sync.c +++ b/cpukit/libcsupport/src/sync.c @@ -1,12 +1,11 @@ -/* - * sync() - XXX ??? where is this defined - * - * This function operates by as follows: - * for all threads - * for all FILE * - * fsync() - * fdatasync() +/** + * @file * + * @brief Synchronize Data on Disk with Memory + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). * @@ -79,6 +78,13 @@ static void sync_per_thread(Thread_Control *t) */ extern struct _reent * const _global_impure_ptr __ATTRIBUTE_IMPURE_PTR__; +/** + * This function operates by as follows: + * for all threads + * for all FILE * + * fsync() + * fdatasync() + */ void sync(void) { diff --git a/cpukit/libcsupport/src/tcdrain.c b/cpukit/libcsupport/src/tcdrain.c index 6dcf824b18..9e9f9acef2 100644 --- a/cpukit/libcsupport/src/tcdrain.c +++ b/cpukit/libcsupport/src/tcdrain.c @@ -1,6 +1,11 @@ -/* - * tcdrain() - POSIX 1003.1b 7.2.2 - Line Control Functions +/** + * @file * + * @brief Line Control Functions + * @ingroup Termios + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -24,6 +29,9 @@ #include <rtems/libio.h> +/** + * POSIX 1003.1b 7.2.2 - Line Control Functions + */ int tcdrain( int fd ) diff --git a/cpukit/libcsupport/src/tcflow.c b/cpukit/libcsupport/src/tcflow.c index edd056952f..7de2e98cdf 100644 --- a/cpukit/libcsupport/src/tcflow.c +++ b/cpukit/libcsupport/src/tcflow.c @@ -1,6 +1,11 @@ -/* - * tcflow() - POSIX 1003.1b 7.2.2 - Line Control Functions +/** + * @file * + * @brief Line Control Functions + * @ingroup Termios + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * @@ -29,6 +34,7 @@ int tcflow ( case TCOON: case TCIOFF: case TCION: + break; default: rtems_set_errno_and_return_minus_one( EINVAL ); } diff --git a/cpukit/libcsupport/src/tcflush.c b/cpukit/libcsupport/src/tcflush.c index d528c2aeb7..1cf5eb61f5 100644 --- a/cpukit/libcsupport/src/tcflush.c +++ b/cpukit/libcsupport/src/tcflush.c @@ -10,39 +10,14 @@ */ #if HAVE_CONFIG_H -#include "config.h" + #include "config.h" #endif -#include <rtems.h> -#if defined(RTEMS_NEWLIB) - -#include <sys/types.h> -#include <sys/stat.h> -#include <errno.h> #include <termios.h> -/* #include <sys/ioctl.h> */ - -#include <rtems/seterr.h> -#include <rtems/libio.h> +#include <stdint.h> +#include <sys/ioccom.h> -int tcflush ( - int fd __attribute__((unused)), - int queue -) +int tcflush( int fd, int queue ) { - switch (queue) { - case TCIFLUSH: - case TCOFLUSH: - case TCIOFLUSH: - default: - rtems_set_errno_and_return_minus_one( EINVAL ); - } - - /* fd is not validated */ - - /* When this is supported, implement it here */ - rtems_set_errno_and_return_minus_one( ENOTSUP ); - return 0; + return ioctl( fd, RTEMS_IO_TCFLUSH, (intptr_t) queue ); } - -#endif diff --git a/cpukit/libcsupport/src/tcgetattr.c b/cpukit/libcsupport/src/tcgetattr.c index 00964d25c7..281e75663f 100644 --- a/cpukit/libcsupport/src/tcgetattr.c +++ b/cpukit/libcsupport/src/tcgetattr.c @@ -1,6 +1,11 @@ -/* - * tcgetattr() - POSIX 1003.1b 7.2.1 - Get and Set State +/** + * @file * + * @brief Get State + * @ingroup Termios + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/tcgetpgrp.c b/cpukit/libcsupport/src/tcgetpgrp.c index ae879b3287..3488db1d03 100644 --- a/cpukit/libcsupport/src/tcgetpgrp.c +++ b/cpukit/libcsupport/src/tcgetpgrp.c @@ -1,6 +1,11 @@ -/* - * tcgetprgrp() - POSIX 1003.1b 7.2.3 - Get Foreground Process Group ID +/** + * @file * + * @brief Get Foreground Process Group ID + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -18,6 +23,9 @@ #include <sys/types.h> #include <unistd.h> +/** + * POSIX 1003.1b 7.2.3 - Get Foreground Process Group ID + */ pid_t tcgetpgrp(int fd __attribute__((unused))) { return getpid(); diff --git a/cpukit/libcsupport/src/tcsendbreak.c b/cpukit/libcsupport/src/tcsendbreak.c index 43ebcaafd9..11ac828205 100644 --- a/cpukit/libcsupport/src/tcsendbreak.c +++ b/cpukit/libcsupport/src/tcsendbreak.c @@ -1,6 +1,11 @@ -/* - * tcsendbreak() - POSIX 1003.1b 7.2.2 - Line Control Functions +/** + * @file * + * @brief Line Control Functions + * @ingroup Termios + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * diff --git a/cpukit/libcsupport/src/tcsetattr.c b/cpukit/libcsupport/src/tcsetattr.c index f0f3b55ecc..07a71ba7d0 100644 --- a/cpukit/libcsupport/src/tcsetattr.c +++ b/cpukit/libcsupport/src/tcsetattr.c @@ -1,6 +1,11 @@ -/* - * tcsetattr() - POSIX 1003.1b 7.2.1 - Get and Set State +/** + * @file * + * @brief Get and Set State + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -26,6 +31,9 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> +/** + * POSIX 1003.1b 7.2.1 - Get and Set State + */ int tcsetattr( int fd, int opt, diff --git a/cpukit/libcsupport/src/tcsetpgrp.c b/cpukit/libcsupport/src/tcsetpgrp.c index 1f547c5229..5b0d1f989e 100644 --- a/cpukit/libcsupport/src/tcsetpgrp.c +++ b/cpukit/libcsupport/src/tcsetpgrp.c @@ -1,6 +1,11 @@ -/* - * tcsetprgrp() - POSIX 1003.1b 7.2.4 - Set Foreground Process Group ID +/** + * @file * + * @brief Set Foreground Process Group ID + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * @@ -24,6 +29,9 @@ #include <rtems/libio.h> +/** + * POSIX 1003.1b 7.2.4 - Set Foreground Process Group ID + */ int tcsetpgrp( int fd __attribute__((unused)), pid_t pid __attribute__((unused)) ) diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c index bcf8d8acb3..cd127f80fc 100644 --- a/cpukit/libcsupport/src/termios.c +++ b/cpukit/libcsupport/src/termios.c @@ -354,6 +354,29 @@ drainOutput (struct rtems_termios_tty *tty) } } +static void +flushOutput (struct rtems_termios_tty *tty) +{ + rtems_interrupt_level level; + + rtems_interrupt_disable (level); + tty->rawOutBuf.Tail = 0; + tty->rawOutBuf.Head = 0; + tty->rawOutBufState = rob_idle; + rtems_interrupt_enable (level); +} + +static void +flushInput (struct rtems_termios_tty *tty) +{ + rtems_interrupt_level level; + + rtems_interrupt_disable (level); + tty->rawInBuf.Tail = 0; + tty->rawInBuf.Head = 0; + rtems_interrupt_enable (level); +} + rtems_status_code rtems_termios_close (void *arg) { @@ -572,6 +595,24 @@ rtems_termios_ioctl (void *arg) drainOutput (tty); break; + case RTEMS_IO_TCFLUSH: + switch ((intptr_t) args->buffer) { + case TCIFLUSH: + flushInput (tty); + break; + case TCOFLUSH: + flushOutput (tty); + break; + case TCIOFLUSH: + flushOutput (tty); + flushInput (tty); + break; + default: + sc = RTEMS_INVALID_NAME; + break; + } + break; + case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; diff --git a/cpukit/libcsupport/src/termios_baud2index.c b/cpukit/libcsupport/src/termios_baud2index.c index f8454e6f1c..9ced4b20ba 100644 --- a/cpukit/libcsupport/src/termios_baud2index.c +++ b/cpukit/libcsupport/src/termios_baud2index.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Convert Bxxx Constant to Index + * @ingroup TermiostypesSupport + */ + /* * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). diff --git a/cpukit/libcsupport/src/termios_baud2num.c b/cpukit/libcsupport/src/termios_baud2num.c index 1da2f37e9c..770e670111 100644 --- a/cpukit/libcsupport/src/termios_baud2num.c +++ b/cpukit/libcsupport/src/termios_baud2num.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Convert Baud Part of Termios control flags to an integral Baud Value + * @ingroup TermiostypesSupport + */ + /* * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). diff --git a/cpukit/libcsupport/src/termios_baudtable.c b/cpukit/libcsupport/src/termios_baudtable.c index d1d70cb19a..a3c0b78c33 100644 --- a/cpukit/libcsupport/src/termios_baudtable.c +++ b/cpukit/libcsupport/src/termios_baudtable.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief RTEMS Termios Baud Table + * @ingroup TermiostypesSupport + */ + /* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). diff --git a/cpukit/libcsupport/src/termios_num2baud.c b/cpukit/libcsupport/src/termios_num2baud.c index dc31ca7fc4..186922f978 100644 --- a/cpukit/libcsupport/src/termios_num2baud.c +++ b/cpukit/libcsupport/src/termios_num2baud.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Converts the Integral Baud to Termios Control Flag Representation + * @ingroup TermiostypesSupport + */ + /* * COPYRIGHT (c) 1989-2008. * On-Line Applications Research Corporation (OAR). diff --git a/cpukit/libcsupport/src/termiosinitialize.c b/cpukit/libcsupport/src/termiosinitialize.c index 428458cc1a..11a1ef365b 100644 --- a/cpukit/libcsupport/src/termiosinitialize.c +++ b/cpukit/libcsupport/src/termiosinitialize.c @@ -1,6 +1,11 @@ -/* - * Termios initialization routine +/** + * @file * + * @brief Termios Initialization + * @ingroup Termios + */ + +/* * Author: * W. Eric Norum * Saskatchewan Accelerator Laboratory diff --git a/cpukit/libcsupport/src/truncate.c b/cpukit/libcsupport/src/truncate.c index 5d58128dd3..654d99e4d9 100644 --- a/cpukit/libcsupport/src/truncate.c +++ b/cpukit/libcsupport/src/truncate.c @@ -1,10 +1,11 @@ -/* - * truncate() - Truncate a File to the Specified Length - * - * This routine is not defined in the POSIX 1003.1b standard but is - * commonly supported on most UNIX and POSIX systems. It is provided - * for compatibility. +/** + * @file * + * @brief Truncate a File to the Specified Length + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -21,6 +22,11 @@ #include <errno.h> #include <fcntl.h> +/** + * This routine is not defined in the POSIX 1003.1b standard but is + * commonly supported on most UNIX and POSIX systems. It is provided + * for compatibility. + */ int truncate( const char *path, off_t length diff --git a/cpukit/libcsupport/src/umask.c b/cpukit/libcsupport/src/umask.c index d9b5580dba..1a5daa51cd 100644 --- a/cpukit/libcsupport/src/umask.c +++ b/cpukit/libcsupport/src/umask.c @@ -1,6 +1,11 @@ -/* - * umask() - POSIX 1003.1b 5.3.3 - Set File Creation Mask +/** + * @file * + * @brief Set File Creation Mask + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -19,6 +24,9 @@ #include <rtems/libio_.h> +/** + * POSIX 1003.1b 5.3.3 - Set File Creation Mask + */ mode_t umask( mode_t cmask ) { mode_t old_mask; diff --git a/cpukit/libcsupport/src/unlink.c b/cpukit/libcsupport/src/unlink.c index a007cc293b..dbeacf4ea8 100644 --- a/cpukit/libcsupport/src/unlink.c +++ b/cpukit/libcsupport/src/unlink.c @@ -1,6 +1,11 @@ -/* - * unlink() - POSIX 1003.1b - 5.5.1 - Remove an existing link +/** + * @file * + * @brief Remove an Existing Link + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -17,6 +22,9 @@ #include <rtems/libio_.h> +/** + * POSIX 1003.1b - 5.5.1 - Remove an existing link + */ int unlink( const char *path ) { int rv = 0; @@ -49,16 +57,13 @@ int unlink( const char *path ) return rv; } -/* - * _unlink_r - * - * This is the Newlib dependent reentrant version of unlink(). - */ - #if defined(RTEMS_NEWLIB) #include <reent.h> +/** + * This is the Newlib dependent reentrant version of unlink(). + */ int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path diff --git a/cpukit/libcsupport/src/unmount.c b/cpukit/libcsupport/src/unmount.c index a6e0f40442..06141b599a 100644 --- a/cpukit/libcsupport/src/unmount.c +++ b/cpukit/libcsupport/src/unmount.c @@ -1,11 +1,11 @@ -/* - * unmount() - Unmount a File System - * - * This routine is not defined in the POSIX 1003.1b standard but - * in some form is supported on most UNIX and POSIX systems. This - * routine is necessary to mount instantiations of a file system - * into the file system name space. +/** + * @file * + * @brief Unmount a File System + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * @@ -34,6 +34,12 @@ static bool contains_root_or_current_directory( return mt_entry == root->mt_entry || mt_entry == current->mt_entry; } +/** + * This routine is not defined in the POSIX 1003.1b standard but + * in some form is supported on most UNIX and POSIX systems. This + * routine is necessary to mount instantiations of a file system + * into the file system name space. + */ int unmount( const char *path ) { int rv = 0; diff --git a/cpukit/libcsupport/src/utimes.c b/cpukit/libcsupport/src/utimes.c index 648cb8b7a6..ef982d1c60 100644 --- a/cpukit/libcsupport/src/utimes.c +++ b/cpukit/libcsupport/src/utimes.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Change File Last Access and Modification Times + * @ingroup libcsupport + */ + /* * Written by: Vinu Rajashekhar <vinutheraj@gmail.com> * diff --git a/cpukit/libcsupport/src/vprintk.c b/cpukit/libcsupport/src/vprintk.c index 2524e88a3f..b1aceccbe9 100644 --- a/cpukit/libcsupport/src/vprintk.c +++ b/cpukit/libcsupport/src/vprintk.c @@ -1,3 +1,10 @@ +/** + * @file + * + * @brief Print Formatted Output + * @ingroup libcsupport + */ + /* * (C) Copyright 1997 - * - NavIST Group - Real-Time Distributed Systems and Industrial Automation @@ -31,9 +38,7 @@ static void printNum( char lead ); -/* - * vprintk - * +/** * A simplified version of printf intended for use when the * console is not yet initialized or in ISR's. * @@ -146,11 +151,10 @@ void vprintk( } } -/* - * printNum - print number in a given base. - * Arguments - * num - number to print - * base - base used to print the number. +/** + * @brief Print Number in a Given Base + * @param[in] num is the number to print + * @param[in] base is the base used to print the number */ static void printNum( long num, diff --git a/cpukit/libcsupport/src/write.c b/cpukit/libcsupport/src/write.c index dc1255867d..e96e938b0b 100644 --- a/cpukit/libcsupport/src/write.c +++ b/cpukit/libcsupport/src/write.c @@ -1,6 +1,11 @@ -/* - * write() - POSIX 1003.1b 6.4.2 - Write to a File +/** + * @file * + * @brief Write to a File + * @ingroup libcsupport + */ + +/* * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * @@ -16,13 +21,12 @@ #include <rtems/libio_.h> #include <rtems/seterr.h> -/* - * write - * - * This routine writes count bytes from from buffer pointed to by buffer - * to the file associated with the open file descriptor, fildes. +/** + * POSIX 1003.1b 6.4.2 - Write to a File + * + * This routine writes count bytes from from buffer pointed to by buffer + * to the file associated with the open file descriptor, fildes. */ - ssize_t write( int fd, const void *buffer, |