diff options
author | John Högberg <[email protected]> | 2017-07-25 14:38:10 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2017-07-25 14:38:10 +0200 |
commit | 13193403c7ec44632db37b455640867c1cf87f60 (patch) | |
tree | bfeaf8f19584c7f93f94eaa9c2cf6bb1f13a3a64 /erts/emulator/beam/erl_lock_flags.h | |
parent | 87e1b65dea251948ddd6311e846f71d820c421d8 (diff) | |
parent | 37074ef6833feb2991ff5c07eeb9f8ad015c7df7 (diff) | |
download | otp-13193403c7ec44632db37b455640867c1cf87f60.tar.gz otp-13193403c7ec44632db37b455640867c1cf87f60.tar.bz2 otp-13193403c7ec44632db37b455640867c1cf87f60.zip |
Merge branch 'john/erts/use-lock-flags-in-lc' into maint
Diffstat (limited to 'erts/emulator/beam/erl_lock_flags.h')
-rw-r--r-- | erts/emulator/beam/erl_lock_flags.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_lock_flags.h b/erts/emulator/beam/erl_lock_flags.h index b66c160af5..d711f69456 100644 --- a/erts/emulator/beam/erl_lock_flags.h +++ b/erts/emulator/beam/erl_lock_flags.h @@ -21,10 +21,10 @@ #ifndef ERTS_LOCK_FLAGS_H__ #define ERTS_LOCK_FLAGS_H__ -#define ERTS_LOCK_OPTION_READ (1 << 1) -#define ERTS_LOCK_OPTION_WRITE (1 << 2) +#define ERTS_LOCK_OPTIONS_READ (1 << 1) +#define ERTS_LOCK_OPTIONS_WRITE (1 << 2) -#define ERTS_LOCK_OPTION_RDWR (ERTS_LOCK_OPTION_READ | ERTS_LOCK_OPTION_WRITE) +#define ERTS_LOCK_OPTIONS_RDWR (ERTS_LOCK_OPTIONS_READ | ERTS_LOCK_OPTIONS_WRITE) /* Property/category are bitfields to simplify their use in masks. */ #define ERTS_LOCK_FLAGS_MASK_CATEGORY (0xFFC0) @@ -67,8 +67,12 @@ /* -- -- */ typedef unsigned short erts_lock_flags_t; +typedef unsigned short erts_lock_options_t; /* @brief Gets the type name of the lock, honoring the RW flag if supplied. */ const char *erts_lock_flags_get_type_name(erts_lock_flags_t flags); +/* @brief Gets a short-form description of the given lock options. (rw/r/w) */ +const char *erts_lock_options_get_short_desc(erts_lock_options_t options); + #endif /* ERTS_LOCK_FLAGS_H__ */ |