diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-06 15:56:40 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-06 15:56:40 -0600 |
commit | e16866e072f94410321d70daedbcb855ea878cac (patch) | |
tree | ee3f52eabde7da1a0e6ca845fb9c2813cf1558cf /kdecore/malloc/x86.h | |
parent | a58c20c1a7593631a1b50213c805507ebc16adaf (diff) | |
download | tdelibs-e16866e072f94410321d70daedbcb855ea878cac.tar.gz tdelibs-e16866e072f94410321d70daedbcb855ea878cac.zip |
Actually move the kde files that were renamed in the last commit
Diffstat (limited to 'kdecore/malloc/x86.h')
-rw-r--r-- | kdecore/malloc/x86.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/kdecore/malloc/x86.h b/kdecore/malloc/x86.h deleted file mode 100644 index b21517374..000000000 --- a/kdecore/malloc/x86.h +++ /dev/null @@ -1,41 +0,0 @@ -#include <sched.h> -#include <time.h> - -typedef struct { - volatile unsigned int lock; - int pad0_; -} mutex_t; - -#define MUTEX_INITIALIZER { 0, 0 } - -static __inline__ int lock(mutex_t *m) { - int cnt = 0, r; - struct timespec tm; - - for(;;) { - __asm__ __volatile__ - ("xchgl %0, %1" - : "=r"(r), "=m"(m->lock) - : "0"(1), "m"(m->lock) - : "memory"); - if(!r) - return 0; -#ifdef _POSIX_PRIORITY_SCHEDULING - if(cnt < 50) { - sched_yield(); - cnt++; - } else -#endif - { - tm.tv_sec = 0; - tm.tv_nsec = 2000001; - nanosleep(&tm, NULL); - cnt = 0; - } - } -} - -static __inline__ int unlock(mutex_t *m) { - __asm __volatile ("movl $0,%0" : "=m" (m->lock)); - return 0; -} |