[openrtm-commit:02266] r2871 - in branches/DEV_IQ_2016/OpenRTM-aist/src/lib: coil/common coil/posix/coil coil/win32/coil rtm

openrtm @ openrtm.org openrtm @ openrtm.org
2017年 1月 18日 (水) 19:19:28 JST


Author: sec_fukai
Date: 2017-01-18 19:19:27 +0900 (Wed, 18 Jan 2017)
New Revision: 2871

Modified:
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/Logger.h
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/posix/coil/DynamicLib.h
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Condition.h
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.h
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Mutex.h
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/Manager.cpp
   branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RTObject.h
Log:
[compat,->DEV_IQ_2016]Delete extra spaces. refs #3809

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/Logger.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/Logger.h	2017-01-18 10:15:28 UTC (rev 2870)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/common/Logger.h	2017-01-18 10:19:27 UTC (rev 2871)
@@ -320,7 +320,7 @@
      * @endif
      */
 
-    virtual int overflow (int c = traits_type::eof())
+    virtual int overflow(int c = traits_type::eof())
     {
       Guard guard(m_mutex);
 //      if (traits_type::eq_int_type(c, traits_type::eof()))

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/posix/coil/DynamicLib.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/posix/coil/DynamicLib.h	2017-01-18 10:15:28 UTC (rev 2870)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/posix/coil/DynamicLib.h	2017-01-18 10:19:27 UTC (rev 2871)
@@ -234,7 +234,7 @@
      *
      * @endif
      */
-    void *symbol (const char* symbol_name);
+    void *symbol(const char* symbol_name);
 
     /*!
      * @if jp

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Condition.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Condition.h	2017-01-18 10:15:28 UTC (rev 2870)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Condition.h	2017-01-18 10:19:27 UTC (rev 2871)
@@ -52,18 +52,18 @@
   } pthread_cond_t;
 
 
-  static int pthread_cond_init (pthread_cond_t *cv)
+  static int pthread_cond_init(pthread_cond_t *cv)
   {
     cv->waiters_count_ = 0;
     cv->was_broadcast_ = 0;
-    cv->sema_ = ::CreateSemaphore (NULL,       // no security
+    cv->sema_ = ::CreateSemaphore(NULL,       // no security
                                   0,           // initially 0
                                   0x7fffffff,  // max count
                                   NULL);      // unnamed
-    cv->waiters_done_ = ::CreateEvent (NULL,  // no security
-                                     FALSE,  // auto-reset
-                                     FALSE,  // non-signaled initially
-                                     NULL);  // unnamed
+    cv->waiters_done_ = ::CreateEvent(NULL,  // no security
+                                      FALSE,  // auto-reset
+                                      FALSE,  // non-signaled initially
+                                      NULL);  // unnamed
     return 0;
   }
 
@@ -239,8 +239,8 @@
      *
      * @endif
      */
-  int pthread_cond_wait (coil::pthread_cond_t *cv,
-                         coil::Mutex *external_mutex, DWORD aMilliSecond)
+  int pthread_cond_wait(coil::pthread_cond_t *cv,
+                        coil::Mutex *external_mutex, DWORD aMilliSecond)
   {
     DWORD result;
 
@@ -254,8 +254,8 @@
     // are called by another thread.
 //    std::cout << "Before SignalObjectAndWait [wait with time(" << milliSecond
 //              << ")]" << std::endl << std::flush ;
-    result = SignalObjectAndWait (external_mutex->mutex_,
-                                  cv->sema_, aMilliSecond, FALSE);
+    result = SignalObjectAndWait(external_mutex->mutex_,
+                                 cv->sema_, aMilliSecond, FALSE);
 
 //    char * p;
 //    switch (result) {
@@ -290,20 +290,23 @@
 
     // If we're the last waiter thread during this particular broadcast
     // then let all the other threads proceed.
-    if (last_waiter) {
-      // This call atomically signals the <waiters_done_> event and
-      // waits until it can acquire the <external_mutex>.  This is
-      // required to ensure fairness.
-      DWORD result = SignalObjectAndWait (cv->waiters_done_,
-                                          external_mutex->mutex_,
-                                          INFINITE, FALSE);
-//      std::cout << "result " << result << std::endl;
-    } else {
-      // Always regain the external mutex since that's the guarantee we
-      // give to our callers.
-      ::WaitForSingleObject (external_mutex->mutex_, 0);
-    }
-  return result;
+    if (last_waiter)
+      {
+        // This call atomically signals the <waiters_done_> event and
+        // waits until it can acquire the <external_mutex>.  This is
+        // required to ensure fairness.
+        DWORD result = SignalObjectAndWait(cv->waiters_done_,
+                                           external_mutex->mutex_,
+                                           INFINITE, FALSE);
+//        std::cout << "result " << result << std::endl;
+      }
+    else
+      {
+        // Always regain the external mutex since that's the guarantee we
+        // give to our callers.
+        ::WaitForSingleObject(external_mutex->mutex_, 0);
+      }
+    return result;
   }
 
     /*!
@@ -325,7 +328,7 @@
      *
      * @endif
      */
-  int pthread_cond_signal (pthread_cond_t *cv)
+  int pthread_cond_signal(pthread_cond_t *cv)
   {
     cv->waiters_count_lock_.lock();
     int have_waiters = cv->waiters_count_ > 0;
@@ -334,7 +337,7 @@
     // If there aren't any waiters, then this is a no-op.
     if (have_waiters)
 //    std::cout << "Before ReleaseSemaphore(1)" << std::endl << std::flush ;
-      ReleaseSemaphore (cv->sema_, 1, 0);
+      ReleaseSemaphore(cv->sema_, 1, 0);
 //    std::cout << "After ReleaseSemaphore(1)" << std::endl << std::flush ;
     return 0;
   }
@@ -358,7 +361,7 @@
      *
      * @endif
      */
-  int pthread_cond_broadcast (pthread_cond_t *cv)
+  int pthread_cond_broadcast(pthread_cond_t *cv)
   {
     // This is needed to ensure that <waiters_count_> and <was_broadcast_> are
     // consistent relative to each other.
@@ -379,7 +382,7 @@
         // Wake up all the waiters atomically.
 //      std::cout << "Before ReleaseSemaphore(" << cv->waiters_count_ << ")"
 //                << std::endl << std::flush ;
-        ReleaseSemaphore (cv->sema_, cv->waiters_count_, 0);
+        ReleaseSemaphore(cv->sema_, cv->waiters_count_, 0);
 //      std::cout << "After ReleaseSemaphore(" << cv->waiters_count_ << ")"
 //                << std::endl << std::flush ;
 
@@ -387,7 +390,7 @@
 
         // Wait for all the awakened threads to acquire the counting
         // semaphore.
-        WaitForSingleObject (cv->waiters_done_, INFINITE);
+        WaitForSingleObject(cv->waiters_done_, INFINITE);
         // This assignment is okay, even without the <waiters_count_lock_> held
         // because no other waiter threads can wake up to access it.
         cv->was_broadcast_ = 0;

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.cpp	2017-01-18 10:15:28 UTC (rev 2870)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.cpp	2017-01-18 10:19:27 UTC (rev 2871)
@@ -142,7 +142,7 @@
    * @brief Return an address of the memory where a symbol was loaded
    * @endif
    */
-  void* DynamicLib::symbol (const char* symbol_name)
+  void* DynamicLib::symbol(const char* symbol_name)
   {
     if (m_handle == NULL) return NULL;
     return ::GetProcAddress(m_handle, symbol_name);

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.h	2017-01-18 10:15:28 UTC (rev 2870)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/DynamicLib.h	2017-01-18 10:19:27 UTC (rev 2871)
@@ -246,7 +246,7 @@
      *
      * @endif
      */
-    void *symbol (const char* symbol_name);
+    void *symbol(const char* symbol_name);
 
     /*!
      * @if jp

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Mutex.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Mutex.h	2017-01-18 10:15:28 UTC (rev 2870)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/coil/win32/coil/Mutex.h	2017-01-18 10:19:27 UTC (rev 2871)
@@ -66,7 +66,7 @@
       SECURITY_DESCRIPTOR sd_buffer;
       ::InitializeSecurityDescriptor(&sd_buffer,
                                      SECURITY_DESCRIPTOR_REVISION);
-      ::SetSecurityDescriptorDacl (&sd_buffer, TRUE, 0, FALSE);
+      ::SetSecurityDescriptorDacl(&sd_buffer, TRUE, 0, FALSE);
       m_Security_attr.nLength = sizeof(SECURITY_ATTRIBUTES);
       m_Security_attr.lpSecurityDescriptor = &sd_buffer;
       m_Security_attr.bInheritHandle = TRUE;

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/Manager.cpp
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/Manager.cpp	2017-01-18 10:15:28 UTC (rev 2870)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/Manager.cpp	2017-01-18 10:19:27 UTC (rev 2871)
@@ -56,7 +56,7 @@
 #endif
 
 //static sig_atomic_t g_mgrActive = true;
-extern "C" void handler (int)
+extern "C" void handler(int)
 {
   ::RTC::Manager::instance().terminate();
 }

Modified: branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RTObject.h
===================================================================
--- branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RTObject.h	2017-01-18 10:15:28 UTC (rev 2870)
+++ branches/DEV_IQ_2016/OpenRTM-aist/src/lib/rtm/RTObject.h	2017-01-18 10:19:27 UTC (rev 2871)
@@ -4636,7 +4636,7 @@
      */
     struct svc_name
     {
-      explicit svc_name (const char* id) : m_id(id) {}
+      explicit svc_name(const char* id) : m_id(id) {}
       bool operator()(const SDOPackage::ServiceProfile& prof)
       {
         return m_id == std::string(prof.id);



More information about the openrtm-commit mailing list