From 2bf2a6cd800b6dad9dbc065f86aa9e57f2310e1c Mon Sep 17 00:00:00 2001 From: CleverMouse <theclevermouse@yandex.ru> Date: Tue, 19 Mar 2013 21:45:05 +0000 Subject: [PATCH] spin_lock_* macro git-svn-id: svn://kolibrios.org@3395 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/const.inc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/kernel/trunk/const.inc b/kernel/trunk/const.inc index cf6df762a2..9c1f737a94 100644 --- a/kernel/trunk/const.inc +++ b/kernel/trunk/const.inc @@ -579,6 +579,26 @@ struct PCIDEV bus db ? ends +; The following macro assume that we are on uniprocessor machine. +; Serious work is needed for multiprocessor machines. +macro spin_lock_irqsave spinlock +{ + pushf + cli +} +macro spin_unlock_irqrestore spinlock +{ + popf +} +macro spin_lock_irq spinlock +{ + cli +} +macro spin_unlock_irq spinlock +{ + sti +} + struct MEM_STATE mutex MUTEX smallmap dd ?