Get llama.com working on aarch64

This commit is contained in:
Justine Tunney 2023-05-09 22:41:57 -07:00
parent 4c093155a3
commit a0237a017c
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
19 changed files with 321 additions and 157 deletions

View file

@ -20,14 +20,9 @@
#include "libc/runtime/memtrack.internal.h"
#include "libc/thread/thread.h"
#ifdef __x86_64__
STATIC_YOINK("_init__mmi");
#endif
struct MemoryIntervals _mmi;
pthread_mutex_t __mmi_lock_obj; // recursive :'(
__attribute__((__constructor__)) void __mmi_init(void) {
static bool once;
if (once) return;
_mmi.n = ARRAYLEN(_mmi.s);
_mmi.p = _mmi.s;
__mmi_lock_obj._type = PTHREAD_MUTEX_RECURSIVE;
once = true;
}