Skip to content

Commit b34c943

Browse files
committed
Merge pull request #1994 from UncleGrumpy/doc_fixes
Documentation fixes These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license). SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
2 parents 27b5381 + d6966bf commit b34c943

File tree

9 files changed

+24
-26
lines changed

9 files changed

+24
-26
lines changed

libs/estdlib/src/supervisor.erl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
% SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
1919
%
2020

21-
-module(supervisor).
22-
2321
%%-----------------------------------------------------------------------------
2422
%% @doc An implementation of the Erlang/OTP supervisor interface.
2523
%%
@@ -39,6 +37,7 @@
3937
%% </ul>
4038
%% @end
4139
%%-----------------------------------------------------------------------------
40+
-module(supervisor).
4241

4342
-behavior(gen_server).
4443

src/libAtomVM/atom_table.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ bool atom_table_is_atom_ref_ascii(struct AtomTable *table, atom_ref_t atom);
8282
* @details returned pointer is not null terminated
8383
*
8484
* @param table atom table
85-
* @param atom_index index of the atom to get the representation of
85+
* @param index index of the atom to get the representation of
8686
* @param out_len on output, size of the character data
8787
*/
8888
const uint8_t *atom_table_get_atom_string(struct AtomTable *table, atom_index_t index, size_t *out_len);
@@ -93,6 +93,7 @@ const uint8_t *atom_table_get_atom_string(struct AtomTable *table, atom_index_t
9393
* @details Write module:function/arity to the supplied buffer. This function will abort
9494
* if the written module, function, and arity are longer than the supplied
9595
* buffer size.
96+
* @param table atom table
9697
* @param buf the buffer to write into
9798
* @param buf_size the amount of room in the buffer
9899
* @param module the module name

src/libAtomVM/context.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ struct Monitor *monitor_new(term monitor_pid, uint64_t ref_ticks, bool is_monito
518518
* @param monitor_process_id monitored process id
519519
* @param monitor_name name of the monitor (atom)
520520
* @param ref_ticks reference of the monitor
521-
* @param is_monitoring if ctx is the monitoring process
522521
* @return the allocated monitor or NULL if allocation failed
523522
*/
524523
struct Monitor *monitor_registeredname_monitor_new(int32_t monitor_process_id, term monitor_name, uint64_t ref_ticks);

src/libAtomVM/dist_nifs.h

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ extern const struct Nif dist_ctrl_put_data_nif;
4848
struct DistConnection;
4949

5050
/**
51-
* @doc Enqueue a message to be sent to a remote process.
51+
* @brief Enqueue a message to be sent to a remote process.
5252
* This function may raise a badarg error following OTP if target is incorrect.
5353
* @param target external pid or a tuple {atom(), node()} to refer to a remote
5454
* registered process
@@ -60,8 +60,7 @@ struct DistConnection;
6060
term dist_send_message(term target, term payload, Context *ctx);
6161

6262
/**
63-
* @doc Setup a monitor on a local process for a distributed process.
64-
* @end
63+
* @brief Setup a monitor on a local process for a distributed process.
6564
* @param conn_obj object of the connection
6665
* @param from_pid remote pid setting up the monitor
6766
* @param target_proc atom (for registered process) or pid of the local
@@ -72,28 +71,27 @@ term dist_send_message(term target, term payload, Context *ctx);
7271
term dist_monitor(struct DistConnection *conn_obj, term from_pid, term target_proc, term monitor_ref, Context *ctx);
7372

7473
/**
75-
* @doc Send a spawn reply signal to a node
76-
* @end
77-
* @param conn_obj object of the connection
74+
* @brief Send a spawn reply signal to a node
7875
* @param req_id reference identifying the request
7976
* @param to_pid (remote) process id identifying the caller
8077
* @param link if a link was created
8178
* @param monitor if a monitor was created
8279
* @param result pid of the spawned process or atom for an error
83-
* @param ctx context for memory allocation
80+
* @param connection object of the connection
81+
* @param global context for memory allocation
8482
*/
8583
void dist_spawn_reply(term req_id, term to_pid, bool link, bool monitor, term result, struct DistConnection *connection, GlobalContext *global);
8684

8785
/**
88-
* @doc Send a link exit signal (PAYLOAD_EXIT)
86+
* @brief Send a link exit signal (PAYLOAD_EXIT)
8987
* @param monitor structure with node, process_id, serial and creation
9088
* @param reason reason to send as the payload
9189
* @param ctx process that is exiting.
9290
*/
9391
void dist_send_payload_exit(struct LinkRemoteMonitor *monitor, term reason, Context *ctx);
9492

9593
/**
96-
* @doc Send a link signal (LINK)
94+
* @brief Send a link signal (LINK)
9795
* @param from_pid the pid linking to
9896
* @param to_pid the (remote) pid to link to
9997
* @param ctx context for memory allocation
@@ -103,7 +101,7 @@ void dist_send_payload_exit(struct LinkRemoteMonitor *monitor, term reason, Cont
103101
term dist_send_link(term from_pid, term to_pid, Context *ctx);
104102

105103
/**
106-
* @doc Send an unlink id signal (UNLINK_ID), silently do nothing if node is
104+
* @brief Send an unlink id signal (UNLINK_ID), silently do nothing if node is
107105
* not connected
108106
* @param unlink_id unique id of the unlink operation
109107
* @param from_pid the pid linking to
@@ -113,7 +111,7 @@ term dist_send_link(term from_pid, term to_pid, Context *ctx);
113111
void dist_send_unlink_id(uint64_t unlink_id, term from_pid, term to_pid, Context *ctx);
114112

115113
/**
116-
* @doc Send an unlink id ack signal (UNLINK_ID_ACK), silently do nothing if node is
114+
* @brief Send an unlink id ack signal (UNLINK_ID_ACK), silently do nothing if node is
117115
* not connected
118116
* @param unlink_id unique id of the unlink operation
119117
* @param from_pid the pid linking to

src/libAtomVM/externalterm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ enum ExternalTermResult
5454
* WARNING: This function may call the GC, which may render the input binary
5555
* invalid. See `externalterm_from_binary_with_roots'
5656
* @param ctx the context that owns the memory that will be allocated.
57-
* @param dst a pointer to a term that will contain the binary encoded term.
5857
* @param binary the binary.
5958
* @param bytes_read the number of bytes read from the input binary.
6059
* @returns the term deserialized from the input term, or an invalid term, if

src/libAtomVM/globalcontext.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@ void globalcontext_maybe_unregister_process_id(GlobalContext *glb, int process_i
402402
*
403403
* @details Inserts an atom into the global atoms table and returns its id.
404404
* @param glb the global context.
405-
* @param atom_string the atom string that will be added to the global atoms table, it will not be copied so it must stay allocated and valid.
405+
* @param atom_data the atom data
406+
* @param atom_len the atom data length
406407
* @param copy if `true`, make a copy of the input atom_string if the atom is not already in the table. The table
407408
* assumes "ownership" of the allocated memory.
408409
* @returns newly added atom id or term_invalid_term() in case of failure.
@@ -514,7 +515,7 @@ Module *globalcontext_get_module(GlobalContext *global, atom_index_t module_name
514515
* not check if the module is already loaded and allocates a new module
515516
* structure.
516517
* @param global the global context.
517-
* @param module_name_atom the module name.
518+
* @param module_name the module name.
518519
* @returns a pointer to a Module struct or NULL if the module could not be
519520
* found.
520521
*/

src/libAtomVM/module.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ enum ModuleLoadResult
175175
* @param index the modules import table offset to begin searching.
176176
* @param module_atom module name atom string.
177177
* @param function_atom function name atom string.
178+
* @param glb the global context.
178179
*/
179180
void module_get_imported_function_module_and_name(const Module *this_module, int index, AtomString *module_atom, AtomString *function_atom, GlobalContext *glb);
180181
#endif

src/libAtomVM/sys.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ uint64_t sys_monotonic_time_u64_to_ms(uint64_t t);
244244
* and returns a pointer to a Module struct. This function is called if loading
245245
* from avm packs failed and may return NULL if there is no support for files.
246246
* @param global the global context.
247-
* @param module_name the name of the BEAM file (e.g. "mymodule.beam").
247+
* @param path to the named BEAM file (e.g. "mymodule.beam").
248248
*/
249249
Module *sys_load_module_from_file(GlobalContext *global, const char *path);
250250

src/libAtomVM/term.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ static inline term term_make_external_port_number(term node, uint64_t number, ui
19481948
/**
19491949
* @brief Get the name of a node for a given external thing
19501950
*
1951-
* @param term external term
1951+
* @param t external term
19521952
* @return the name of the node
19531953
*/
19541954
static inline term term_get_external_node(term t)
@@ -1963,7 +1963,7 @@ static inline term term_get_external_node(term t)
19631963
/**
19641964
* @brief Get the creation for a given external thing
19651965
*
1966-
* @param term external term
1966+
* @param t external term
19671967
* @return the serial of the external pid
19681968
*/
19691969
static inline uint32_t term_get_external_node_creation(term t)
@@ -1978,7 +1978,7 @@ static inline uint32_t term_get_external_node_creation(term t)
19781978
/**
19791979
* @brief Get the process id of an external pid
19801980
*
1981-
* @param term external pid
1981+
* @param t external pid
19821982
* @return the process id of the external pid
19831983
*/
19841984
static inline uint32_t term_get_external_pid_process_id(term t)
@@ -1993,7 +1993,7 @@ static inline uint32_t term_get_external_pid_process_id(term t)
19931993
/**
19941994
* @brief Get the serial of an external pid
19951995
*
1996-
* @param term external term
1996+
* @param t external term
19971997
* @return the serial of the external pid
19981998
*/
19991999
static inline uint32_t term_get_external_pid_serial(term t)
@@ -2008,7 +2008,7 @@ static inline uint32_t term_get_external_pid_serial(term t)
20082008
/**
20092009
* @brief Get the port number of an external port
20102010
*
2011-
* @param term external port
2011+
* @param t external port
20122012
* @return the port number of the external port
20132013
*/
20142014
static inline uint64_t term_get_external_port_number(term t)
@@ -2064,7 +2064,7 @@ static inline term term_make_external_reference(term node, uint16_t len, uint32_
20642064
/**
20652065
* @brief Get the number of words of an external reference
20662066
*
2067-
* @param term external term
2067+
* @param t external term
20682068
* @return the number of words of the external reference (from 1 to 5)
20692069
*/
20702070
static inline uint32_t term_get_external_reference_len(term t)
@@ -2088,7 +2088,7 @@ static inline uint32_t term_get_external_reference_len(term t)
20882088
/**
20892089
* @brief Get the words of an external reference
20902090
*
2091-
* @param term external term
2091+
* @param t external term
20922092
* @return a pointer to (len) words of the external reference
20932093
*/
20942094
static inline const uint32_t *term_get_external_reference_words(term t)

0 commit comments

Comments
 (0)