Hi Andrew,
On 11 May 2015 at 12:17, Andrew Jones wrote:
> > +
> > +void atomic_lock(int *lock_var)
> > +{
> > +while (__sync_lock_test_and_set(lock_var, 1));
> > +}
> > +
> > +void atomic_unlock(int *lock_var)
> > +{
> > +__sync_lock_release(lock_var);
> > +}
>
> Do these builtins actuall
On Thu, May 07, 2015 at 01:31:42PM +0200, Alexander Spyridakis wrote:
> Sample spinlock test case with the option to implement the spinlock
> by means of GCC atomic instructions or unsafe memory operations.
> Additionally, printf is wrapped around a spinlock to avoid concurrent
> access to the seri
Sample spinlock test case with the option to implement the spinlock
by means of GCC atomic instructions or unsafe memory operations.
Additionally, printf is wrapped around a spinlock to avoid concurrent
access to the serial device.
Suggested-by: Jani Kokkonen
Suggested-by: Claudio Fontana
Signed