2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 22:05:27 +00:00

parser: Add support for atomic inc and dec

These operations will be used for grabbing and releasing references to
objects. They leverage the GCC builtins for atomic operations.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Tyler Hicks
2015-03-25 17:09:26 -05:00
parent 22993081c8
commit a417a51724
2 changed files with 13 additions and 0 deletions

View File

@@ -10,6 +10,9 @@ void __autofree(void *p);
void __autoclose(int *fd);
void __autofclose(FILE **f);
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 *));