generalization of syscalls
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#include "../std.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
void *com_std_alloc(void *ptr, size_t size) { return NULL; }
|
||||
void com_std_assert(bool holds) {}
|
||||
void com_std_printf(char const *fmt, ...) {}
|
||||
@@ -15,6 +18,24 @@ double com_std_sin(double v) { return 0; }
|
||||
double com_std_cos(double v) { return 0; }
|
||||
#endif
|
||||
|
||||
com_std_fd com_std_open(char *path, uint32_t flags) { return NULL; }
|
||||
bool com_std_write(com_std_fd fd, char const *data, uint32_t bytes) {
|
||||
return false;
|
||||
}
|
||||
int32_t com_std_read(com_std_fd fd, char *data, uint32_t upto) { return -1; }
|
||||
bool com_std_sfwd(com_std_fd fd, uint32_t bytes) { return false; }
|
||||
com_std_fd com_std_socket(bool isnetwork) { return NULL; }
|
||||
bool com_std_connect(com_std_fd fd, bool isnetwork, char *address) {
|
||||
return false;
|
||||
}
|
||||
void com_std_exit(uint32_t status) {
|
||||
__builtin_trap();
|
||||
while (1) {
|
||||
}
|
||||
__builtin_unreachable();
|
||||
}
|
||||
void com_std_close(com_std_fd fd) { return; }
|
||||
|
||||
// void memcpy(void *__restrict dest, const void *__restrict src, size_t n) {
|
||||
// __builtin_memcpy(dest, src, n);
|
||||
// };
|
||||
|
||||
Reference in New Issue
Block a user