BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / 5be6a64670a09857d2128737723e0b5d4021271e / object / list.c

// Related

Nucleus

Barry Global object lists 5be6a64 (3 years, 3 months ago)
diff --git a/object/list.c b/object/list.c
index 75725e5..3e9b96b 100644
--- a/object/list.c
+++ b/object/list.c
@@ -22,6 +22,7 @@ struct ObjectList {
 	Spinlock lock;
 };
 
+void init_lock(Spinlock *lock);
 void acquire(Spinlock *lock);
 void release(Spinlock *lock);
 
@@ -30,6 +31,7 @@ ObjectList *
 create_list(ObjectType *type)
 {
 	ObjectList *list = kmalloc(sizeof(ObjectList));
+	init_lock(&list->lock);
 	list->type = type;
 	return list;
 }