[PATCH 4/6] capture: Remove whitespace and fix copyrights.

Jennifer Averett jennifer.averett at oarcorp.com
Thu Nov 20 21:05:22 UTC 2014


---
 cpukit/libmisc/capture/capture-cli.h            |  2 +-
 cpukit/libmisc/capture/capture.h                | 60 ++++++++++++-------------
 cpukit/libmisc/capture/capture_buffer.c         |  6 +--
 cpukit/libmisc/capture/capture_buffer.h         |  6 +--
 cpukit/libmisc/capture/capture_user_extension.c | 17 +++----
 cpukit/libmisc/capture/captureimpl.h            | 25 ++++++-----
 6 files changed, 55 insertions(+), 61 deletions(-)

diff --git a/cpukit/libmisc/capture/capture-cli.h b/cpukit/libmisc/capture/capture-cli.h
index 8f97522..7f07766 100644
--- a/cpukit/libmisc/capture/capture-cli.h
+++ b/cpukit/libmisc/capture/capture-cli.h
@@ -12,7 +12,7 @@
   All rights reserved Objective Design Systems Pty Ltd, 2002
   Chris Johns (ccj at acm.org)
 
-  COPYRIGHT (c) 1989-1998.
+  COPYRIGHT (c) 1989-2014.
   On-Line Applications Research Corporation (OAR).
 
   The license and distribution terms for this file may be
diff --git a/cpukit/libmisc/capture/capture.h b/cpukit/libmisc/capture/capture.h
index c8bc270..63d1343 100644
--- a/cpukit/libmisc/capture/capture.h
+++ b/cpukit/libmisc/capture/capture.h
@@ -15,7 +15,7 @@
   All rights reserved Objective Design Systems Pty Ltd, 2002
   Chris Johns (ccj at acm.org)
 
-  COPYRIGHT (c) 1989-1998.
+  COPYRIGHT (c) 1989-2014
   On-Line Applications Research Corporation (OAR).
 
   The license and distribution terms for this file may be
@@ -245,8 +245,8 @@ typedef void (*rtems_capture_timestamp)(rtems_capture_time_t* time);
  * initialisation.
  *
  * @param[in] size The number of capture records to define.
- * @param[in] timestamp The timestamp callout handler to use. If the 
- *            the handler is NULL a default  nano-second timestamp 
+ * @param[in] timestamp The timestamp callout handler to use. If the
+ *            the handler is NULL a default  nano-second timestamp
  *            will be used.
  *
  * @retval This method returns RTEMS_SUCCESSFUL if there was not an
@@ -390,7 +390,7 @@ rtems_capture_watch_global (bool enable);
  *
  * This function returns the global watch state.
  *
- * @retval This method returns true  if the global watch 
+ * @retval This method returns true  if the global watch
  *         is on.  Otherwise, it returns false.
  */
 bool
@@ -419,7 +419,7 @@ rtems_capture_watch_ceiling (rtems_task_priority ceiling);
  *
  * This function gets the watch ceiling.
  *
- * @retval The priority level immediately above that at which events 
+ * @retval The priority level immediately above that at which events
  *         from tasks are not captured.
  */
 rtems_task_priority
@@ -595,7 +595,7 @@ void rtems_capture_initialize_task( rtems_tcb* tcb );
 
 /**
  * @brief Capture record task.
- * 
+ *
  * This function records a new capture task record.
  *
  * @param[in] tcb is the task control block for the task
@@ -617,7 +617,7 @@ static inline bool rtems_capture_task_recorded( rtems_tcb* tcb ) {
 /**
  * @brief Capture task initialized
  *
- * This function returns true if this task information has been 
+ * This function returns true if this task information has been
  * initialized.
  *
  * @param[in] tcb is the task control block for the task
@@ -628,11 +628,11 @@ static inline bool rtems_capture_task_initialized( rtems_tcb* tcb ) {
 
 /**
  * @brief Capture get task id.
- * 
+ *
  * This function returns the task id.
  *
  * @param[in] task The capture task.
- * 
+ *
  * @retval This function returns the task id.
  */
 static inline rtems_id
@@ -643,11 +643,11 @@ rtems_capture_task_id (rtems_tcb* tcb)
 
 /**
  * @brief Capture get task state.
- * 
+ *
  * This function returns the task state.
  *
  * @param[in] task The capture task.
- * 
+ *
  * @retval This function returns the task state.
  */
 static inline States_Control
@@ -660,11 +660,11 @@ rtems_capture_task_state (rtems_tcb* tcb)
 
 /**
  * @brief Capture get task name.
- * 
+ *
  * This function returns the task name.
  *
  * @param[in] task The capture task.
- * 
+ *
  * @retval This function returns the task name.
  */
 static inline rtems_name
@@ -677,11 +677,11 @@ rtems_capture_task_name (rtems_tcb* tcb)
 
 /**
  * @brief Capture get task flags.
- * 
+ *
  * This function returns the task flags.
  *
  * @param[in] task The capture task.
- * 
+ *
  * @retval This function returns the task flags.
  */
 static inline uint32_t
@@ -692,11 +692,11 @@ rtems_capture_task_flags (rtems_tcb* tcb)
 
 /**
  * @brief Capture get task control
- * 
+ *
  * This function returns the task control if present.
  *
  * @param[in] task The capture task.
- * 
+ *
  * @retval This function returns the task control if present.
  */
 static inline rtems_capture_control_t*
@@ -707,11 +707,11 @@ rtems_capture_task_control (rtems_tcb* tcb)
 
 /**
  * @brief Capture get task control flags.
- * 
+ *
  * This function returns the task control flags if a control is present.
  *
  * @param[in] task The capture task.
- * 
+ *
  * @retval This function returns the task control flags if a control is present.
  */
 static inline uint32_t
@@ -725,12 +725,12 @@ rtems_capture_task_control_flags (rtems_tcb* tcb)
 
 /**
  * @brief Capture get task start priority.
- * 
+ *
  * This function returns the tasks start priority. The tracer needs this
  * to track where the task's priority goes.
  *
  * @param[in] task The capture task.
- * 
+ *
  * @retval This function returns the tasks start priority. The tracer needs this
  * to track where the task's priority goes.
  */
@@ -744,11 +744,11 @@ rtems_capture_task_start_priority (rtems_tcb* tcb)
 
 /**
  * @brief Capture get task real priority.
- * 
+ *
  * This function returns the tasks real priority.
  *
  * @param[in] task The capture task.
- * 
+ *
  * @retval This function returns the tasks real priority.
  */
 static inline rtems_task_priority
@@ -759,11 +759,11 @@ rtems_capture_task_real_priority (rtems_tcb* tcb)
 
 /**
  * @brief Capture get task current priority.
- * 
+ *
  * This function returns the tasks current priority.
  *
  * @param[in] task The capture task.
- * 
+ *
  * @retval This function returns the tasks current priority.
  */
 static inline rtems_task_priority
@@ -786,12 +786,12 @@ rtems_capture_get_control_list (void);
 
 /**
  * @brief Capture get next capture control.
- * 
+ *
  * This function returns the pointer to the next control in the list. The
  * pointer NULL terminates the list.
  *
  * @param[in] control the current capture control.
- * 
+ *
  * @retval This function returns the pointer to the next control in the list. The
  * pointer NULL terminates the list.
  */
@@ -803,11 +803,11 @@ rtems_capture_next_control (rtems_capture_control_t* control)
 
 /**
  * @brief Capture get capture control id.
- * 
+ *
  * This function returns the control id.
  *
  * @param[in] control the capture control.
- * 
+ *
  * @retval This function returns the control id.
  */
 static inline rtems_id
@@ -929,7 +929,7 @@ rtems_capture_control_by_name (rtems_capture_control_t* control, int by)
  * @brief Capture get capture control by task id.
  *
  * This function returns the control @a by task id
- * 
+ *
  * @retval This function returns the control @a by task id.
  */
 static inline rtems_id
diff --git a/cpukit/libmisc/capture/capture_buffer.c b/cpukit/libmisc/capture/capture_buffer.c
index 9557f70..6f557a9 100644
--- a/cpukit/libmisc/capture/capture_buffer.c
+++ b/cpukit/libmisc/capture/capture_buffer.c
@@ -84,10 +84,10 @@ void * rtems_capture_buffer_allocate( rtems_capture_buffer_t* buffer, size_t siz
   buffer->head = size;
   buffer->count = buffer->count + size;
 
-  return ptr; 
+  return ptr;
 }
 
-void *rtems_capture_buffer_free( rtems_capture_buffer_t* buffer, size_t size ) 
+void *rtems_capture_buffer_free( rtems_capture_buffer_t* buffer, size_t size )
 {
     static void             *ptr;
     static uint32_t         next;
@@ -112,6 +112,6 @@ void *rtems_capture_buffer_free( rtems_capture_buffer_t* buffer, size_t size )
     } else {
       buffer->tail = next;
     }
-     
+
     return ptr;
 }
diff --git a/cpukit/libmisc/capture/capture_buffer.h b/cpukit/libmisc/capture/capture_buffer.h
index a01ca29..ebcc464 100644
--- a/cpukit/libmisc/capture/capture_buffer.h
+++ b/cpukit/libmisc/capture/capture_buffer.h
@@ -79,14 +79,14 @@ static inline bool rtems_capture_buffer_has_wrapped( rtems_capture_buffer_t* buf
   return false;
 }
 
-static inline void *rtems_capture_buffer_peek(  rtems_capture_buffer_t* buffer, size_t *size ) 
+static inline void *rtems_capture_buffer_peek(  rtems_capture_buffer_t* buffer, size_t *size )
 {
   if (rtems_capture_buffer_is_empty(buffer)) {
-    *size = 0; 
+    *size = 0;
     return NULL;
   }
 
-  if ( buffer->tail > buffer->head)  
+  if ( buffer->tail > buffer->head)
     *size = buffer->end - buffer->tail;
   else
     *size = buffer->head - buffer->tail;
diff --git a/cpukit/libmisc/capture/capture_user_extension.c b/cpukit/libmisc/capture/capture_user_extension.c
index 69b8d48..37372cb 100644
--- a/cpukit/libmisc/capture/capture_user_extension.c
+++ b/cpukit/libmisc/capture/capture_user_extension.c
@@ -5,7 +5,7 @@
   All rights reserved Objective Design Systems Pty Ltd, 2002
   Chris Johns (ccj at acm.org)
 
-  COPYRIGHT (c) 1989-2009.
+  COPYRIGHT (c) 1989-2014.
   On-Line Applications Research Corporation (OAR).
 
   The license and distribution terms for this file may be
@@ -18,10 +18,6 @@
   RTEMS Performance Monitoring and Measurement Framework.
 
   This is the Capture Engine component.
-rtems_status_code rtems_capture_user_extension_open(void);
-rtems_status_code rtems_capture_user_extension_close(void);
-
-
 */
 
 #ifdef HAVE_CONFIG_H
@@ -43,8 +39,8 @@ rtems_status_code rtems_capture_user_extension_close(void);
  */
 static rtems_id                 capture_id;
 
-static bool 
-rtems_capture_create_task (rtems_tcb* current_task, 
+static bool
+rtems_capture_create_task (rtems_tcb* current_task,
                            rtems_tcb* new_task);
 
 static void
@@ -95,7 +91,7 @@ static inline void rtems_capture_record (
 
   if (rtems_capture_filter( tcb, events) )
     return;
-  
+
   if (!rtems_capture_task_recorded (tcb))
     rtems_capture_record_task (tcb);
 
@@ -143,7 +139,6 @@ rtems_capture_create_task (rtems_tcb* ct,
    * The task pointers may not be known as the task may have
    * been created before the capture engine was open. Add them.
    */
-
   if (!rtems_capture_task_initialized (ct))
     rtems_capture_initialize_task (ct);
 
@@ -176,7 +171,7 @@ rtems_capture_start_task (rtems_tcb* ct,
   if (!rtems_capture_task_initialized (ct))
     rtems_capture_initialize_task (ct);
 
-  if (st == NULL)
+  if (st != NULL)
     rtems_capture_initialize_task (st);
 
   if (rtems_capture_trigger (ct, st, RTEMS_CAPTURE_START))
@@ -197,7 +192,6 @@ rtems_capture_restart_task (rtems_tcb* ct,
    * The task pointers may not be known as the task may have
    * been created before the capture engine was open. Add them.
    */
-
   if (!rtems_capture_task_initialized (ct))
     rtems_capture_initialize_task (ct);
 
@@ -302,7 +296,6 @@ rtems_capture_switch_task (rtems_tcb* ct,
   if (flags & RTEMS_CAPTURE_ON)
   {
     rtems_capture_time_t time;
-
     if (!rtems_capture_task_initialized (ct))
       rtems_capture_initialize_task (ct);
 
diff --git a/cpukit/libmisc/capture/captureimpl.h b/cpukit/libmisc/capture/captureimpl.h
index 44d81db..77a6f07 100644
--- a/cpukit/libmisc/capture/captureimpl.h
+++ b/cpukit/libmisc/capture/captureimpl.h
@@ -1,7 +1,7 @@
 /**
  * @file rtems/captureimpl.h
  *
- * @brief Capture Implementation file 
+ * @brief Capture Implementation file
  *
  * This file contains an interface between the capture engine and
  * capture user extension methods.
@@ -61,7 +61,7 @@ extern "C" {
  * @brief Capture set extension index.
  *
  * This function is used to set the extension index
- * for the capture engine.  
+ * for the capture engine.
  *
  * @param[in] index specifies the extension index to be
  * used for capture engine data.
@@ -86,7 +86,7 @@ int  rtems_capture_get_extension_index(void);
  *
  * @retval This method returns the global capture
  * flags.
- * 
+ *
  */
 uint32_t rtems_capture_get_flags(void);
 
@@ -138,7 +138,7 @@ bool rtems_capture_trigger (rtems_tcb* ft,
                             uint32_t   events);
 
 /**
- * @brief Capture append to record 
+ * @brief Capture append to record
  *
  * This function Capture appends data to a capture record.  It should
  * be called between rtems_capture_begin_add_record and
@@ -150,10 +150,10 @@ bool rtems_capture_trigger (rtems_tcb* ft,
  *
  * @retval This method returns a pointer which is used as a marker
  * for the next location in the capture record. it should only be
- * used as input into rtems_capture_append_to_record or 
+ * used as input into rtems_capture_append_to_record or
  * rtems_capture_end_add_record.
  */
-static void *rtems_capture_append_to_record(void*  rec, 
+static void *rtems_capture_append_to_record(void*  rec,
                                      void*  data,
                                      size_t size );
 
@@ -167,7 +167,7 @@ static void *rtems_capture_append_to_record(void*  rec,
  * @param[in] events specifies the events
  *
  * @retval This method returns true if this data should be
- * filtered from the log.  It returns false if this data 
+ * filtered from the log.  It returns false if this data
  * should be logged.
  */
 bool rtems_capture_filter( rtems_tcb*            task,
@@ -193,13 +193,13 @@ bool rtems_capture_filter( rtems_tcb*            task,
  *
  * This function appends data of a specifed size into a capture record.
  *
- * @param[in] rec specifies the next write point in the capture record 
+ * @param[in] rec specifies the next write point in the capture record
  * @param[in] data specifies the data to write
  * @param[in] size specifies the size of the data
  *
  * @retval This method returns the next write point in the capture record.
  */
-static inline void *rtems_capture_append_to_record(void*  rec, 
+static inline void *rtems_capture_append_to_record(void*  rec,
                                                    void*  data,
                                                    size_t size )
 {
@@ -235,9 +235,9 @@ void rtems_capture_get_time (rtems_capture_time_t* time);
 /**
  * @brief Capture record open.
  *
- * This function allocates a record and fills in the 
+ * This function allocates a record and fills in the
  * header information.  It does a lock acquire
- * which will remain in effect until 
+ * which will remain in effect until
  * rtems_capture_record_close is called.  This method
  * should only be used by rtems_capture_begin_add_record.
  *
@@ -256,7 +256,7 @@ void* rtems_capture_record_open (rtems_tcb*                    task,
 /**
  * @brief Capture record close.
  *
- * This function closes writing to capure record and 
+ * This function closes writing to capure record and
  * releases the lock that was held on the record. This
  * method should only be used by rtems_capture_end_add_record.
  *
@@ -265,6 +265,7 @@ void* rtems_capture_record_open (rtems_tcb*                    task,
  */
 void rtems_capture_record_close( void *rec, rtems_interrupt_lock_context* lock_context);
 
+
 /**
  * @brief Capture print trace records.
  *
-- 
1.8.1.4



More information about the devel mailing list