add the 2.1-bootstrap dir to MONO_PATH when running smcs
[moon.git] / src / mutex.h
blob0b47212fbd0d0c0e0a0e8f35aaf96232c8afc666
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * mutex.h:
5 * Contact:
6 * Moonlight List (moonlight-list@lists.ximian.com)
8 * Copyright 2009 Novell, Inc. (http://www.novell.com)
10 * See the LICENSE file included with the distribution for details.
13 #ifndef __MOON_MUTEX_H__
14 #define __MOON_MUTEX_H__
16 #include <pthread.h>
18 class Mutex {
19 private:
20 pthread_mutex_t mutex;
22 public:
23 Mutex ()
25 pthread_mutex_init (&mutex, NULL);
27 ~Mutex ()
29 pthread_mutex_destroy (&mutex);
31 void Lock ()
33 pthread_mutex_lock (&mutex);
35 void Unlock ()
37 pthread_mutex_unlock (&mutex);
41 #endif /* __MOON_MUTEX_H */