aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_lock_flags.c
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2017-07-07 16:40:30 +0200
committerJohn Högberg <[email protected]>2017-07-07 16:42:50 +0200
commitf4661e4e1d234fdbcd37bbc4a8a9bfdf2cfaa586 (patch)
tree30f9b0473dcacaa7d10283af9692dcb06f480597 /erts/emulator/beam/erl_lock_flags.c
parentcc4de75dcb833610e52c7422b743c43556064a0a (diff)
downloadotp-f4661e4e1d234fdbcd37bbc4a8a9bfdf2cfaa586.tar.gz
otp-f4661e4e1d234fdbcd37bbc4a8a9bfdf2cfaa586.tar.bz2
otp-f4661e4e1d234fdbcd37bbc4a8a9bfdf2cfaa586.zip
Add a proper type for lock options
Diffstat (limited to 'erts/emulator/beam/erl_lock_flags.c')
-rw-r--r--erts/emulator/beam/erl_lock_flags.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_lock_flags.c b/erts/emulator/beam/erl_lock_flags.c
index ba6a7217f2..e0a0e95c09 100644
--- a/erts/emulator/beam/erl_lock_flags.c
+++ b/erts/emulator/beam/erl_lock_flags.c
@@ -44,3 +44,16 @@ const char *erts_lock_flags_get_type_name(erts_lock_flags_t flags) {
return "garbage";
}
}
+
+const char *erts_lock_options_get_short_desc(erts_lock_options_t options) {
+ switch(options) {
+ case ERTS_LOCK_OPTIONS_RDWR:
+ return "rw";
+ case ERTS_LOCK_OPTIONS_READ:
+ return "r";
+ case ERTS_LOCK_OPTIONS_WRITE:
+ return "w";
+ default:
+ return "none";
+ }
+}