Manage RIDs via id_alloc
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m2s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m2s
This commit is contained in:
@@ -4,15 +4,15 @@
|
||||
#include <liballoc.h>
|
||||
#include <system.h>
|
||||
|
||||
#define LIBALLOC_MUTEX 500
|
||||
int liballoc_mutex;
|
||||
|
||||
void liballoc_init (void) { mutex_create (LIBALLOC_MUTEX); }
|
||||
void liballoc_init (void) { liballoc_mutex = mutex_create (); }
|
||||
|
||||
void liballoc_deinit (void) { mutex_delete (LIBALLOC_MUTEX); }
|
||||
void liballoc_deinit (void) { mutex_delete (liballoc_mutex); }
|
||||
|
||||
int liballoc_lock (void) { return mutex_lock (LIBALLOC_MUTEX); }
|
||||
int liballoc_lock (void) { return mutex_lock (liballoc_mutex); }
|
||||
|
||||
int liballoc_unlock (void) { return mutex_unlock (LIBALLOC_MUTEX); }
|
||||
int liballoc_unlock (void) { return mutex_unlock (liballoc_mutex); }
|
||||
|
||||
void* liballoc_alloc (int pages) { return map (0, pages, MAP_FLAGS | MAP_RW); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user