1/*
2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _KERNEL_USER_MUTEX_H
6#define _KERNEL_USER_MUTEX_H
7
8
9#include <SupportDefs.h>
10
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16struct user_mutex_context;
17
18void		user_mutex_init();
19void		delete_user_mutex_context(struct user_mutex_context* context);
20
21status_t	_user_mutex_lock(int32* mutex, const char* name, uint32 flags,
22				bigtime_t timeout);
23status_t	_user_mutex_unblock(int32* mutex, uint32 flags);
24status_t	_user_mutex_switch_lock(int32* fromMutex, uint32 fromFlags,
25				int32* toMutex, const char* name, uint32 toFlags, bigtime_t timeout);
26status_t	_user_mutex_sem_acquire(int32* sem, const char* name, uint32 flags,
27				bigtime_t timeout);
28status_t	_user_mutex_sem_release(int32* sem, uint32 flags);
29
30#ifdef __cplusplus
31}
32#endif
33
34
35#endif	/* _KERNEL_USER_MUTEX_H */
36