Skip to content

Commit d8195c0

Browse files
lyakhnashif
authored andcommitted
llext: rename _llext_list to llext_list
Beginning symbols or structure field names with an underscore isn't a widely used style in Zephyr, remove the leading underscore from _llext_list. Signed-off-by: Guennadi Liakhovetski <[email protected]>
1 parent 4a275a0 commit d8195c0

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

include/zephyr/llext/llext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ struct llext_loader;
7979
*/
8080
struct llext {
8181
/** @cond ignore */
82-
sys_snode_t _llext_list;
82+
sys_snode_t llext_list;
8383

8484
#ifdef CONFIG_USERSPACE
8585
struct k_mem_partition mem_parts[LLEXT_MEM_PARTITIONS];

subsys/llext/llext.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ LOG_MODULE_REGISTER(llext, CONFIG_LLEXT_LOG_LEVEL);
1919

2020
#include "llext_priv.h"
2121

22-
static sys_slist_t _llext_list = SYS_SLIST_STATIC_INIT(&_llext_list);
22+
static sys_slist_t llext_list = SYS_SLIST_STATIC_INIT(&llext_list);
2323

2424
static struct k_mutex llext_lock = Z_MUTEX_INITIALIZER(llext_lock);
2525

@@ -90,10 +90,10 @@ struct llext *llext_by_name(const char *name)
9090
{
9191
k_mutex_lock(&llext_lock, K_FOREVER);
9292

93-
for (sys_snode_t *node = sys_slist_peek_head(&_llext_list);
93+
for (sys_snode_t *node = sys_slist_peek_head(&llext_list);
9494
node != NULL;
9595
node = sys_slist_peek_next(node)) {
96-
struct llext *ext = CONTAINER_OF(node, struct llext, _llext_list);
96+
struct llext *ext = CONTAINER_OF(node, struct llext, llext_list);
9797

9898
if (strncmp(ext->name, name, LLEXT_MAX_NAME_LEN) == 0) {
9999
k_mutex_unlock(&llext_lock);
@@ -112,10 +112,10 @@ int llext_iterate(int (*fn)(struct llext *ext, void *arg), void *arg)
112112

113113
k_mutex_lock(&llext_lock, K_FOREVER);
114114

115-
for (node = sys_slist_peek_head(&_llext_list);
115+
for (node = sys_slist_peek_head(&llext_list);
116116
node;
117117
node = sys_slist_peek_next(node)) {
118-
struct llext *ext = CONTAINER_OF(node, struct llext, _llext_list);
118+
struct llext *ext = CONTAINER_OF(node, struct llext, llext_list);
119119

120120
ret = fn(ext, arg);
121121
if (ret) {
@@ -198,7 +198,7 @@ int llext_load(struct llext_loader *ldr, const char *name, struct llext **ext,
198198
(*ext)->name[LLEXT_MAX_NAME_LEN] = '\0';
199199
(*ext)->use_count++;
200200

201-
sys_slist_append(&_llext_list, &(*ext)->_llext_list);
201+
sys_slist_append(&llext_list, &(*ext)->llext_list);
202202
LOG_INF("Loaded extension %s", (*ext)->name);
203203

204204
out:
@@ -230,7 +230,7 @@ int llext_unload(struct llext **ext)
230230
}
231231

232232
/* FIXME: protect the global list */
233-
sys_slist_find_and_remove(&_llext_list, &tmp->_llext_list);
233+
sys_slist_find_and_remove(&llext_list, &tmp->llext_list);
234234

235235
llext_dependency_remove_all(tmp);
236236

0 commit comments

Comments
 (0)