Commit e115eb79 authored by Martin Karsten's avatar Martin Karsten

- libfibre: use faster mutex as default for fibre_mutex_t

parent ceddaeb1
......@@ -28,7 +28,8 @@
typedef Fibre* fibre_t;
typedef FifoSemaphore<SystemLock,false> fibre_sem_t;
typedef FifoSemaphore<SystemLock,true> fibre_binsem_t;
typedef Mutex<SystemLock> fibre_mutex_t;
typedef BargingMutex<SystemSemaphore> fibre_mutex_t;
//typedef Mutex<BargingMutex<SystemSemaphore>> fibre_mutex_t;
typedef Condition<fibre_mutex_t> fibre_cond_t;
typedef MutexRW<SystemLock> fibre_rwlock_t;
typedef Barrier<SystemLock> fibre_barrier_t;
......
......@@ -23,10 +23,11 @@
#if defined(__LIBFIBRE__)
#define USE_MUTEX 0
static Mutex<SystemLock> mutex;
typedef FifoSemaphore<SystemLock,false> Semaphore;
static BargingMutex<SystemSemaphore> mutex;
typedef FifoSemaphore<SystemLock,false> Semaphore;
typedef Benaphore<Semaphore>* fsem_t; // use user-level semaphores
static int fsem_init(fsem_t *fsem, int pshared, unsigned int value) {
assert(pshared == 0);
*fsem = new Benaphore<Semaphore>(value);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment