Skip to content

Commit

Permalink
core: disable uncrustify for atomic_*.c
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 committed Mar 30, 2020
1 parent 7e85081 commit 4a31068
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/atomic_c11.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
#include <string.h>
#include "irq.h"

/*
* uncrustify mis-formats the macros in this file, so disable it for them.
* begin{code-style-ignore}
*/

/* GCC documentation refers to the types as I1, I2, I4, I8, I16 */
typedef uint8_t I1;
typedef uint16_t I2;
Expand Down Expand Up @@ -245,6 +250,8 @@ TEMPLATE_ATOMIC_OP_FETCH_N(nand, &, 2, ~) /* __atomic_nand_fetch_2 */
TEMPLATE_ATOMIC_OP_FETCH_N(nand, &, 4, ~) /* __atomic_nand_fetch_4 */
TEMPLATE_ATOMIC_OP_FETCH_N(nand, &, 8, ~) /* __atomic_nand_fetch_8 */

/* end{code-style-ignore} */

/* ***** Generic versions below ***** */

/* Clang objects if you redefine a builtin. This little hack allows us to
Expand Down
6 changes: 6 additions & 0 deletions core/atomic_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
#include <string.h>
#include "irq.h"

/*
* uncrustify mis-formats the macros in this file, so disable it globally.
* begin{code-style-ignore}
*/

/* use gcc/clang implementation if available */
#if defined(__GNUC__) \
&& (__GNUC__ > 4 || \
Expand Down Expand Up @@ -234,4 +239,5 @@ TEMPLATE_SYNC_OP_AND_FETCH_N(nand, &, 2, ~) /* __sync_nand_and_fetch_2 */
TEMPLATE_SYNC_OP_AND_FETCH_N(nand, &, 4, ~) /* __sync_nand_and_fetch_4 */
TEMPLATE_SYNC_OP_AND_FETCH_N(nand, &, 8, ~) /* __sync_nand_and_fetch_8 */
#endif
/* end{code-style-ignore} */
/** @} */

0 comments on commit 4a31068

Please sign in to comment.