stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4091b4824d620dcd47e41eab7851a833376b2afe

commit 4091b4824d620dcd47e41eab7851a833376b2afe
Author: Stefan Schmidt <[email protected]>
Date:   Thu Oct 23 15:10:39 2014 +0200

    Revert "eina: Fix _timedwait to handle the given timeout on top of the 
absolute time"
    
    Not ready yet as it uses _eina_time_get which is internal only right now. 
Compiling
    works fine for efl alone as the private header is in teh include search 
part but it
    blows up when compiling elementary.
    
    Need to think a bit more about this. Maybe exposing _eina_time_get as API 
but that
    should wait until after the release.
    
    This reverts commit f0a02a92beff49879eba84b4d4eee265fe156511.
---
 src/lib/eina/eina_inline_lock_posix.x | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/src/lib/eina/eina_inline_lock_posix.x 
b/src/lib/eina/eina_inline_lock_posix.x
index 7897946..172e571 100644
--- a/src/lib/eina/eina_inline_lock_posix.x
+++ b/src/lib/eina/eina_inline_lock_posix.x
@@ -58,8 +58,6 @@ typedef void (*Eina_Lock_Bt_Func) ();
 #include "eina_inlist.h"
 #endif
 
-#include "eina_inline_private.h"
-
 typedef struct _Eina_Lock Eina_Lock;
 typedef struct _Eina_RWLock Eina_RWLock;
 typedef struct _Eina_Condition Eina_Condition;
@@ -378,14 +376,6 @@ eina_condition_timedwait(Eina_Condition *cond, double t)
 {
    struct timespec tv;
    Eina_Bool r;
-   time_t sec;
-   long nsec;
-
-   if (t < 0)
-     {
-        errno = EINVAL;
-        return EINA_FALSE;
-     }
 
 #ifdef EINA_HAVE_DEBUG_THREADS
    assert(_eina_threads_activated);
@@ -397,16 +387,8 @@ eina_condition_timedwait(Eina_Condition *cond, double t)
    pthread_mutex_unlock(&_eina_tracking_lock);
 #endif
 
-   _eina_time_get(&tv);
-   sec = (time_t)t;
-   nsec = (t - (double) sec) * 1000000000L;
-   tv.tv_sec += sec;
-   tv.tv_nsec += nsec;
-   if (tv.tv_nsec > 1000000000L)
-     {
-        tv.tv_sec++;
-        tv.tv_nsec -= 1000000000L;
-     }
+   tv.tv_sec = t;
+   tv.tv_nsec = (t - (double) tv.tv_sec) * 1000000000;
 
    r = pthread_cond_timedwait(&(cond->condition),
                              &(cond->lock->mutex),

-- 


Reply via email to