Applied, thanks!
Samuel
---
Makefrag.am | 3 +++
kern/atomic.h | 54 +++
kern/kmutex.c | 76 +++
kern/kmutex.h | 52 +
kern/sched_prim.c | 5 +++-
kern/sched_prim.h | 2 +-
6 fi
On 2017-01-29 21:34, Samuel Thibault wrote:
Agustina Arzille, on Sun 29 Jan 2017 21:11:12 -0300, wrote:
On 2017-01-29 17:44, Samuel Thibault wrote:
>Agustina Arzille, on Sun 29 Jan 2017 16:46:45 -0300, wrote:
>
>There is just one thing I'm a bit afraid of: the code is assuming that
>the only rea
Agustina Arzille, on Sun 29 Jan 2017 21:11:12 -0300, wrote:
> On 2017-01-29 17:44, Samuel Thibault wrote:
> >Agustina Arzille, on Sun 29 Jan 2017 16:46:45 -0300, wrote:
> >
> >There is just one thing I'm a bit afraid of: the code is assuming that
> >the only reason why the locker thread is awakened
On 2017-01-29 17:44, Samuel Thibault wrote:
Agustina Arzille, on Sun 29 Jan 2017 16:46:45 -0300, wrote:
There is just one thing I'm a bit afraid of: the code is assuming that
the only reason why the locker thread is awakened is that it was given
the mutex control. Is that guaranteed?
Well, th
Agustina Arzille, on Sun 29 Jan 2017 16:46:45 -0300, wrote:
> >T1 atomic_cas(), gets the mutex
> >T2 fails atomic_cas()
> >T2 simple_lock()
> >T1 atomic_cas() to release the mutex
> >T2 reads KMUTEX_AVAIL in locked_swap
> >T3 atomic_cas(), gets the mutex
> >T2 writes KMUTEX_CONTENDED, gets KMUTEX_A
On 2017-01-28 21:03, Samuel Thibault wrote:
Hello,
Agustina Arzille, on Thu 19 Jan 2017 10:00:32 -0500, wrote:
+/* Atomically compare *PTR with EXP and set it to NVAL if they're
equal.
+ * Evaluates to a boolean, indicating whether the comparison was
successful.*/
+#define atomic_cas(ptr, exp
Hello,
Agustina Arzille, on Thu 19 Jan 2017 10:00:32 -0500, wrote:
> +/* Atomically compare *PTR with EXP and set it to NVAL if they're equal.
> + * Evaluates to a boolean, indicating whether the comparison was
> successful.*/
> +#define atomic_cas(ptr, exp, nval) \
> + ({ \
> + typeof(e
---
Makefrag.am | 3 +++
kern/atomic.h | 40
kern/kmutex.c | 79 +++
kern/kmutex.h | 50 +++
kern/sched_prim.c | 5 +++-
kern/sched_prim.h | 2 +-
6 files changed,