* roottypes.cs: Rename from tree.cs.
[mono.git] / mono / io-layer / mono-spinlock.h
1 /*
2  * mono-spinlock.h:  Lightweight spinlocks, for internal use only
3  *
4  * Author:
5  *      Dick Porter (dick@ximian.com)
6  *
7  * (C) 2002 Ximian, Inc.
8  * Copyright (c) 2002-2006 Novell, Inc.
9  */
10
11 #ifndef _WAPI_MONO_SPINLOCK_H_
12 #define _WAPI_MONO_SPINLOCK_H_
13
14 #include <glib.h>
15
16 #include <mono/io-layer/wapi.h>
17
18 #define MONO_SPIN_LOCK(lock)    while((InterlockedCompareExchange((gint32 *)&lock, 1, 0))!=0)
19 #define MONO_SPIN_UNLOCK(lock)  lock=0
20
21 #endif /* _WAPI_MONO_SPINLOCK_H_ */