Phasor 2.2.0
Stack VM based Programming Language
Loading...
Searching...
No Matches
posix_bindings.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 posix_bindings.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 posix_bindings.c.

Function Documentation

◆ phasor_clock_gettime()

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

Definition at line 139 of file posix_bindings.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 24 of file posix_bindings.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 79 of file posix_bindings.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 74 of file posix_bindings.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 114 of file posix_bindings.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 60 of file posix_bindings.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 131 of file posix_bindings.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 posix_bindings.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 150 of file posix_bindings.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 30 of file posix_bindings.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 66 of file posix_bindings.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 124 of file posix_bindings.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 52 of file posix_bindings.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 102 of file posix_bindings.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 44 of file posix_bindings.c.

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