~swisschili/bluejay

ref: 6d02af472f6ce87ea50ff24aa77f88928dbf31bc bluejay/src/lisp/plat/plat.h -rw-r--r-- 568 bytes
6d02af47swissChili Add detailed error reporting, remove panics 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include <dasm_proto.h>
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/types.h>

/* Platform specific definitions */

// Must return an address aligned to 8 bytes
void *malloc_aligned(size_t size);
void *realloc_aligned(void *addr, size_t size);
void free_aligned(void *addr);

void *link_program(dasm_State **Dst);

extern ssize_t readlink(const char *pathname, char *buf, size_t buf_size);
bool file_exists(const char *path);

char *read_input_line(char *prompt);
void add_line_to_history(char *line);

#define THREAD_LOCAL