diff options
author | fishsoupisgood <github@madingley.org> | 2020-06-15 14:02:42 +0100 |
---|---|---|
committer | fishsoupisgood <github@madingley.org> | 2020-06-15 14:02:42 +0100 |
commit | 4ced1453cee7a3131459040efd57f73bfc77aece (patch) | |
tree | 78cbcbdcef4847b5b194cf65470ffb45a3e7a8e3 /app/i2c.c | |
parent | d23934fedc0b76863fcb2ba653560e108309bce6 (diff) | |
download | robs_speedo-4ced1453cee7a3131459040efd57f73bfc77aece.tar.gz robs_speedo-4ced1453cee7a3131459040efd57f73bfc77aece.tar.bz2 robs_speedo-4ced1453cee7a3131459040efd57f73bfc77aece.zip |
guage code
Diffstat (limited to 'app/i2c.c')
-rw-r--r-- | app/i2c.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -5,11 +5,10 @@ static int mutex = 0; int i2c_lock (void) { - if (__sync_add_and_fetch (&mutex, 1) != 1) - { - __sync_sub_and_fetch (&mutex, 1); - return -1; - } + if (__sync_add_and_fetch (&mutex, 1) != 1) { + __sync_sub_and_fetch (&mutex, 1); + return -1; + } return 0; } |