mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Add x86_64-linux-gnu emulator
I wanted a tiny scriptable meltdown proof way to run userspace programs and visualize how program execution impacts memory. It helps to explain how things like Actually Portable Executable works. It can show you how the GCC generated code is going about manipulating matrices and more. I didn't feel fully comfortable with Qemu and Bochs because I'm not smart enough to understand them. I wanted something like gVisor but with much stronger levels of assurances. I wanted a single binary that'll run, on all major operating systems with an embedded GPL barrier ZIP filesystem that is tiny enough to transpile to JavaScript and run in browsers too. https://justine.storage.googleapis.com/emulator625.mp4
This commit is contained in:
parent
467504308a
commit
f4f4caab0e
1052 changed files with 65667 additions and 7825 deletions
|
@ -1,13 +1,14 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_TIME_TIME_H_
|
||||
#define COSMOPOLITAN_LIBC_TIME_TIME_H_
|
||||
#include "libc/calls/struct/timespec.h"
|
||||
#include "libc/calls/struct/timeval.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
struct itimerval;
|
||||
struct timespec;
|
||||
struct timeval;
|
||||
struct timezone;
|
||||
struct tm;
|
||||
struct utimbuf;
|
||||
|
||||
extern const char kWeekdayNameShort[7][4];
|
||||
extern const char kWeekdayName[7][10];
|
||||
|
@ -20,12 +21,12 @@ extern long CLOCKS_PER_SEC;
|
|||
int64_t clock(void);
|
||||
int64_t time(int64_t *);
|
||||
int gettimeofday(struct timeval *, struct timezone *);
|
||||
int clock_gettime(int, struct timespec *) paramsnonnull();
|
||||
int clock_gettime(int, struct timespec *);
|
||||
int clock_getres(int, struct timespec *);
|
||||
|
||||
int sleep(uint32_t);
|
||||
int usleep(uint32_t);
|
||||
int nanosleep(const struct timespec *, struct timespec *) paramsnonnull((1));
|
||||
int nanosleep(const struct timespec *, struct timespec *);
|
||||
unsigned alarm(unsigned);
|
||||
int getitimer(int, struct itimerval *) paramsnonnull();
|
||||
int setitimer(int, const struct itimerval *, struct itimerval *)
|
||||
|
@ -51,7 +52,12 @@ char *asctime_r(const struct tm *, char * /*[64]*/);
|
|||
char *ctime(const int64_t *);
|
||||
char *ctime_r(const int64_t *, char * /*[64]*/);
|
||||
|
||||
int utimes(const char *, const struct timeval *);
|
||||
int futimens(int, const struct timespec[2]);
|
||||
int utimensat(int, const char *, const struct timespec[2], int);
|
||||
int utimes(const char *, const struct timeval[2]);
|
||||
int utime(const char *, const struct utimbuf *);
|
||||
int futimes(int, const struct timeval[2]);
|
||||
int futimesat(int, const char *, const struct timeval[2]);
|
||||
|
||||
long double dtime(int);
|
||||
long double dsleep(long double);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue