diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-18 20:12:13 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-18 20:12:44 -0400 |
commit | 7566e26721ee95d6fc864e9e6654fb61bd3cd603 (patch) | |
tree | 4ac5f457cee12ccbea45f5c90eabe76cbd1444be /src/shared/barrier.h | |
parent | cbd4560ea2c9f0ae77df1fc64685ff4e559810b6 (diff) |
barrier: initalize file descriptors with -1
Explicitly initalize descriptors using explicit assignment like
bus_error. This makes barriers follow the same conventions as
everything else and makes things a bit simpler too.
Rename barier_init to barier_create so it is obvious that it is
not about initialization.
Remove some parens, etc.
Diffstat (limited to 'src/shared/barrier.h')
-rw-r--r-- | src/shared/barrier.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shared/barrier.h b/src/shared/barrier.h index 7f76ec7910..53b4439fb2 100644 --- a/src/shared/barrier.h +++ b/src/shared/barrier.h @@ -57,7 +57,9 @@ struct Barrier { int64_t barriers; }; -int barrier_init(Barrier *obj); +#define BARRIER_NULL {-1, -1, {-1, -1}, 0} + +int barrier_create(Barrier *obj); void barrier_destroy(Barrier *b); void barrier_set_role(Barrier *b, unsigned int role); |