[apparmor] [PATCH v2 42/42] parser: Remove atomic ops

Tyler Hicks tyhicks at canonical.com
Fri Mar 6 21:48:58 UTC 2015


The parser no longer has a need for the atomic operations since all
callers have been moved to libapparmor.

Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
---
 parser/lib.c | 10 ----------
 parser/lib.h |  3 ---
 2 files changed, 13 deletions(-)

diff --git a/parser/lib.c b/parser/lib.c
index 15e975d..6aae670 100644
--- a/parser/lib.c
+++ b/parser/lib.c
@@ -29,16 +29,6 @@
 #include "lib.h"
 #include "parser.h"
 
-void atomic_inc(unsigned int *v)
-{
-	__sync_add_and_fetch(v, 1);
-}
-
-bool atomic_dec_and_test(unsigned int *v)
-{
-	return __sync_sub_and_fetch(v, 1) == 0;
-}
-
 int dirat_for_each(DIR *dir, const char *name, void *data,
 		   int (* cb)(DIR *, const char *, struct stat *, void *))
 {
diff --git a/parser/lib.h b/parser/lib.h
index 2ec745c..a182439 100644
--- a/parser/lib.h
+++ b/parser/lib.h
@@ -7,9 +7,6 @@
 #define autoclose __attribute((cleanup(_aa_autoclose)))
 #define autofclose __attribute((cleanup(_aa_autofclose)))
 
-void atomic_inc(unsigned int *v);
-bool atomic_dec_and_test(unsigned int *v);
-
 int dirat_for_each(DIR *dir, const char *name, void *data,
 		   int (* cb)(DIR *, const char *, struct stat *, void *));
 
-- 
2.1.4




More information about the AppArmor mailing list