-/****h* silcutil/silcmutex.h
- *
- * NAME
- *
- * silcmutex.h
- *
- * COPYRIGHT
- *
- * Author: Pekka Riikonen <priikone@silcnet.org>
- *
- * Copyright (C) 2001 Pekka Riikonen
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+/*
+
+ silcmutex.h
+
+ Author: Pekka Riikonen <priikone@silcnet.org>
+
+ Copyright (C) 2001 Pekka Riikonen
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+*/
+
+/****h* silcutil/SilcMutexAPI
*
* DESCRIPTION
*
*
* SYNOPSIS
*
- * SilcMutex silc_mutex_alloc(void);
+ * bool silc_mutex_alloc(SilcMutex *mutex);
*
* DESCRIPTION
*
* Allocates SILC Mutex object. The mutex object must be allocated
* before it can be used. It is freed by the silc_mutex_free function.
+ * This returns TRUE and allocated mutex in to the `mutex' and FALSE
+ * on error.
*
***/
-SilcMutex silc_mutex_alloc(void);
+bool silc_mutex_alloc(SilcMutex *mutex);
/****f* silcutil/SilcMutexAPI/silc_mutex_free
*
#else
#define SILC_MUTEX_DEFINE(name)
-#define silc_mutex_alloc()
-#define silc_mutex_free(mutex)
-#define silc_mutex_lock(mutex)
-#define silc_mutex_unlock(mutex)
+#define silc_mutex_alloc(mutex) (void)0
+#define silc_mutex_free(mutex) (void)0
+#define silc_mutex_lock(mutex) (void)0
+#define silc_mutex_unlock(mutex) (void)0
#endif /* SILC_THREADS */