Skip to content

Commit

Permalink
globalcontext: remove unused lock
Browse files Browse the repository at this point in the history
New atom_table doesn't need any additional external lock, so let's
remove it.

Signed-off-by: Davide Bettio <davide@uninstall.it>
  • Loading branch information
bettio committed Oct 31, 2023
1 parent 2e63469 commit c0108e5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/libAtomVM/globalcontext.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ GlobalContext *globalcontext_new()

glb->last_process_id = 0;

#ifndef AVM_NO_SMP
smp_spinlock_init(&glb->atom_insert_lock);
#endif
glb->atom_table = atom_table_new();
if (IS_NULL_PTR(glb->atom_table)) {
free(glb);
Expand Down
4 changes: 0 additions & 4 deletions src/libAtomVM/globalcontext.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ struct GlobalContext

int32_t last_process_id;

// TODO: this SpinLock should be removed
#ifndef AVM_NO_SMP
SpinLock atom_insert_lock;
#endif
struct AtomTable *atom_table;
struct AtomsHashTable *modules_table;

Expand Down

0 comments on commit c0108e5

Please sign in to comment.