diff --git a/lib/libsysdecode/flags.c b/lib/libsysdecode/flags.c index 1eb48858fd88..df461cf0dca1 100644 --- a/lib/libsysdecode/flags.c +++ b/lib/libsysdecode/flags.c @@ -941,6 +941,20 @@ sysdecode_umtx_op(int op) return (lookup_value(umtxop, op)); } +bool +sysdecode_umtx_op_flags(FILE *fp, int op, int *rem) +{ + uintmax_t val; + bool printed; + + printed = false; + val = (unsigned)op; + print_mask_part(fp, umtxopflags, &val, &printed); + if (rem != NULL) + *rem = val; + return (printed); +} + const char * sysdecode_vmresult(int result) { diff --git a/lib/libsysdecode/mktables b/lib/libsysdecode/mktables index b42978d57c4d..3a0284a2deb4 100644 --- a/lib/libsysdecode/mktables +++ b/lib/libsysdecode/mktables @@ -145,7 +145,8 @@ gen_table "sockoptudp" "UDP_[[:alnum:]]+[[:space:]]+[0-9]+" "neti gen_table "sockoptudplite" "UDPLITE_[[:alnum:]_]+[[:space:]]+[0-9]+" "netinet/udplite.h" gen_table "socktype" "SOCK_[A-Z]+[[:space:]]+[1-9]+[0-9]*" "sys/socket.h" gen_table "thrcreateflags" "THR_[A-Z]+[[:space:]]+0x[0-9]+" "sys/thr.h" -gen_table "umtxop" "UMTX_OP_[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/umtx.h" +gen_table "umtxop" "UMTX_OP_[[:alnum:]][[:alnum:]_]*[[:space:]]+[0-9]+" "sys/umtx.h" +gen_table "umtxopflags" "UMTX_OP__[[:alnum:]_]+[[:space:]]+[0-9]+" "sys/umtx.h" gen_table "vmprot" "VM_PROT_[A-Z]+[[:space:]]+\(\(vm_prot_t\)[[:space:]]+0x[0-9]+\)" "vm/vm.h" gen_table "vmresult" "KERN_[A-Z_]+[[:space:]]+[0-9]+" "vm/vm_param.h" gen_table "wait6opt" "W[A-Z]+[[:space:]]+[0-9]+" "sys/wait.h" diff --git a/lib/libsysdecode/sysdecode.h b/lib/libsysdecode/sysdecode.h index a01ac1243aa2..cdb9205f3da1 100644 --- a/lib/libsysdecode/sysdecode.h +++ b/lib/libsysdecode/sysdecode.h @@ -121,6 +121,7 @@ const char *sysdecode_sysarch_number(int _number); bool sysdecode_thr_create_flags(FILE *_fp, int _flags, int *_rem); bool sysdecode_umtx_cvwait_flags(FILE *_fp, u_long _flags, u_long *_rem); const char *sysdecode_umtx_op(int _op); +bool sysdecode_umtx_op_flags(FILE *_fp, int op, int *_rem); bool sysdecode_umtx_rwlock_flags(FILE *_fp, u_long _flags, u_long *_rem); int sysdecode_utrace(FILE *_fp, void *_buf, size_t _len); bool sysdecode_vmprot(FILE *_fp, int _type, int *_rem);