[PATCH] libcsupport: Clean up Doxygen Task #1
Gedare Bloom
gedare at rtems.org
Sat Dec 8 14:08:36 UTC 2012
From: Alex Ivanov <alexivanov97 at gmail.com>
http://www.google-melange.com/gci/task/view/google/gci2012/7985214
---
cpukit/libcsupport/include/rtems/assoc.h | 11 +++++++++++
cpukit/libcsupport/include/rtems/libio.h | 13 +++++++++----
cpukit/libcsupport/include/rtems/malloc.h | 11 +++++++++++
cpukit/libcsupport/include/sys/statvfs.h | 8 ++++++++
cpukit/libcsupport/include/sys/termios.h | 12 ++++++++++++
cpukit/libcsupport/src/_malloc_r.c | 8 ++++++--
.../libcsupport/src/assoclocalbyremotebitfield.c | 8 +++++---
cpukit/libcsupport/src/assocremotebylocal.c | 8 +++++---
cpukit/libcsupport/src/fstat.c | 9 +++++++--
cpukit/libcsupport/src/ftrylockfile.c | 11 ++++++++++-
cpukit/libcsupport/src/getpgrp.c | 10 ++++++++--
cpukit/libcsupport/src/getrusage.c | 7 +++++++
cpukit/libcsupport/src/lchown.c | 14 +++++++++++---
cpukit/libcsupport/src/lseek.c | 9 +++++++--
.../src/malloc_report_statistics_plugin.c | 9 +++++++--
cpukit/libcsupport/src/mount-mgr.c | 19 ++++++++++++++-----
cpukit/libcsupport/src/newlibc_exit.c | 17 +++++++++++++----
cpukit/libcsupport/src/open_dev_console.c | 12 +++++++-----
cpukit/libcsupport/src/rtems_heap_null_extend.c | 7 +++++++
cpukit/libcsupport/src/setuid.c | 10 ++++++++--
cpukit/libcsupport/src/statvfs.c | 7 +++++++
cpukit/libcsupport/src/strlcpy.c | 12 +++++++++---
cpukit/libcsupport/src/tcflush.c | 7 +++++++
cpukit/libcsupport/src/termios.c | 9 +++++++--
cpukit/libcsupport/src/writev.c | 9 +++++++--
25 files changed, 210 insertions(+), 47 deletions(-)
diff --git a/cpukit/libcsupport/include/rtems/assoc.h b/cpukit/libcsupport/include/rtems/assoc.h
index f55d3fe..eb03cb6 100644
--- a/cpukit/libcsupport/include/rtems/assoc.h
+++ b/cpukit/libcsupport/include/rtems/assoc.h
@@ -15,6 +15,14 @@
extern "C" {
#endif
+/**
+ * @defgroup AssocSupport RTEMS Associativity Support
+ *
+ * @ingroup libcsupport
+ *
+ * @brief RTEMS Associativity Routines
+ */
+
typedef struct {
const char *name;
uint32_t local_value;
@@ -83,6 +91,9 @@ char *rtems_assoc_name_by_remote_bitfield(
char *
);
+/**
+ * @brief RTEMS Assoc Local by Remote Bitfield
+ */
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *,
uint32_t
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index 9374f3a..ba2736f 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -1146,7 +1146,7 @@ int rtems_filesystem_default_fcntl(
typedef off_t rtems_off64_t __attribute__((deprecated));
/**
- * @brief Gets the mount handler for the file system @a type.
+ * @brief Gets the Mount Handler for the File System
*
* @return The file system mount handler associated with the @a type, or
* @c NULL if no such association exists.
@@ -1378,6 +1378,11 @@ void rtems_filesystem_initialize( void );
typedef void (*rtems_libio_init_functions_t)(void);
extern rtems_libio_init_functions_t rtems_libio_init_helper;
+/**
+ * @brief Open a Developer Console
+ *
+ * This is a replaceable stub which opens the console, if present.
+ */
void open_dev_console(void);
typedef void (*rtems_libio_supp_functions_t)(void);
@@ -1496,7 +1501,7 @@ extern const rtems_filesystem_table_t rtems_filesystem_table [];
extern rtems_chain_control rtems_filesystem_mount_table;
/**
- * @brief Registers a file system @a type.
+ * @brief Registers a File System
*
* The @a mount_h handler will be used to mount a file system of this @a type.
*
@@ -1509,7 +1514,7 @@ int rtems_filesystem_register(
);
/**
- * @brief Unregisters a file system @a type.
+ * @brief Unregisters a File System
*
* @retval 0 Successful operation.
* @retval -1 An error occured. The @c errno indicates the error.
@@ -1616,7 +1621,7 @@ typedef bool (*rtems_per_filesystem_routine)(
);
/**
- * @brief Iterates over all file system types.
+ * @brief Iterates over all File System Types
*
* For each file system type the @a routine will be called with the entry and
* the @a routine_arg parameter.
diff --git a/cpukit/libcsupport/include/rtems/malloc.h b/cpukit/libcsupport/include/rtems/malloc.h
index 9d475d3..54a2324 100644
--- a/cpukit/libcsupport/include/rtems/malloc.h
+++ b/cpukit/libcsupport/include/rtems/malloc.h
@@ -27,6 +27,14 @@ extern "C" {
#endif
/**
+ * @defgroup MallocSupport Malloc Support
+ *
+ * @ingroup libcsupport
+ *
+ * @brief RTEMS extensions to the Malloc Family
+ */
+
+/**
* @brief C program heap control.
*
* This is the pointer to the heap control structure used to manage the C
@@ -85,6 +93,9 @@ void *rtems_heap_extend_via_sbrk(
size_t alloc_size
);
+/**
+ * @brief RTEMS Extend NULL Heap
+ */
void *rtems_heap_null_extend(
Heap_Control *heap,
size_t alloc_size
diff --git a/cpukit/libcsupport/include/sys/statvfs.h b/cpukit/libcsupport/include/sys/statvfs.h
index 13185e7..c5be7d2 100644
--- a/cpukit/libcsupport/include/sys/statvfs.h
+++ b/cpukit/libcsupport/include/sys/statvfs.h
@@ -27,6 +27,14 @@
extern "C" {
#endif
+/**
+ * @defgroup StatvfsSupport File System Information Support
+ *
+ * @ingroup libcsupport
+ *
+ * @brief File System Information
+ */
+
typedef uint64_t fsblkcnt_t;
typedef uint32_t fsfilcnt_t;
diff --git a/cpukit/libcsupport/include/sys/termios.h b/cpukit/libcsupport/include/sys/termios.h
index d763c89..1b9a5e4 100644
--- a/cpukit/libcsupport/include/sys/termios.h
+++ b/cpukit/libcsupport/include/sys/termios.h
@@ -22,6 +22,14 @@
extern "C" {
#endif
+/**
+ * @defgroup TermiosSupport POSIX Termios Support
+ *
+ * @ingroup libcsupport
+ *
+ * @brief POSIX Termios Implementation for RTEMS Console Device Driver
+ */
+
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
@@ -186,6 +194,10 @@ struct termios {
int tcdrain(int);
int tcflow(int, int);
+
+/**
+ * @brief Flush non-transmitted Output Data, non-read Input Data or Both
+ */
int tcflush(int, int);
int tcgetattr(int, struct termios *);
int tcsetattr(int, int, struct termios *);
diff --git a/cpukit/libcsupport/src/_malloc_r.c b/cpukit/libcsupport/src/_malloc_r.c
index e3d1911..a4c74a6 100644
--- a/cpukit/libcsupport/src/_malloc_r.c
+++ b/cpukit/libcsupport/src/_malloc_r.c
@@ -1,6 +1,10 @@
-/*
- * _malloc_r Implementation
+/**
+ * @file
*
+ * @brief Request Allocation of an Object
+ * @ingroup libcsupport
+ */
+/*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/assoclocalbyremotebitfield.c b/cpukit/libcsupport/src/assoclocalbyremotebitfield.c
index 23b4c72..b4b4b65 100644
--- a/cpukit/libcsupport/src/assoclocalbyremotebitfield.c
+++ b/cpukit/libcsupport/src/assoclocalbyremotebitfield.c
@@ -1,6 +1,8 @@
-/*
- * assoc.c
- * rtems assoc routines
+/**
+ * @file
+ *
+ * @brief RTEMS Assoc Local by Remote Bitfield
+ * @ingroup AssocSupport
*/
#if HAVE_CONFIG_H
diff --git a/cpukit/libcsupport/src/assocremotebylocal.c b/cpukit/libcsupport/src/assocremotebylocal.c
index cd5fa0c..b981873 100644
--- a/cpukit/libcsupport/src/assocremotebylocal.c
+++ b/cpukit/libcsupport/src/assocremotebylocal.c
@@ -1,6 +1,8 @@
-/*
- * assoc.c
- * rtems assoc routines
+/**
+ * @file
+ *
+ * @brief RTEMS Assoc Remote by Local
+ * @ingroup AssocSupport
*/
#if HAVE_CONFIG_H
diff --git a/cpukit/libcsupport/src/fstat.c b/cpukit/libcsupport/src/fstat.c
index ca0aa51..1655f86 100644
--- a/cpukit/libcsupport/src/fstat.c
+++ b/cpukit/libcsupport/src/fstat.c
@@ -1,6 +1,11 @@
-/*
- * fstat() - POSIX 1003.1b 5.6.2 - Get File Status
+/**
+ * @file
*
+ * @brief Get File Status
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/ftrylockfile.c b/cpukit/libcsupport/src/ftrylockfile.c
index 54d5419..1aee952 100644
--- a/cpukit/libcsupport/src/ftrylockfile.c
+++ b/cpukit/libcsupport/src/ftrylockfile.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Stdio Locking
+ * @ingroup libcsupport
+ */
+
/*
* Copyright (c) 2009 by
* Ralf Corsépius, Ulm, Germany. All rights reserved.
@@ -16,7 +23,9 @@
#include <rtems/seterr.h>
#include <errno.h>
-/* This is a non-functional stub */
+/**
+ * This is a non-functional stub
+ */
int ftrylockfile(FILE* file __attribute__((unused)))
{
rtems_set_errno_and_return_minus_one( ENOTSUP );
diff --git a/cpukit/libcsupport/src/getpgrp.c b/cpukit/libcsupport/src/getpgrp.c
index 9ff1dd6..98f250b 100644
--- a/cpukit/libcsupport/src/getpgrp.c
+++ b/cpukit/libcsupport/src/getpgrp.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get Process Group IDs
+ * @ingroup libcsupport
+ */
+
#if HAVE_CONFIG_H
#include "config.h"
#endif
@@ -5,10 +12,9 @@
#include <unistd.h>
#include <rtems/score/object.h>
-/*
+/**
* 4.3.1 Get Process Group IDs, P1003.1b-1993, p. 89
*/
-
pid_t getpgrp( void )
{
/*
diff --git a/cpukit/libcsupport/src/getrusage.c b/cpukit/libcsupport/src/getrusage.c
index a94c4c6..85fdc0d 100644
--- a/cpukit/libcsupport/src/getrusage.c
+++ b/cpukit/libcsupport/src/getrusage.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get Resource Usage
+ * @ingroup libcsupport
+ */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
diff --git a/cpukit/libcsupport/src/lchown.c b/cpukit/libcsupport/src/lchown.c
index 406ac59..81deea8 100644
--- a/cpukit/libcsupport/src/lchown.c
+++ b/cpukit/libcsupport/src/lchown.c
@@ -1,7 +1,11 @@
-/*
- * lchown() - POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
- * But Do Not Follow a Symlink
+/**
+ * @file
*
+ * @brief Change Owner and Group of a File
+ * @ingroup libcsupport
+ */
+
+/*
* Written by: Vinu Rajashekhar <vinutheraj at gmail.com>
*
* The license and distribution terms for this file may be
@@ -17,6 +21,10 @@
#include <rtems/libio_.h>
+/**
+ * POSIX 1003.1b 5.6.5 - Change Owner and Group of a File
+ * But Do Not Follow a Symlink
+ */
int lchown( const char *path, uid_t owner, gid_t group )
{
return rtems_filesystem_chown(
diff --git a/cpukit/libcsupport/src/lseek.c b/cpukit/libcsupport/src/lseek.c
index 18cf446..e8a917f 100644
--- a/cpukit/libcsupport/src/lseek.c
+++ b/cpukit/libcsupport/src/lseek.c
@@ -1,6 +1,11 @@
-/*
- * lseek() - POSIX 1003.1b 6.5.3 - Reposition Read/Write File Offset
+/**
+ * @file
*
+ * @brief Reposition Read and Write File Offset
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
diff --git a/cpukit/libcsupport/src/malloc_report_statistics_plugin.c b/cpukit/libcsupport/src/malloc_report_statistics_plugin.c
index 04c7bb4..bc1e5b6 100644
--- a/cpukit/libcsupport/src/malloc_report_statistics_plugin.c
+++ b/cpukit/libcsupport/src/malloc_report_statistics_plugin.c
@@ -1,6 +1,11 @@
-/*
- * malloc_report_statistics with plugin 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/mount-mgr.c b/cpukit/libcsupport/src/mount-mgr.c
index 49eb6ab..7e25393 100644
--- a/cpukit/libcsupport/src/mount-mgr.c
+++ b/cpukit/libcsupport/src/mount-mgr.c
@@ -1,9 +1,11 @@
-/*
- * mount()
- *
- * Mange the mount table. You can iterate on mounts and file systems, as well
- * as add and remove file systems not in the file system confiration table.
+/**
+ * @file
*
+ * @brief RTEMS File System Support
+ * @ingroup LibIO
+ */
+
+/*
* COPYRIGHT (c) Chris Johns <chrisj at rtems.org> 2010.
*
* Copyright (c) 2010 embedded brains GmbH.
@@ -29,6 +31,13 @@
#include <rtems/libio_.h>
+/*
+ * mount()
+ *
+ * Mange the mount table. You can iterate on mounts and file systems, as well
+ * as add and remove file systems not in the file system confiration table. *
+ */
+
typedef struct {
rtems_chain_node node;
rtems_filesystem_table_t entry;
diff --git a/cpukit/libcsupport/src/newlibc_exit.c b/cpukit/libcsupport/src/newlibc_exit.c
index 8e47b17..9896227 100644
--- a/cpukit/libcsupport/src/newlibc_exit.c
+++ b/cpukit/libcsupport/src/newlibc_exit.c
@@ -1,8 +1,11 @@
-/*
- * Implementation of hooks for the CYGNUS newlib libc
- * These hooks set things up so that:
- * + '_REENT' is switched at task switch time.
+/**
+ * @file
*
+ * @brief Newlibc Exit Support
+ * @ingroup libcsupport
+ */
+
+/*
* COPYRIGHT (c) 1994 by Division Incorporated
*
* The license and distribution terms for this file may be
@@ -34,6 +37,12 @@
#include <stdio.h>
+/*
+ * Implementation of hooks for the CYGNUS newlib libc
+ * These hooks set things up so that:
+ * + '_REENT' is switched at task switch time.
+ */
+
int _fwalk(struct _reent *ptr, int (*function) (FILE *) );
/* do we think we are reentrant? */
diff --git a/cpukit/libcsupport/src/open_dev_console.c b/cpukit/libcsupport/src/open_dev_console.c
index d204dee..711adcc 100644
--- a/cpukit/libcsupport/src/open_dev_console.c
+++ b/cpukit/libcsupport/src/open_dev_console.c
@@ -1,6 +1,11 @@
-/*
- * open_dev_console - open /dev/console
+/**
+ * @file
*
+ * @brief Open a Developer Console
+ * @ingroup LibIO
+ */
+
+/*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
@@ -17,9 +22,6 @@
#include <rtems/libio.h>
#include <fcntl.h>
-/*
- * This is a replaceable stub which opens the console, if present.
- */
void open_dev_console(void)
{
int stdin_fd;
diff --git a/cpukit/libcsupport/src/rtems_heap_null_extend.c b/cpukit/libcsupport/src/rtems_heap_null_extend.c
index a821ef4..1b9e037 100644
--- a/cpukit/libcsupport/src/rtems_heap_null_extend.c
+++ b/cpukit/libcsupport/src/rtems_heap_null_extend.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief RTEMS Extend NULL Heap
+ * @ingroup MallocSupport
+ */
+
/*
* Copyright (c) 2012 embedded brains GmbH. All rights reserved.
*
diff --git a/cpukit/libcsupport/src/setuid.c b/cpukit/libcsupport/src/setuid.c
index 8173976..135fce2 100644
--- a/cpukit/libcsupport/src/setuid.c
+++ b/cpukit/libcsupport/src/setuid.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Set User and Group IDs
+ * @ingroup libcsupport
+ */
+
/*
* COPYRIGHT (c) 1989-2010.
* On-Line Applications Research Corporation (OAR).
@@ -15,8 +22,7 @@
#include <rtems/userenv.h>
-/*
- *
+/**
* 4.2.2 Set User and Group IDs, P1003.1b-1993, p. 84
*/
int setuid(
diff --git a/cpukit/libcsupport/src/statvfs.c b/cpukit/libcsupport/src/statvfs.c
index 163d51e..01d18f7 100644
--- a/cpukit/libcsupport/src/statvfs.c
+++ b/cpukit/libcsupport/src/statvfs.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Get File System Statistics
+ * @ingroup StatvfsSupport
+ */
+
/*
* COPYRIGHT (c) 2009 Chris Johns <chrisj at rtems.org>
*
diff --git a/cpukit/libcsupport/src/strlcpy.c b/cpukit/libcsupport/src/strlcpy.c
index 2773e87..3f97e1a 100644
--- a/cpukit/libcsupport/src/strlcpy.c
+++ b/cpukit/libcsupport/src/strlcpy.c
@@ -1,6 +1,11 @@
-/*
- * utils.c - various utility functions used in pppd.
+/**
+ * @file
*
+ * @brief Copy null-terminated String
+ * @ingroup libcsupport
+ */
+
+/*
* Copyright (c) 1999 The Australian National University.
* All rights reserved.
*
@@ -24,7 +29,8 @@
#include <string.h>
#ifndef HAVE_STRLCPY
-/*
+
+/**
* strlcpy - like strcpy/strncpy, doesn't overflow destination buffer,
* always leaves destination null-terminated (for len > 0).
*/
diff --git a/cpukit/libcsupport/src/tcflush.c b/cpukit/libcsupport/src/tcflush.c
index d528c2a..70aaa96 100644
--- a/cpukit/libcsupport/src/tcflush.c
+++ b/cpukit/libcsupport/src/tcflush.c
@@ -1,3 +1,10 @@
+/**
+ * @file
+ *
+ * @brief Flush non-transmitted Output Data, non-read Input Data or Both
+ * @ingroup TermiosSupport
+ */
+
/*
* tcflush() - POSIX 1003.1b 7.2.2 - Line Control Functions
*
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c
index bcf8d8a..163742d 100644
--- a/cpukit/libcsupport/src/termios.c
+++ b/cpukit/libcsupport/src/termios.c
@@ -1,6 +1,11 @@
-/*
- * TERMIOS serial line support
+/**
+ * @file
*
+ * @brief Termios Serial Line Support
+ * @ingroup TermiosSupport
+ */
+
+/*
* Author:
* W. Eric Norum
* Saskatchewan Accelerator Laboratory
diff --git a/cpukit/libcsupport/src/writev.c b/cpukit/libcsupport/src/writev.c
index 47605a4..3416420 100644
--- a/cpukit/libcsupport/src/writev.c
+++ b/cpukit/libcsupport/src/writev.c
@@ -1,6 +1,11 @@
-/*
- * writev() - POSIX 1003.1 - Read a Vector
+/**
+ * @file
*
+ * @brief Write a Vector
+ * @ingroup libcsupport
+ */
+
+/*
* OpenGroup URL:
*
* http://www.opengroup.org/onlinepubs/009695399/functions/writev.html
--
1.7.1
More information about the devel
mailing list