1# 2# %CopyrightBegin% 3# 4# Copyright Ericsson AB 2016-2020. All Rights Reserved. 5# 6# Licensed under the Apache License, Version 2.0 (the "License"); 7# you may not use this file except in compliance with the License. 8# You may obtain a copy of the License at 9# 10# http://www.apache.org/licenses/LICENSE-2.0 11# 12# Unless required by applicable law or agreed to in writing, software 13# distributed under the License is distributed on an "AS IS" BASIS, 14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15# See the License for the specific language governing permissions and 16# limitations under the License. 17# 18# %CopyrightEnd% 19# 20 21# 22# Static declaration of BIFs that should execute on dirty schedulers. 23# 24# <dirty-bif-decl> ::= <type> <bif> 25# <bif> ::= <module> ":" <name> "/" <arity> 26# <type> ::= dirty-cpu | dirty-io | dirty-cpu-test | dirty-io-test 27# 28# When dirty scheduler support is available, a BIF declared with the 29# 'dirty-cpu' type will unconditionally execute on a dirty CPU scheduler, 30# and a BIF declared with the type 'dirty-io' will unconditionally execute 31# on a dirty IO scheduler. When dirty scheduler support is not available 32# all BIFs will of course execute on normal schedulers. 33# 34# When the emulator has been configured with the debug option 35# '--enable-dirty-schedulers-test', BIFs with the types 'dirty-cpu-test', 36# and 'dirty-io-test' will unconditionally execute on dirty schedulers. 37# When this debug option has not been enabled, these BIFs will be executed 38# on normal schedulers. 39# 40# BIFs marked as 'ubif' in ./bif.tab will be ignored, i.e., will always 41# execute on normal schedulers. 42# 43 44# --- Dirty BIFs --- 45 46dirty-cpu erts_debug:dirty_cpu/2 47dirty-io erts_debug:dirty_io/2 48 49# lcnt_control/1 doesn't need to be dirty. 50dirty-cpu erts_debug:lcnt_control/2 51dirty-cpu erts_debug:lcnt_collect/0 52dirty-cpu erts_debug:lcnt_clear/0 53 54# --- TEST of Dirty BIF functionality --- 55# Functions below will execute on dirty schedulers when emulator has 56# been configured for testing dirty schedulers. This is used for test 57# and debug purposes only. We really do *not* want to execute these 58# on dirty schedulers on a real system. 59 60dirty-cpu-test erlang:make_tuple/2 61dirty-cpu-test erlang:make_tuple/3 62dirty-cpu-test erlang:append_element/2 63dirty-cpu-test erlang:insert_element/3 64dirty-cpu-test erlang:delete_element/2 65dirty-cpu-test erlang:atom_to_list/1 66dirty-cpu-test erlang:list_to_atom/1 67dirty-cpu-test erlang:list_to_existing_atom/1 68dirty-cpu-test erlang:integer_to_list/1 69dirty-cpu-test erlang:string_to_integer/1 70dirty-cpu-test erlang:list_to_integer/1 71dirty-cpu-test erlang:list_to_integer/2 72dirty-cpu-test erlang:float_to_list/1 73dirty-cpu-test erlang:float_to_list/2 74dirty-cpu-test erlang:float_to_binary/1 75dirty-cpu-test erlang:float_to_binary/2 76dirty-cpu-test erlang:string_to_float/1 77dirty-cpu-test erlang:list_to_float/1 78dirty-cpu-test erlang:binary_to_float/1 79dirty-cpu-test erlang:tuple_to_list/1 80dirty-cpu-test erlang:list_to_tuple/1 81dirty-cpu-test erlang:display/1 82dirty-cpu-test erlang:display_string/1 83