Phasor 3.1.1
Stack VM based Programming Language
Loading...
Searching...
No Matches
main.c File Reference
#include <PhasorFFI.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <dirent.h>
#include <signal.h>
#include <time.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for main.c:

Go to the source code of this file.

Macros

#define PHASOR_FFI_BUILD_DLL

Functions

static PhasorValue phasor_open (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_close (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_read (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_write (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_unlink (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_mkdir (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_rmdir (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_fork (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_execve (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_waitpid (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_kill (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_sleep (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_nanosleep (PhasorVM *vm, int argc, const PhasorValue *argv)
static PhasorValue phasor_clock_gettime (PhasorVM *vm, int argc, const PhasorValue *argv)
PHASOR_FFI_EXPORT void phasor_plugin_entry (const PhasorAPI *api, PhasorVM *vm)
 The one and only entry point for a Phasor plugin.

Macro Definition Documentation

◆ PHASOR_FFI_BUILD_DLL

#define PHASOR_FFI_BUILD_DLL

Definition at line 1 of file main.c.

Function Documentation

◆ phasor_clock_gettime()

PhasorValue phasor_clock_gettime ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 169 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_close()

PhasorValue phasor_close ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 26 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_execve()

PhasorValue phasor_execve ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 97 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_fork()

PhasorValue phasor_fork ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 91 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_kill()

PhasorValue phasor_kill ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 138 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_mkdir()

PhasorValue phasor_mkdir ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 73 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_nanosleep()

PhasorValue phasor_nanosleep ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 159 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_open()

PhasorValue phasor_open ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 16 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_plugin_entry()

PHASOR_FFI_EXPORT void phasor_plugin_entry ( const PhasorAPI * api,
PhasorVM * vm )

The one and only entry point for a Phasor plugin.

A Phasor-compatible shared library MUST export a C function with this exact signature. The Phasor host will call this function when the plugin is loaded, providing the plugin with a pointer to the host's API functions and the current VM instance.

Parameters
apiA pointer to a struct containing function pointers that the plugin can use to interact with the host (e.g., register functions).
vmAn opaque pointer to the VM instance. This should be passed back to any API functions that require it.

Definition at line 182 of file main.c.

Here is the call graph for this function:

◆ phasor_read()

PhasorValue phasor_read ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 34 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_rmdir()

PhasorValue phasor_rmdir ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 81 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_sleep()

PhasorValue phasor_sleep ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 150 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_unlink()

PhasorValue phasor_unlink ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 63 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_waitpid()

PhasorValue phasor_waitpid ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 124 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ phasor_write()

PhasorValue phasor_write ( PhasorVM * vm,
int argc,
const PhasorValue * argv )
static

Definition at line 53 of file main.c.

Here is the call graph for this function:
Here is the caller graph for this function: