File 1323-Fix-typos-in-erts-emulator-beam.patch of Package erlang
From 94ea7e2e10f4fe7979af7fe23f27d4ee07bd156b Mon Sep 17 00:00:00 2001
From: "Kian-Meng, Ang" <kianmeng@cpan.org>
Date: Fri, 26 Nov 2021 05:23:41 +0800
Subject: [PATCH] Fix typos in erts/emulator/beam
---
erts/emulator/beam/atom.h | 2 +-
erts/emulator/beam/beam_bif_load.c | 4 ++--
erts/emulator/beam/beam_debug.c | 2 +-
erts/emulator/beam/bif.c | 6 ++---
erts/emulator/beam/big.c | 6 ++---
erts/emulator/beam/binary.c | 4 ++--
erts/emulator/beam/code_ix.h | 2 +-
erts/emulator/beam/dist.c | 6 ++---
erts/emulator/beam/emu/arith_instrs.tab | 2 +-
erts/emulator/beam/emu/beam_emu.c | 2 +-
erts/emulator/beam/emu/bif_instrs.tab | 2 +-
erts/emulator/beam/emu/ops.tab | 4 ++--
erts/emulator/beam/erl_alloc.c | 4 ++--
erts/emulator/beam/erl_alloc_util.c | 6 ++---
erts/emulator/beam/erl_ao_firstfit_alloc.c | 4 ++--
erts/emulator/beam/erl_async.c | 2 +-
erts/emulator/beam/erl_bestfit_alloc.c | 6 ++---
erts/emulator/beam/erl_bif_binary.c | 2 +-
erts/emulator/beam/erl_bif_chksum.c | 4 ++--
erts/emulator/beam/erl_bif_guard.c | 2 +-
erts/emulator/beam/erl_bif_info.c | 4 ++--
erts/emulator/beam/erl_bif_port.c | 4 ++--
erts/emulator/beam/erl_bits_f16.h | 4 ++--
erts/emulator/beam/erl_db.c | 10 ++++----
erts/emulator/beam/erl_db.h | 2 +-
erts/emulator/beam/erl_db_catree.c | 2 +-
erts/emulator/beam/erl_db_hash.c | 4 ++--
erts/emulator/beam/erl_db_tree.c | 4 ++--
erts/emulator/beam/erl_db_util.c | 2 +-
erts/emulator/beam/erl_db_util.h | 2 +-
erts/emulator/beam/erl_debug.c | 2 +-
erts/emulator/beam/erl_driver.h | 2 +-
erts/emulator/beam/erl_flxctr.h | 2 +-
erts/emulator/beam/erl_gc.c | 2 +-
erts/emulator/beam/erl_hl_timer.c | 2 +-
erts/emulator/beam/erl_io_queue.c | 2 +-
erts/emulator/beam/erl_lock_check.c | 6 ++---
erts/emulator/beam/erl_lock_count.h | 2 +-
erts/emulator/beam/erl_map.c | 8 +++----
erts/emulator/beam/erl_map.h | 2 +-
erts/emulator/beam/erl_message.c | 2 +-
erts/emulator/beam/erl_message.h | 4 ++--
erts/emulator/beam/erl_monitor_link.c | 2 +-
erts/emulator/beam/erl_monitor_link.h | 8 +++----
erts/emulator/beam/erl_node_container_utils.h | 2 +-
erts/emulator/beam/erl_node_tables.h | 2 +-
erts/emulator/beam/erl_proc_sig_queue.c | 10 ++++----
erts/emulator/beam/erl_proc_sig_queue.h | 4 ++--
erts/emulator/beam/erl_process.c | 24 +++++++++----------
erts/emulator/beam/erl_process.h | 12 +++++-----
erts/emulator/beam/erl_process_lock.c | 12 +++++-----
erts/emulator/beam/erl_process_lock.h | 2 +-
erts/emulator/beam/erl_ptab.c | 8 +++----
erts/emulator/beam/erl_rbtree.h | 2 +-
erts/emulator/beam/erl_thr_progress.c | 4 ++--
erts/emulator/beam/erl_time_sup.c | 4 ++--
erts/emulator/beam/erl_trace.h | 2 +-
erts/emulator/beam/erl_unicode.c | 8 +++----
erts/emulator/beam/erlang_dtrace.d | 2 +-
erts/emulator/beam/hash.c | 2 +-
erts/emulator/beam/io.c | 10 ++++----
erts/emulator/beam/jit/arm/instr_bs.cpp | 2 +-
erts/emulator/beam/jit/arm/instr_common.cpp | 4 ++--
erts/emulator/beam/jit/arm/instr_fun.cpp | 2 +-
erts/emulator/beam/jit/arm/ops.tab | 4 ++--
.../emulator/beam/jit/x86/beam_asm_module.cpp | 2 +-
erts/emulator/beam/jit/x86/instr_common.cpp | 6 ++---
erts/emulator/beam/jit/x86/instr_fun.cpp | 2 +-
.../beam/jit/x86/instr_guard_bifs.cpp | 2 +-
erts/emulator/beam/jit/x86/ops.tab | 4 ++--
erts/emulator/beam/sys.h | 4 ++--
erts/emulator/beam/time.c | 2 +-
erts/emulator/beam/utils.c | 2 +-
73 files changed, 151 insertions(+), 151 deletions(-)
diff --git a/erts/emulator/beam/atom.h b/erts/emulator/beam/atom.h
index 2bc1f653ec..9236d9b23f 100644
--- a/erts/emulator/beam/atom.h
+++ b/erts/emulator/beam/atom.h
@@ -36,7 +36,7 @@
/* Internal atom cache needs MAX_ATOM_TABLE_SIZE to be less than an
unsigned 32 bit integer. See external.c(erts_encode_ext_dist_header_setup)
for more details. */
-#define MAX_ATOM_TABLE_SIZE ((MAX_ATOM_INDEX + 1 < (UWORD_CONSTANT(1) << 32)) ? MAX_ATOM_INDEX + 1 : ((UWORD_CONSTANT(1) << 31) - 1)) /* Here we use maximum signed interger value to avoid integer overflow */
+#define MAX_ATOM_TABLE_SIZE ((MAX_ATOM_INDEX + 1 < (UWORD_CONSTANT(1) << 32)) ? MAX_ATOM_INDEX + 1 : ((UWORD_CONSTANT(1) << 31) - 1)) /* Here we use maximum signed integer value to avoid integer overflow */
#else
#define MAX_ATOM_TABLE_SIZE (MAX_ATOM_INDEX + 1)
#endif
diff --git a/erts/emulator/beam/beam_bif_load.c b/erts/emulator/beam/beam_bif_load.c
index 744e8723ee..040c6fa6b3 100644
--- a/erts/emulator/beam/beam_bif_load.c
+++ b/erts/emulator/beam/beam_bif_load.c
@@ -857,7 +857,7 @@ BIF_RETTYPE finish_after_on_load_2(BIF_ALIST_2)
modp->on_load = 0;
/*
- * The on_load function succeded. Fix up export entries.
+ * The on_load function succeeded. Fix up export entries.
*/
num_exps = export_list_size(code_ix);
for (i = 0; i < num_exps; i++) {
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index 2e44f9c4b7..96709b113b 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -2645,7 +2645,7 @@ done:
/**********************************************************************/
-/* returns the head of a list - this function is unecessary
+/* returns the head of a list - this function is unnecessary
and is only here to keep Robert happy (Even more, since it's OP as well) */
BIF_RETTYPE hd_1(BIF_ALIST_1)
{
@@ -3395,7 +3395,7 @@ BIF_RETTYPE list_to_integer_2(BIF_ALIST_2)
{
/* Bif implementation is about 50% faster than pure erlang,
and since we have erts_chars_to_integer now it is simpler
- as well. This could be optmized further if we did not have to
+ as well. This could be optimized further if we did not have to
copy the list to buf. */
Sint i;
Eterm res, dummy;
@@ -4452,7 +4452,7 @@ BIF_RETTYPE port_to_list_1(BIF_ALIST_1)
/**********************************************************************/
-/* convert a list of ascii characeters of the form
+/* convert a list of ascii characters of the form
<node.number.serial> to a PID
*/
diff --git a/erts/emulator/beam/big.c b/erts/emulator/beam/big.c
index ddaceecbf7..1ff6c8f89a 100644
--- a/erts/emulator/beam/big.c
+++ b/erts/emulator/beam/big.c
@@ -608,7 +608,7 @@ static dsize_t Z_sub(ErtsDigit* y, dsize_t yl, ErtsDigit* r)
/*
** Multiply digits in x with digits in y and store in r
-** Assumption: digits in r must be 0 (upto the size of x)
+** Assumption: digits in r must be 0 (up to the size of x)
*/
static dsize_t I_mul(ErtsDigit* x, dsize_t xl, ErtsDigit* y, dsize_t yl, ErtsDigit* r)
{
@@ -984,7 +984,7 @@ static ErtsDigit D_rem(ErtsDigit* x, dsize_t xl, ErtsDigit d)
/*
** Remainder of x and y
**
-** Assumtions: xl >= yl, yl > 1
+** Assumptions: xl >= yl, yl > 1
** r must contain at least xl number of digits
*/
static dsize_t I_rem(ErtsDigit* x, dsize_t xl, ErtsDigit* y, dsize_t yl, ErtsDigit* r)
@@ -2618,7 +2618,7 @@ int term_equals_2pow32(Eterm x)
if (!is_big(x))
return 0;
bp = big_val(x);
-#if D_EXP == 16 /* 16 bit platfrom not really supported!!! */
+#if D_EXP == 16 /* 16 bit platform not really supported!!! */
return (BIG_SIZE(bp) == 3) && !BIG_DIGIT(bp,0) && !BIG_DIGIT(bp,1) &&
BIG_DIGIT(bp,2) == 1;
#elif D_EXP == 32
diff --git a/erts/emulator/beam/binary.c b/erts/emulator/beam/binary.c
index a006553ef3..3b4a463660 100644
--- a/erts/emulator/beam/binary.c
+++ b/erts/emulator/beam/binary.c
@@ -904,7 +904,7 @@ BIF_RETTYPE erts_list_to_binary_bif(Process *c_p, Eterm arg, Export *bif)
break; /* done */
}
if (!ERTS_IOLIST_TO_BUF_FAILED(res))
- ERTS_INTERNAL_ERROR("iolist_size/iolist_to_buf missmatch");
+ ERTS_INTERNAL_ERROR("iolist_size/iolist_to_buf mismatch");
if (res == ERTS_IOLIST_TO_BUF_OVERFLOW)
goto overflow;
goto type_error;
@@ -1020,7 +1020,7 @@ BIF_RETTYPE list_to_bitstring_1(BIF_ALIST_1)
break; /* done */
}
if (!ERTS_IOLIST_TO_BUF_FAILED(res))
- ERTS_INTERNAL_ERROR("iolist_size/iolist_to_buf missmatch");
+ ERTS_INTERNAL_ERROR("iolist_size/iolist_to_buf mismatch");
if (res == ERTS_IOLIST_TO_BUF_OVERFLOW)
goto overflow;
goto type_error;
diff --git a/erts/emulator/beam/code_ix.h b/erts/emulator/beam/code_ix.h
index 8412ff8304..14b86ec5e3 100644
--- a/erts/emulator/beam/code_ix.h
+++ b/erts/emulator/beam/code_ix.h
@@ -31,7 +31,7 @@
* The current 'active' code index is used to access the current running
* code. The 'staging' code index is used by the process that performs
* a code change operation. When a code change operation completes
- * succesfully, the staging code index becomes the new active code index.
+ * successfully, the staging code index becomes the new active code index.
*
* The third code index is not explicitly used. It can be thought of as
* the "previous active" or the "next staging" index. It is needed to make
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index 6876915ded..5a79b8115c 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -3817,7 +3817,7 @@ erts_dist_command(Port *prt, int initial_reds)
/*
* Everything that was buffered when we started have now been
* written to the port. If port isn't busy but dist entry is
- * and we havn't got too muched queued on dist entry, set
+ * and we haven't got too muched queued on dist entry, set
* dist entry in a non-busy state and resume suspended
* processes.
*/
@@ -4638,7 +4638,7 @@ BIF_RETTYPE setnode_2(BIF_ALIST_2)
if (!is_node_name_atom(BIF_ARG_1))
goto error;
- if (BIF_ARG_1 == am_Noname) /* cant use this name !! */
+ if (BIF_ARG_1 == am_Noname) /* can't use this name !! */
goto error;
if (erts_is_alive) /* must not be alive! */
goto error;
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index 0be488bdff..879a4fb531 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -122,7 +122,7 @@ ErtsCodePtr beam_continue_exit;
/* NOTE These should be the only variables containing trace instructions.
** Sometimes tests are for the instruction value, and sometimes
-** for the refering variable (one of these), and rouge references
+** for the refering variable (one of these), and rogue references
** will most likely cause chaos.
*/
BeamInstr beam_return_to_trace[1]; /* OpCode(i_return_to_trace) */
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab
index 1c1181e95e..7814da38bb 100644
--- a/erts/emulator/beam/ops.tab
+++ b/erts/emulator/beam/ops.tab
@@ -1092,7 +1092,7 @@ bs_get_float2 Fail=f Ms=x Live=u Sz=q Unit=u Flags=u Dst=d => jump Fail
%macro: i_bs_get_float2 BsGetFloat2 -fail_action -gen_dest
i_bs_get_float2 f x I s I d
-# Miscellanous
+# Miscellaneous
bs_skip_bits2 Fail=f Ms=x Sz=sq Unit=u Flags=u => \
gen_skip_bits2(Fail, Ms, Sz, Unit, Flags)
diff --git a/erts/emulator/beam/erl_alloc.c b/erts/emulator/beam/erl_alloc.c
index 96e0340dbe..e2b8bc9305 100644
--- a/erts/emulator/beam/erl_alloc.c
+++ b/erts/emulator/beam/erl_alloc.c
@@ -2203,7 +2203,7 @@ erts_memory(fmtfn_t *print_to_p, void *print_to_arg, void *proc, Eterm earg)
ERTS_SMP_LC_ASSERT(erts_smp_thr_progress_is_blocking());
- /* Figure out whats wanted... */
+ /* Figure out what's wanted... */
length = 0;
if (is_non_value(earg)) { /* i.e. wants all */
@@ -3140,7 +3140,7 @@ reply_alloc_info(void *vair)
if (hpp)
sys_alloc_stat(&sas);
if (szp) {
- /* ensure ehough heap */
+ /* ensure enough heap */
sas.top_pad = INT_MAX;
sas.trim_threshold = INT_MAX;
}
diff --git a/erts/emulator/beam/erl_alloc_util.c b/erts/emulator/beam/erl_alloc_util.c
index edc44e8018..482cf0554a 100644
--- a/erts/emulator/beam/erl_alloc_util.c
+++ b/erts/emulator/beam/erl_alloc_util.c
@@ -3080,7 +3080,7 @@ mbc_realloc(Allctr_t *allctr, ErtsAlcType_t type, void *p, Uint size,
}
if (cand_blk_sz < get_blk_sz) {
- /* We wont fit in cand_blk get a new one */
+ /* We won't fit in cand_blk get a new one */
#ifdef ERTS_SMP
realloc_move:
#endif
@@ -3154,7 +3154,7 @@ mbc_realloc(Allctr_t *allctr, ErtsAlcType_t type, void *p, Uint size,
/*
* Copy user-data then update new blocks in mbc_alloc_finalize().
* mbc_alloc_finalize() may write headers at old location of
- * user data; therfore, order is important.
+ * user data; therefore, order is important.
*/
new_p = BLK2UMEM(new_blk);
diff --git a/erts/emulator/beam/erl_ao_firstfit_alloc.c b/erts/emulator/beam/erl_ao_firstfit_alloc.c
index cb3159b762..7b596d628d 100644
--- a/erts/emulator/beam/erl_ao_firstfit_alloc.c
+++ b/erts/emulator/beam/erl_ao_firstfit_alloc.c
@@ -1279,10 +1279,10 @@ static void print_tree(AOFF_RBTree_t*);
/*
* Checks that the order between parent and children are correct,
- * and that the Red-Black Tree properies are satisfied. if size > 0,
+ * and that the Red-Black Tree properties are satisfied. if size > 0,
* check_tree() returns the node that satisfies "address order first fit"
*
- * The Red-Black Tree properies are:
+ * The Red-Black Tree properties are:
* 1. Every node is either red or black.
* 2. Every leaf (NIL) is black.
* 3. If a node is red, then both its children are black.
diff --git a/erts/emulator/beam/erl_async.c b/erts/emulator/beam/erl_async.c
index b1aef68b82..36ee847a33 100644
--- a/erts/emulator/beam/erl_async.c
+++ b/erts/emulator/beam/erl_async.c
@@ -528,7 +528,7 @@ unsigned int driver_async_port_key(ErlDrvPort port)
** key pointer to secedule queue (NULL means round robin)
** async_invoke function to run in thread
** async_data data to pass to invoke function
-** async_free function for relase async_data in case of failure
+** async_free function for release async_data in case of failure
*/
long driver_async(ErlDrvPort ix, unsigned int* key,
void (*async_invoke)(void*), void* async_data,
diff --git a/erts/emulator/beam/erl_bestfit_alloc.c b/erts/emulator/beam/erl_bestfit_alloc.c
index 79399ec35e..5522e5741a 100644
--- a/erts/emulator/beam/erl_bestfit_alloc.c
+++ b/erts/emulator/beam/erl_bestfit_alloc.c
@@ -735,7 +735,7 @@ bf_link_free_block(Allctr_t *allctr, Block_t *block)
LIST_PREV(LIST_NEXT(x)) = blk;
LIST_NEXT(x) = blk;
- return; /* Finnished */
+ return; /* Finished */
}
else if (blk_sz < size) {
if (!x->left) {
@@ -1009,11 +1009,11 @@ static void print_tree(RBTree_t *, int);
/*
* Checks that the order between parent and children are correct,
- * and that the Red-Black Tree properies are satisfied. if size > 0,
+ * and that the Red-Black Tree properties are satisfied. if size > 0,
* check_tree() returns a node that satisfies "best fit" resp.
* "address order best fit".
*
- * The Red-Black Tree properies are:
+ * The Red-Black Tree properties are:
* 1. Every node is either red or black.
* 2. Every leaf (NIL) is black.
* 3. If a node is red, then both its children are black.
diff --git a/erts/emulator/beam/erl_bif_binary.c b/erts/emulator/beam/erl_bif_binary.c
index 04933cb78b..6e56816a27 100644
--- a/erts/emulator/beam/erl_bif_binary.c
+++ b/erts/emulator/beam/erl_bif_binary.c
@@ -1322,7 +1322,7 @@ static int parse_match_opts_list(Eterm l, Eterm bin, Uint *posp, Uint *endp)
return 0;
} else {
badarg:
- /* Ensure intialization. */
+ /* Ensure initialization. */
*posp = 0;
*endp = 0;
return 1;
diff --git a/erts/emulator/beam/erl_bif_chksum.c b/erts/emulator/beam/erl_bif_chksum.c
index f01bc0d0c3..ee2d8abb7a 100644
--- a/erts/emulator/beam/erl_bif_chksum.c
+++ b/erts/emulator/beam/erl_bif_chksum.c
@@ -230,7 +230,7 @@ L_Again: /* Restart with sublist, old listend was pushed on stack */
if (!left) {
#ifdef ALLOW_BYTE_TAIL
if (is_byte(ioterm)) {
- /* inproper list with byte tail*/
+ /* improper list with byte tail*/
Eterm *hp;
hp = HAlloc(p, 2);
ioterm = CONS(hp, ioterm, NIL);
@@ -239,7 +239,7 @@ L_Again: /* Restart with sublist, old listend was pushed on stack */
;
#endif
} else if (!is_list(ioterm) && !is_nil(ioterm)) {
- /* inproper list end */
+ /* improper list end */
#ifdef ALLOW_BYTE_TAIL
if (is_byte(ioterm)) {
unsigned char b[1];
diff --git a/erts/emulator/beam/erl_bif_port.c b/erts/emulator/beam/erl_bif_port.c
index 93de1bf5e0..38e44a1743 100644
--- a/erts/emulator/beam/erl_bif_port.c
+++ b/erts/emulator/beam/erl_bif_port.c
@@ -1000,7 +1000,7 @@ open_port(Process* p, Eterm name, Eterm settings, int *err_typep, int *err_nump)
name = tp[1];
encoding = erts_get_native_filename_encoding();
/* Do not convert the command to utf-16le yet, do that in win32 specific code */
- /* since the cmd is used for comparsion with drivers names and copied to port info */
+ /* since the cmd is used for comparison with drivers names and copied to port info */
if (encoding == ERL_FILENAME_WIN_WCHAR) {
encoding = ERL_FILENAME_UTF8;
}
diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c
index 9a4eaa2ceb..c8300955cd 100644
--- a/erts/emulator/beam/erl_db.c
+++ b/erts/emulator/beam/erl_db.c
@@ -2456,7 +2456,7 @@ BIF_RETTYPE ets_new_2(BIF_ALIST_2)
#endif
/* we create table outside any table lock
- * and take the unusal cost of destroy table if it
+ * and take the unusual cost of destroy table if it
* fails to find a slot
*/
{
diff --git a/erts/emulator/beam/erl_db.h b/erts/emulator/beam/erl_db.h
index a18be4d168..31ff7f1292 100644
--- a/erts/emulator/beam/erl_db.h
+++ b/erts/emulator/beam/erl_db.h
@@ -94,7 +94,7 @@ union db_table {
/*TT*/
};
-#define DB_DEF_MAX_TABS 2053 /* Superseeded by environment variable
+#define DB_DEF_MAX_TABS 2053 /* Superseded by environment variable
"ERL_MAX_ETS_TABLES" */
#define ERL_MAX_ETS_TABLES_ENV "ERL_MAX_ETS_TABLES"
diff --git a/erts/emulator/beam/erl_db_hash.c b/erts/emulator/beam/erl_db_hash.c
index f18f2df40c..d3a29e5c04 100644
--- a/erts/emulator/beam/erl_db_hash.c
+++ b/erts/emulator/beam/erl_db_hash.c
@@ -4010,7 +4010,7 @@ void db_calc_stats_hash(DbTableHash* tb, DbHashStats* stats)
stats->avg_chain_len = (float)sum / NACTIVE(tb);
stats->std_dev_chain_len = sqrt((sq_sum - stats->avg_chain_len*sum) / NACTIVE(tb));
/* Expected standard deviation from a good uniform hash function,
- ie binomial distribution (not taking the linear hashing into acount) */
+ ie binomial distribution (not taking the linear hashing into account) */
stats->std_dev_expected = sqrt(stats->avg_chain_len * (1 - 1.0/NACTIVE(tb)));
stats->kept_items = kept_items;
}
diff --git a/erts/emulator/beam/erl_db_tree.c b/erts/emulator/beam/erl_db_tree.c
index a439b974a7..b2b1773211 100644
--- a/erts/emulator/beam/erl_db_tree.c
+++ b/erts/emulator/beam/erl_db_tree.c
@@ -3097,7 +3097,7 @@ static TreeDbTerm *find_next(DbTableCommon *tb, TreeDbTerm *root,
for (;;) {
PUSH_NODE(stack, this);
if (( c = cmp_key(tb,key,this) ) > 0) {
- if (this->right == NULL) /* We are at the previos
+ if (this->right == NULL) /* We are at the previous
and the element does
not exist */
break;
@@ -4273,7 +4273,7 @@ static void check_slot_pos(DbTableTree *tb)
return;
t = traverse_until(tb->root, &pos, tb->stack.slot);
if (t != tb->stack.array[tb->stack.pos - 1]) {
- erts_fprintf(stderr, "Slot position does not correspont with stack, "
+ erts_fprintf(stderr, "Slot position does not correspond with stack, "
"element position %d is really 0x%08X, when stack says "
"it's 0x%08X\n", tb->stack.slot, t,
tb->stack.array[tb->stack.pos - 1]);
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index 840228e854..76fbc9189c 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -1930,7 +1930,7 @@ restart:
** stack ---> + +
** ..........
** +-------------+
- ** The stack is expected to grow towards *higher* adresses.
+ ** The stack is expected to grow towards *higher* addresses.
** A special case is when the match expression is a single binding
** (i.e '$1'), then the field single_variable is set to 1.
*/
diff --git a/erts/emulator/beam/erl_db_util.h b/erts/emulator/beam/erl_db_util.h
index 7945bbfd8b..9784b4ce5c 100644
--- a/erts/emulator/beam/erl_db_util.h
+++ b/erts/emulator/beam/erl_db_util.h
@@ -521,7 +521,7 @@ typedef struct dmc_err_info {
** Compilation flags
**
** The dialect is in the 3 least significant bits and are to be interspaced by
-** by at least 2 (decimal), thats why ((Uint) 2) isn't used. This is to be
+** by at least 2 (decimal), that's why ((Uint) 2) isn't used. This is to be
** able to add DBIF_GUARD or DBIF BODY to it to use in the match_spec bif
** table. The rest of the word is used like ordinary flags, one bit for each
** flag. Note that DCOMP_TABLE and DCOMP_TRACE are mutually exclusive.
diff --git a/erts/emulator/beam/erl_debug.c b/erts/emulator/beam/erl_debug.c
index b8ce805d31..561369ef11 100644
--- a/erts/emulator/beam/erl_debug.c
+++ b/erts/emulator/beam/erl_debug.c
@@ -469,7 +469,7 @@ void print_untagged_memory(Eterm *pos, Eterm *end)
* is). This function knows about forwarding pointers to be able to
* print a heap during garbage collection. erts_printf("%T",val)
* do not know about forwarding pointers though, so it will still
- * crash if they are encoutered...
+ * crash if they are encountered...
*/
void print_tagged_memory(Eterm *pos, Eterm *end)
{
diff --git a/erts/emulator/beam/erl_driver.h b/erts/emulator/beam/erl_driver.h
index d5379a40d5..7460550212 100644
--- a/erts/emulator/beam/erl_driver.h
+++ b/erts/emulator/beam/erl_driver.h
@@ -408,7 +408,7 @@ EXTERN ErlDrvBinary* driver_alloc_binary(ErlDrvSizeT size);
EXTERN ErlDrvBinary* driver_realloc_binary(ErlDrvBinary *bin, ErlDrvSizeT size);
EXTERN void driver_free_binary(ErlDrvBinary *bin);
-/* Referenc count on driver binaries */
+/* Reference count on driver binaries */
EXTERN ErlDrvSInt driver_binary_get_refc(ErlDrvBinary *dbp);
EXTERN ErlDrvSInt driver_binary_inc_refc(ErlDrvBinary *dbp);
EXTERN ErlDrvSInt driver_binary_dec_refc(ErlDrvBinary *dbp);
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 24c07bda69..fcddfa3ab2 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -335,7 +335,7 @@ erts_next_heap_size(Uint size, Uint offset)
/*
* Return the next heap size to use. Make sure we never return
* a smaller heap size than the minimum heap size for the process.
- * (Use of the erlang:hibernate/3 BIF could have shrinked the
+ * (Use of the erlang:hibernate/3 BIF could have shrunk the
* heap below the minimum heap size.)
*/
static Uint
diff --git a/erts/emulator/beam/erl_hl_timer.c b/erts/emulator/beam/erl_hl_timer.c
index 5769fec38b..79d41b1232 100644
--- a/erts/emulator/beam/erl_hl_timer.c
+++ b/erts/emulator/beam/erl_hl_timer.c
@@ -2182,7 +2182,7 @@ access_bif_timer(Process *c_p, Eterm tref, int cancel, int async, int info)
* callers message queue to the end of the queue.
*
* NOTE: It is of vital importance that the caller
- * immediately do a receive unconditionaly
+ * immediately do a receive unconditionally
* waiting for the message with the reference;
* otherwise, next receive will *not* work
* as expected!
diff --git a/erts/emulator/beam/erl_lock_check.c b/erts/emulator/beam/erl_lock_check.c
index 3b71e1ccb8..f6b6ea1b4c 100644
--- a/erts/emulator/beam/erl_lock_check.c
+++ b/erts/emulator/beam/erl_lock_check.c
@@ -61,7 +61,7 @@ typedef struct {
* on initialization. Locks with small immediate Erlang terms should
* be locked before locks with large immediate Erlang terms, and
* locks with small addresses should be locked before locks with
- * large addresses. The immediate terms and adresses (boxed pointers)
+ * large addresses. The immediate terms and addresses (boxed pointers)
* are compared as unsigned integers not as Erlang terms.
*
* Once a spinlock or rw(spin)lock has been locked, the thread is not
@@ -533,7 +533,7 @@ unlock_of_not_locked(lc_thread_t *thr, erts_lc_lock_t *lck)
static void
lock_order_violation(erts_lc_locked_locks_t *l_lcks, erts_lc_lock_t *lck)
{
- print_lock("Lock order violation occured when locking ", lck, "!\n");
+ print_lock("Lock order violation occurred when locking ", lck, "!\n");
print_curr_locks(l_lcks);
print_lock_order();
lc_abort();
@@ -543,7 +543,7 @@ static void
type_order_violation(char *op, erts_lc_locked_locks_t *l_lcks,
erts_lc_lock_t *lck)
{
- erts_fprintf(stderr, "Lock type order violation occured when ");
+ erts_fprintf(stderr, "Lock type order violation occurred when ");
print_lock(op, lck, "!\n");
ASSERT(l_lcks);
print_curr_locks(l_lcks);
diff --git a/erts/emulator/beam/erl_lock_count.h b/erts/emulator/beam/erl_lock_count.h
index 4c50bd11f0..5af815dad8 100644
--- a/erts/emulator/beam/erl_lock_count.h
+++ b/erts/emulator/beam/erl_lock_count.h
@@ -78,7 +78,7 @@ typedef struct {
extern erts_lcnt_time_t timer_start;
typedef struct {
- Uint32 ns[ERTS_LCNT_HISTOGRAM_SLOT_SIZE]; /* log2 array of nano seconds occurences */
+ Uint32 ns[ERTS_LCNT_HISTOGRAM_SLOT_SIZE]; /* log2 array of nano seconds occurrences */
} erts_lcnt_hist_t;
typedef struct erts_lcnt_lock_stats_s {
diff --git a/erts/emulator/beam/erl_map.c b/erts/emulator/beam/erl_map.c
index 476c1e0d1f..a1580b82a6 100644
--- a/erts/emulator/beam/erl_map.c
+++ b/erts/emulator/beam/erl_map.c
@@ -2813,7 +2813,7 @@ static Eterm hashmap_delete(Process *p, Uint32 hx, Eterm key,
}
unroll:
- /* the size is bounded and atleast one less than the previous size */
+ /* the size is bounded and at least one less than the previous size */
size -= 1;
n = hashmap_size(map) - 1;
diff --git a/erts/emulator/beam/erl_map.h b/erts/emulator/beam/erl_map.h
index c54a516af0..96dcfc5d4e 100644
--- a/erts/emulator/beam/erl_map.h
+++ b/erts/emulator/beam/erl_map.h
@@ -24,7 +24,7 @@
#include "sys.h"
-/* instrinsic wrappers */
+/* intrinsic wrappers */
#if ERTS_AT_LEAST_GCC_VSN__(3, 4, 0)
#define hashmap_clz(x) ((Uint32) __builtin_clz((unsigned int)(x)))
#define hashmap_bitcount(x) ((Uint32) __builtin_popcount((unsigned int) (x)))
diff --git a/erts/emulator/beam/erl_node_container_utils.h b/erts/emulator/beam/erl_node_container_utils.h
index edabdfef61..954624e6a7 100644
--- a/erts/emulator/beam/erl_node_container_utils.h
+++ b/erts/emulator/beam/erl_node_container_utils.h
@@ -58,7 +58,7 @@
* are used as 'serial'. In the "emulator interface" (external format,
* list_to_pid, etc) the least significant 15 bits are presented as
* 'number' and the most significant 3 bits are presented as 'serial',
- * though. The makro internal_pid_index() can be used for retrieving
+ * though. The macro internal_pid_index() can be used for retrieving
* index into the process table. Do *not* use the result from
* pid_number() as an index into the process table. The pid_number() and
* pid_serial() (and friends) fetch the old fixed size 'number' and
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 9358a67083..f4f9e89169 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -1715,8 +1715,8 @@ haw_thr_prgr_current_check_progress(ErtsAuxWorkData *awdp)
if (current != ERTS_THR_PRGR_INVALID
&& !erts_thr_progress_equal(current, erts_thr_progress_current())) {
/*
- * We have used a previouly read current value that isn't the
- * latest; need to poke ourselfs in order to guarantee no loss
+ * We have used a previously read current value that isn't the
+ * latest; need to poke ourselves in order to guarantee no loss
* of wakeups.
*/
erts_sched_poke(awdp->ssi);
@@ -2657,7 +2657,7 @@ handle_aux_work(ErtsAuxWorkData *awdp, erts_aint32_t orig_aux_work, int waiting)
/*
* Handlers are *only* allowed to modify flags in return value
- * and ssi flags that are explicity handled by the handler.
+ * and ssi flags that are explicitly handled by the handler.
* Handlers are, e.g., not allowed to read the ssi flag field and
* then unconditionally return that value.
*
@@ -2667,7 +2667,7 @@ handle_aux_work(ErtsAuxWorkData *awdp, erts_aint32_t orig_aux_work, int waiting)
/*
* Keep ERTS_SSI_AUX_WORK flags in expected frequency order relative
- * eachother. Most frequent first.
+ * each other. Most frequent first.
*/
#ifdef ERTS_SMP
HANDLE_AUX_WORK(ERTS_SSI_AUX_WORK_DELAYED_AW_WAKEUP,
@@ -3698,7 +3698,7 @@ wake_scheduler(ErtsRunQueue *rq)
* The unlocked run queue is not strictly necessary
* from a thread safety or deadlock prevention
* perspective. It will, however, cost us performance
- * if it is locked during wakup of another scheduler,
+ * if it is locked during wakeup of another scheduler,
* so all code *should* handle this without having
* the lock on the run queue.
*/
@@ -6020,7 +6020,7 @@ erts_init_scheduling(int no_schedulers, int no_schedulers_online, int no_poll_th
rq->ix = ix;
- /* make sure that the "extra" id correponds to the schedulers
+ /* make sure that the "extra" id corresponds to the schedulers
* id if the esdp->no <-> ix+1 mapping change.
*/
@@ -6853,7 +6853,7 @@ change_proc_schedule_state(Process *p,
| ERTS_PSFLG_RUNNING_SYS
| ERTS_PSFLG_DIRTY_RUNNING
| ERTS_PSFLG_DIRTY_RUNNING_SYS))) {
- /* We activated a prevously inactive process */
+ /* We activated a previously inactive process */
profile_runnable_proc(p, am_active);
}
@@ -6965,7 +6965,7 @@ active_sys_enqueue(Process *p, ErtsProcSysTask *sys_task,
| ERTS_PSFLG_DIRTY_RUNNING
| ERTS_PSFLG_DIRTY_RUNNING_SYS))
&& (!(a & ERTS_PSFLG_ACTIVE) || (a & ERTS_PSFLG_SUSPENDED))) {
- /* We activated a prevously inactive process */
+ /* We activated a previously inactive process */
profile_runnable_proc(p, am_active);
}
}
@@ -9448,7 +9448,7 @@ Process *erts_schedule(ErtsSchedulerData *esdp, Process *p, int calls)
int actual_reds;
int reds;
Uint32 flags;
- erts_aint32_t state = 0; /* Supress warning... */
+ erts_aint32_t state = 0; /* Suppress warning... */
int is_normal_sched;
ERTS_MSACC_DECLARE_CACHE();
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h
index 86181c8195..b05c3635e2 100644
--- a/erts/emulator/beam/erl_process.h
+++ b/erts/emulator/beam/erl_process.h
@@ -283,7 +283,7 @@ typedef enum {
/*
* Keep ERTS_SSI_AUX_WORK flags ordered in expected frequency
- * order relative eachother. Most frequent at lowest at lowest
+ * order relative each other. Most frequent at lowest at lowest
* index.
*
* ERTS_SSI_AUX_WORK_DEBUG_WAIT_COMPLETED_IX *need* to be
@@ -1065,7 +1065,7 @@ struct process {
Eterm seq_trace_token; /* Sequential trace token (tuple size 5 see below) */
#ifdef USE_VM_PROBES
- Eterm dt_utag; /* Place to store the dynamc trace user tag */
+ Eterm dt_utag; /* Place to store the dynamic trace user tag */
Uint dt_utag_flags; /* flag field for the dt_utag */
#endif
union {
diff --git a/erts/emulator/beam/erl_process_lock.c b/erts/emulator/beam/erl_process_lock.c
index 1541d26559..06bf4a0059 100644
--- a/erts/emulator/beam/erl_process_lock.c
+++ b/erts/emulator/beam/erl_process_lock.c
@@ -31,7 +31,7 @@
* queues.
* The bit field contains of a number of lock flags (L1, L2, ...)
* and a number of wait flags (W1, W2, ...). Each lock flag has a
- * corresponding wait flag. The bit field isn't guarranteed to be
+ * corresponding wait flag. The bit field isn't guaranteed to be
* larger than 32-bits which sets a maximum of 16 different locks
* per process. Currently, only 4 locks per process are used. The
* bit field is operated on by use of atomic operations (custom
@@ -221,9 +221,9 @@ dequeue_waiter(erts_proc_lock_t *lck, int ix)
}
/*
- * Tries to aquire as many locks as possible in lock order,
+ * Tries to acquire as many locks as possible in lock order,
* and sets the wait flag on the first lock not possible to
- * aquire.
+ * acquire.
*
* Note: We need the pix lock during this operation. Wait
* flags are only allowed to be manipulated under pix
@@ -274,7 +274,7 @@ try_aquire(erts_proc_lock_t *lck, erts_tse_t *wtr)
/*
* Transfer 'trnsfr_lcks' held by this executing thread to other
* threads waiting for the locks. When a lock has been transferred
- * we also have to try to aquire as many lock as possible for the
+ * we also have to try to acquire as many lock as possible for the
* other thread.
*/
static int
@@ -416,7 +416,7 @@ wait_for_locks(Process *p,
check_queue(&p->lock);
#endif
- /* Try to aquire locks one at a time in lock order and set wait flag */
+ /* Try to acquire locks one at a time in lock order and set wait flag */
try_aquire(&p->lock, wtr);
ASSERT((wtr->uflgs & ~ERTS_PROC_LOCKS_ALL) == 0);
@@ -444,7 +444,7 @@ wait_for_locks(Process *p,
/*
* Wait for needed locks. When we are woken all needed locks have
- * have been acquired by other threads and transfered to us.
+ * have been acquired by other threads and transferred to us.
* However, we need to be prepared for spurious wakeups.
*/
do {
diff --git a/erts/emulator/beam/erl_process_lock.h b/erts/emulator/beam/erl_process_lock.h
index b5ec8e31e1..2c2695332f 100644
--- a/erts/emulator/beam/erl_process_lock.h
+++ b/erts/emulator/beam/erl_process_lock.h
@@ -229,7 +229,7 @@ typedef struct erts_proc_lock_t_ {
#ifndef ERTS_PROC_LOCK_LOCK_CHECK__
#define ERTS_PROC_LOCK_LOCK_CHECK__
-/* Lock counter implemetation */
+/* Lock counter implementation */
#ifdef ERTS_ENABLE_LOCK_POSITION
#define erts_smp_proc_lock__(P,I,L) erts_smp_proc_lock_x__(P,I,L,__FILE__,__LINE__)
diff --git a/erts/emulator/beam/erl_ptab.c b/erts/emulator/beam/erl_ptab.c
index 179ee8e80d..2be834456b 100644
--- a/erts/emulator/beam/erl_ptab.c
+++ b/erts/emulator/beam/erl_ptab.c
@@ -828,8 +828,8 @@ cleanup_ptab_list_bif_data(Binary *bp)
if (ptdep->prev) {
/*
- * Only remove this bif invokation when we
- * have preceding invokations.
+ * Only remove this bif invocation when we
+ * have preceding invocations.
*/
ptdep->prev->next = ptdep->next;
if (ptdep->next)
@@ -851,7 +851,7 @@ cleanup_ptab_list_bif_data(Binary *bp)
}
else {
/*
- * Free all elements until next bif invokation
+ * Free all elements until next bif invocation
* is found.
*/
ERTS_PTAB_LIST_ASSERT(ptab->list.data.deleted.start == ptdep);
@@ -1477,7 +1477,7 @@ erts_debug_ptab_list(Process *c_p, ErtsPTab *ptab)
hp = HAlloc(c_p, need); /* we need two heap words for each id */
hp_end = hp + need;
- /* make the list by scanning bakward */
+ /* make the list by scanning backward */
for (i = ptab->r.o.max-1; i >= 0; i--) {
diff --git a/erts/emulator/beam/erl_rbtree.h b/erts/emulator/beam/erl_rbtree.h
index ce401fa7e7..8fae9d6287 100644
--- a/erts/emulator/beam/erl_rbtree.h
+++ b/erts/emulator/beam/erl_rbtree.h
@@ -359,7 +359,7 @@
* int indent,
* (void)(*print_node)(ERTS_RBT_T *));
* Prints the tree. Note that this function is recursive.
- * Should only be used for debuging.
+ * Should only be used for debugging.
*/
diff --git a/erts/emulator/beam/erl_thr_progress.c b/erts/emulator/beam/erl_thr_progress.c
index ac3719f86e..1ec5b79a72 100644
--- a/erts/emulator/beam/erl_thr_progress.c
+++ b/erts/emulator/beam/erl_thr_progress.c
@@ -1124,7 +1124,7 @@ request_wakeup_managed(ErtsThrPrgrData *tpd, ErtsThrPrgrVal value)
ASSERT(!erts_thr_progress_has_reached(value));
/*
- * This thread is guarranteed to issue a full memory barrier:
+ * This thread is guaranteed to issue a full memory barrier:
* - after the request has been written, but
* - before the global thread progress reach the (possibly
* increased) requested wakeup value.
@@ -1383,7 +1383,7 @@ erts_thr_progress_fatal_error_wait(SWord timeout) {
/*
* Counting poll intervals may give us a too long timeout
* if cpu is busy. We use timeout time to try to prevent
- * this. In case we havn't got time correction this may
+ * this. In case we haven't got time correction this may
* however fail too...
*/
timeout_time = erts_get_monotonic_time(esdp);
diff --git a/erts/emulator/beam/erl_time_sup.c b/erts/emulator/beam/erl_time_sup.c
index 7a82aff896..d2abc8c6d0 100644
--- a/erts/emulator/beam/erl_time_sup.c
+++ b/erts/emulator/beam/erl_time_sup.c
@@ -2361,7 +2361,7 @@ erts_napi_convert_time_unit(ErtsMonotonicTime val, int from, int to)
{
ErtsMonotonicTime ffreq, tfreq, denom;
/*
- * Convertion between time units using floor function.
+ * Conversion between time units using floor function.
*
* Note that this needs to work also for negative
* values. Ordinary integer division on a negative
@@ -2461,7 +2461,7 @@ BIF_RETTYPE timestamp_0(BIF_ALIST_0)
/*
* Mega seconds is the only value that potentially
- * ever could be a bignum. However, that wont happen
+ * ever could be a bignum. However, that won't happen
* during at least the next 4 million years...
*
* (System time will also have wrapped in the
diff --git a/erts/emulator/beam/erl_trace.h b/erts/emulator/beam/erl_trace.h
index 1fcc0f1a13..644b90415d 100644
--- a/erts/emulator/beam/erl_trace.h
+++ b/erts/emulator/beam/erl_trace.h
@@ -34,7 +34,7 @@
/*
* The bits used effects trace flags (of processes and ports)
* as well as sequential trace flags. If changed make sure
- * these arn't messed up...
+ * these aren't messed up...
*/
#define ERTS_TRACE_TS_TYPE_BITS 3
#define ERTS_TRACE_TS_TYPE_MASK \
diff --git a/erts/emulator/beam/erl_unicode.c b/erts/emulator/beam/erl_unicode.c
index 45e07bf269..b1289379be 100644
--- a/erts/emulator/beam/erl_unicode.c
+++ b/erts/emulator/beam/erl_unicode.c
@@ -478,7 +478,7 @@ L_Again: /* Restart with sublist, old listend was pushed on stack */
} /* is_list(ioterm) */
if (!is_list(ioterm) && !is_nil(ioterm)) {
- /* inproper list end */
+ /* improper list end */
if (is_binary(ioterm)) {
Sint x;
if (latin1) {
@@ -764,7 +764,7 @@ L_Again: /* Restart with sublist, old listend was pushed on stack */
} /* is_list(ioterm) */
if ((*left) && !is_list(ioterm) && !is_nil(ioterm)) {
- /* inproper list end */
+ /* improper list end */
if (is_binary(ioterm)) {
ioterm = do_build_utf8(p,ioterm,left,latin1,target,pos,characters,err,leftover,num_leftovers);
if ((*err) != 0) {
@@ -2379,7 +2379,7 @@ L_Again: /* Restart with sublist, old listend was pushed on stack */
if (x <= 0xffff) {
need += 2;
break;
- } /* else fall throug to error */
+ } /* else fall through to error */
default:
DESTROY_ESTACK(stack);
return ((Sint) -1);
@@ -2420,7 +2420,7 @@ L_Again: /* Restart with sublist, old listend was pushed on stack */
} /* is_list(ioterm) */
if (!is_list(ioterm) && !is_nil(ioterm)) {
- /* inproper list end */
+ /* improper list end */
DESTROY_ESTACK(stack);
return ((Sint) -1);
}
diff --git a/erts/emulator/beam/erlang_dtrace.d b/erts/emulator/beam/erlang_dtrace.d
index 2af2af2b37..85f3820396 100644
--- a/erts/emulator/beam/erlang_dtrace.d
+++ b/erts/emulator/beam/erlang_dtrace.d
@@ -23,7 +23,7 @@
* A note on probe naming: if "__" appears in a provider probe
* definition, then two things happen during compilation:
*
- * 1. The "__" will turn into a hypen, "-", for the probe name.
+ * 1. The "__" will turn into a hyphen, "-", for the probe name.
* 2. The "__" will turn into a single underscore, "_", for the
* macro names and function definitions that the compiler and
* C developers will see.
diff --git a/erts/emulator/beam/hash.c b/erts/emulator/beam/hash.c
index 177b7cc3d1..896c5a5ce3 100644
--- a/erts/emulator/beam/hash.c
+++ b/erts/emulator/beam/hash.c
@@ -110,7 +110,7 @@ static ERTS_INLINE void set_thresholds(Hash* h)
if (h->size_ix > h->min_size_ix)
h->shrink_threshold = h->size / 5; /* shrink at 20% load */
else
- h->shrink_threshold = -1; /* never shrink below inital size */
+ h->shrink_threshold = -1; /* never shrink below initial size */
}
/*
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index c73d17c921..e53e69eff0 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -1176,7 +1176,7 @@ erts_schedule_proc2port_signal(Process *c_p,
* callers message queue to the end of the queue.
*
* NOTE: It is of vital importance that the caller
- * immediately do a receive unconditionaly
+ * immediately do a receive unconditionally
* waiting for the message with the reference;
* otherwise, next receive will *not* work
* as expected!
@@ -1643,7 +1643,7 @@ erts_port_output_async(Port *prt, Eterm from, Eterm list)
ErlDrvSizeT ERTS_DECLARE_DUMMY(r);
/*
- * Apperently there exist code that write 1 byte to
+ * Apparently there exist code that write 1 byte to
* much in buffer. Where it resides I don't know, but
* we can live with one byte extra allocated...
*/
@@ -1977,7 +1977,7 @@ erts_port_output(Process *c_p,
ErlDrvSizeT r;
/*
- * Apperently there exist code that write 1 byte to
+ * Apparently there exist code that write 1 byte to
* much in buffer. Where it resides I don't know, but
* we can live with one byte extra allocated...
*/
@@ -3196,7 +3196,7 @@ static int flush_linebuf(LineBufContext *bp)
* Returns: LINEBUF_EMPTY if there is no more data that can be
* determined as a line (only part of a line left), LINEBUF_EOL if a whole
* line could be delivered and LINEBUF_NOEOL if the buffer size has been
- * exceeded. The data and the data length can be accesed through the
+ * exceeded. The data and the data length can be accessed through the
* LINEBUF_DATA and the LINEBUF_DATALEN macros applied to the LineBufContext.
* Parameters:
* bp - A LineBufContext that is initialized with
@@ -3310,7 +3310,7 @@ deliver_result(Port *prt, Eterm sender, Eterm pid, Eterm res)
/*
* Deliver a "read" message.
- * hbuf -- byte that are always formated as a list
+ * hbuf -- byte that are always formatted as a list
* hlen -- number of byte in header
* buf -- data
* len -- length of data
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h
index 1ffc7f5028..a7ca7c3f9e 100644
--- a/erts/emulator/beam/sys.h
+++ b/erts/emulator/beam/sys.h
@@ -348,7 +348,7 @@ __decl_noreturn void __noreturn erl_assert_error(const char* expr, const char *f
** Eterm: A tagged erlang term (possibly 64 bits)
** BeamInstr: A beam code instruction unit, possibly larger than Eterm, not smaller.
** UInt: An unsigned integer exactly as large as an Eterm.
-** SInt: A signed integer exactly as large as an eterm and therefor large
+** SInt: A signed integer exactly as large as an eterm and therefore large
** enough to hold the return value of the signed_val() macro.
** UWord: An unsigned integer at least as large as a void * and also as large
** or larger than an Eterm
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index 87c91c035c..7d09f1e0e1 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -809,7 +809,7 @@ erts_bld_atom_2uint_3tup_list(Uint **hpp, Uint *szp, Sint length,
** h(0) = <initial hash>
** h(i) = h(i-1)*X + B(i-1)
** The above should hold regardless of internal representation.
-** Pids are hashed like small numbers but with differrent constants, as are
+** Pids are hashed like small numbers but with different constants, as are
** ports.
** References are hashed like ports but only on the least significant byte.
** Binaries are hashed on all bytes (not on the 15 first as in
--
2.31.1