diff options
author | Lukas Larsson <[email protected]> | 2019-01-15 16:22:37 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2019-01-15 16:22:37 +0100 |
commit | 640851869321694b57f701399c19e093d9bd1dad (patch) | |
tree | 0a33478fce6b43faeebcc09c084dfde91c3b54f1 /erts/emulator/beam/bif.c | |
parent | a9b0c987fc6fc6ba11a3db523e4b8afb79c1b69f (diff) | |
parent | 5f5d0b3dd311ef16b7c6cc61d575cd7e5eccc291 (diff) | |
download | otp-640851869321694b57f701399c19e093d9bd1dad.tar.gz otp-640851869321694b57f701399c19e093d9bd1dad.tar.bz2 otp-640851869321694b57f701399c19e093d9bd1dad.zip |
Merge branch 'maint'
Conflicts:
erts/emulator/beam/bif.c
erts/preloaded/ebin/erlang.beam
erts/preloaded/ebin/erts_internal.beam
erts/preloaded/ebin/prim_file.beam
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r-- | erts/emulator/beam/bif.c | 52 |
1 files changed, 3 insertions, 49 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c index 492b0aac7b..ff7db0e742 100644 --- a/erts/emulator/beam/bif.c +++ b/erts/emulator/beam/bif.c @@ -4696,6 +4696,9 @@ BIF_RETTYPE system_flag_2(BIF_ALIST_2) return erts_bind_schedulers(BIF_P, BIF_ARG_2); } else if (ERTS_IS_ATOM_STR("erts_alloc", BIF_ARG_1)) { return erts_alloc_set_dyn_param(BIF_P, BIF_ARG_2); + } else if (ERTS_IS_ATOM_STR("system_logger", BIF_ARG_1)) { + Eterm res = erts_set_system_logger(BIF_ARG_2); + if (is_value(res)) BIF_RET(res); } error: BIF_ERROR(BIF_P, BADARG); @@ -5198,55 +5201,6 @@ erts_call_dirty_bif(ErtsSchedulerData *esdp, Process *c_p, BeamInstr *I, Eterm * return exiting; } - - -#ifdef HARDDEBUG -/* -You'll need this line in bif.tab to be able to use this debug bif - -bif erlang:send_to_logger/2 - -*/ -BIF_RETTYPE send_to_logger_2(BIF_ALIST_2) -{ - byte *buf; - ErlDrvSizeT len; - if (!is_atom(BIF_ARG_1) || !(is_list(BIF_ARG_2) || - is_nil(BIF_ARG_1))) { - BIF_ERROR(BIF_P,BADARG); - } - if (erts_iolist_size(BIF_ARG_2, &len) != 0) - BIF_ERROR(BIF_P,BADARG); - else if (len == 0) - buf = ""; - else { - ErlDrvSizeT len2; - buf = (byte *) erts_alloc(ERTS_ALC_T_TMP, len+1); - len2 = - erts_iolist_to_buf(BIF_ARG_2, buf, len); - ASSERT(len2 == len); (void)len2; - buf[len] = '\0'; - switch (BIF_ARG_1) { - case am_info: - erts_send_info_to_logger(BIF_P->group_leader, buf, len); - break; - case am_warning: - erts_send_warning_to_logger(BIF_P->group_leader, buf, len); - break; - case am_error: - erts_send_error_to_logger(BIF_P->group_leader, buf, len); - break; - default: - { - BIF_ERROR(BIF_P,BADARG); - } - } - erts_free(ERTS_ALC_T_TMP, (void *) buf); - } - BIF_RET(am_true); -} -#endif /* HARDDEBUG */ - BIF_RETTYPE get_module_info_1(BIF_ALIST_1) { Eterm ret = erts_module_info_0(BIF_P, BIF_ARG_1); |