mirror of
https://github.com/devkitPro/wut.git
synced 2026-08-06 09:44:07 -05:00
24 lines
370 B
C
24 lines
370 B
C
#include "wut_newlib.h"
|
|
|
|
#include <coreinit/spinlock.h>
|
|
|
|
static OSSpinLock sMallocSpinLock;
|
|
|
|
void
|
|
__wut_malloc_lock(struct _reent *r)
|
|
{
|
|
OSUninterruptibleSpinLock_Acquire(&sMallocSpinLock);
|
|
}
|
|
|
|
void
|
|
__wut_malloc_unlock(struct _reent *r)
|
|
{
|
|
OSUninterruptibleSpinLock_Release(&sMallocSpinLock);
|
|
}
|
|
|
|
void
|
|
__init_wut_malloc_lock()
|
|
{
|
|
OSInitSpinLock(&sMallocSpinLock);
|
|
}
|