trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r884799 - /incubator/trafficserver/traffic/trunk/libinktomi++/ink_mutex.h
Date Fri, 27 Nov 2009 09:36:36 GMT
Author: pquerna
Date: Fri Nov 27 09:36:36 2009
New Revision: 884799

URL: http://svn.apache.org/viewvc?rev=884799&view=rev
Log:
TS-2: Remove identical code path for !linux && !freebsd, since we only support POSIX
threading right now..

Modified:
    incubator/trafficserver/traffic/trunk/libinktomi++/ink_mutex.h

Modified: incubator/trafficserver/traffic/trunk/libinktomi++/ink_mutex.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/trunk/libinktomi%2B%2B/ink_mutex.h?rev=884799&r1=884798&r2=884799&view=diff
==============================================================================
--- incubator/trafficserver/traffic/trunk/libinktomi++/ink_mutex.h (original)
+++ incubator/trafficserver/traffic/trunk/libinktomi++/ink_mutex.h Fri Nov 27 09:36:36 2009
@@ -87,37 +87,6 @@
   return pthread_mutex_destroy(m);
 }
 
-#if (HOST_OS != linux) && (HOST_OS != freebsd)
-static inline int
-ink_mutex_acquire(ink_mutex * m)
-{
-#ifdef DEBUG
-  int status;
-  if ((status = pthread_mutex_lock_inline(m)) != 0) {
-    fprintf(stderr, "pthread_mutex_lock() returned=%d\n", status);
-#else
-  if (pthread_mutex_lock_inline(m) != 0) {
-#endif
-    abort();
-  }
-  return 0;
-}
-
-static inline int
-ink_mutex_release(ink_mutex * m)
-{
-  if (pthread_mutex_unlock_inline(m) != 0) {
-    abort();
-  }
-  return 0;
-}
-
-static inline int
-ink_mutex_try_acquire(ink_mutex * m)
-{
-  return pthread_mutex_trylock_inline(m) == 0;
-}
-#else  // else is for linux or freebsd hosts
 static inline int
 ink_mutex_acquire(ink_mutex * m)
 {
@@ -141,7 +110,6 @@
 {
   return pthread_mutex_trylock(m) == 0;
 }
-#endif  // check for linux and freebsd hosts
 
 #endif /* #if defined(POSIX_THREAD) */
 



Mime
View raw message