OSDN Git Service

* gcc.target/i386/sse2-mmx.c (unsigned_add3): Use _mm_setzero_si64
[pf3gnuchains/gcc-fork.git] / gcc / gthr-win32.h
index a27dccf..adf6efb 100644 (file)
@@ -423,6 +423,7 @@ extern int __gthr_win32_recursive_mutex_lock (__gthread_recursive_mutex_t *);
 extern int
   __gthr_win32_recursive_mutex_trylock (__gthread_recursive_mutex_t *);
 extern int __gthr_win32_recursive_mutex_unlock (__gthread_recursive_mutex_t *);
+extern void __gthr_win32_mutex_destroy (__gthread_mutex_t *);
 
 static inline int
 __gthread_once (__gthread_once_t *once, void (*func) (void))
@@ -463,6 +464,12 @@ __gthread_mutex_init_function (__gthread_mutex_t *mutex)
   __gthr_win32_mutex_init_function (mutex);
 }
 
+static inline void
+__gthread_mutex_destroy (__gthread_mutex_t *mutex)
+{
+  __gthr_win32_mutex_destroy (mutex);
+}
+
 static inline int
 __gthread_mutex_lock (__gthread_mutex_t *mutex)
 {
@@ -562,7 +569,8 @@ __gthread_once (__gthread_once_t *once, void (*func) (void))
    leaks, especially in threaded applications making extensive use of
    C++ EH. Mingw uses a thread-support DLL to work-around this problem.  */
 static inline int
-__gthread_key_create (__gthread_key_t *key, void (*dtor) (void *))
+__gthread_key_create (__gthread_key_t *key,
+                     void (*dtor) (void *) __attribute__((unused)))
 {
   int status = 0;
   DWORD tls_index = TlsAlloc ();
@@ -614,6 +622,12 @@ __gthread_mutex_init_function (__gthread_mutex_t *mutex)
   mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL);
 }
 
+static inline void
+__gthread_mutex_destroy (__gthread_mutex_t *mutex)
+{
+  CloseHandle ((HANDLE) mutex->sema);
+}
+
 static inline int
 __gthread_mutex_lock (__gthread_mutex_t *mutex)
 {