mirror of
https://review.haiku-os.org/haiku
synced 2025-02-15 01:58:36 +01:00
This requires the introduction of the flag B_USER_MUTEX_SHARED, and then actually using the SHARED flags in pthread structures to determine when it should be passed through. This commit still uses wired memory even for per-team contexts. That will change in the next commit. GLTeapot FPS seems about the same. Change-Id: I749a00dcea1531e113a65299b6d6610f57511fcc Reviewed-on: https://review.haiku-os.org/c/haiku/+/6602 Reviewed-by: waddlesplash <waddlesplash@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
36 lines
873 B
C
36 lines
873 B
C
/*
|
|
* Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _KERNEL_USER_MUTEX_H
|
|
#define _KERNEL_USER_MUTEX_H
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct user_mutex_context;
|
|
|
|
void user_mutex_init();
|
|
void delete_user_mutex_context(struct user_mutex_context* context);
|
|
|
|
status_t _user_mutex_lock(int32* mutex, const char* name, uint32 flags,
|
|
bigtime_t timeout);
|
|
status_t _user_mutex_unblock(int32* mutex, uint32 flags);
|
|
status_t _user_mutex_switch_lock(int32* fromMutex, uint32 fromFlags,
|
|
int32* toMutex, const char* name, uint32 toFlags, bigtime_t timeout);
|
|
status_t _user_mutex_sem_acquire(int32* sem, const char* name, uint32 flags,
|
|
bigtime_t timeout);
|
|
status_t _user_mutex_sem_release(int32* sem);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
|
|
#endif /* _KERNEL_USER_MUTEX_H */
|