Channel circle › core 0 System (NetXecChannel)
0 System (NetXecChannel): core-level functions
The functions that make up the core channel itself.
111 functions
| Signature | Purpose | Source | Scope |
|---|---|---|---|
| int GetOS(void) | (no comment) | NetXecChannel.c:137 | public |
| static void NxriLock(void) | (no comment) | NetXecChannel.c:202 | static |
| static void NxriUnlock(void) | (no comment) | NetXecChannel.c:203 | static |
| static int NxriSlot(void *peer) | (no comment) | NetXecChannel.c:205 | static |
| static void NxriPut64(unsigned char *p, uint64_t v) | (no comment) | NetXecChannel.c:213 | static |
| static int NxriRecord(uint32_t i, unsigned char *out) | One record for channel slot i into out (NXRI_RECORD_BYTES). 0 when the slot has no RunInfo. | NetXecChannel.c:220 | static |
| uint64_t JoinNetXecChannel(void *peer) | (no comment) | NetXecChannel.c:266 | public |
| void * LeaveNetXecChannel(void *peer) | (no comment) | NetXecChannel.c:285 | public |
| uint64_t ReadNetXecChannel(void *chan, void *buf, long len) | (no comment) | NetXecChannel.c:296 | public |
| uint64_t WriteNetXecChannel(void *chan, void *buf, long len) | (no comment) | NetXecChannel.c:324 | public |
| static void NxriRtOpen(struct Channel *ch) | (no comment) | NetXecChannel.c:347 | static |
| static void NxriRtClose(struct Channel *ch) | (no comment) | NetXecChannel.c:356 | static |
| struct Runtime * GetNetXecRuntime(void) | NetXec's runtime table (wired by OpenNetXecChannel, cleared by CloseNetXecChannel). | NetXecChannel.c:368 | public |
| static void NxriWire(void) | (no comment) | NetXecChannel.c:373 | static |
| static void NxriUnwire(void) | (no comment) | NetXecChannel.c:385 | static |
| struct NetXecChannel * OpenNetXecChannel(void *params) | OpenNetXecChannel - bootstrap | NetXecChannel.c:396 | public |
| static bool BootstrapChannels(struct NetXecChannel * restrict nx) | BootstrapChannels - 8 MB crossbar + 16 Channel structs | NetXecChannel.c:605 | static |
| static void GetChannelThreads(struct NetXecChannel * restrict nx) | GetChannelThreads | NetXecChannel.c:701 | static |
| static int CoreChannelThread(void *arg) | Core channel thread | NetXecChannel.c:739 | static |
| static void DefaultReadIO(struct Channel * restrict target, uint32_t source) | Dispatch table | NetXecChannel.c:840 | static |
| static void DefaultWriteIO(struct Channel * restrict target, uint32_t source) | (no comment) | NetXecChannel.c:846 | static |
| static void SystemReadFromSignal(struct Channel * restrict target, uint32_t source) | System reads a Signal/OS event: pop ring -> write 8 bytes onto the crossbar. | NetXecChannel.c:852 | static |
| static void InitDispatchTable(void) | (no comment) | NetXecChannel.c:887 | static |
| static uint64_t EncodeEvent(const SDL_Event * restrict ev) | Event encoding | NetXecChannel.c:903 | static |
| static void Watchdog(struct NetXecChannel * restrict nx) | Watchdog | NetXecChannel.c:934 | static |
| static void WakeSystemForSignal(void) | Main loop | NetXecChannel.c:959 | static |
| static const char * RunStateName(uint32_t s) | (no comment) | NetXecChannel.c:971 | static |
| static void PrintChannelDiagnostics(void) | (no comment) | NetXecChannel.c:994 | static |
| static void PaintMenuBackdrop(void) | (no comment) | NetXecChannel.c:1117 | static |
| static void OpenDiagnosticMenu(void) | (no comment) | NetXecChannel.c:1134 | static |
| static void CloseDiagnosticMenu(void) | (no comment) | NetXecChannel.c:1141 | static |
| static void HandleMenuKey(const SDL_Event *ev) | (no comment) | NetXecChannel.c:1153 | static |
| static void HandEventToEventChannel(const SDL_Event *ev) | (no comment) | NetXecChannel.c:1221 | static |
| int NetXecOpenDisplay(void) | (no comment) | NetXecChannel.c:1264 | public |
| struct SDL_Window * NetXecGetWindow(void) | (no comment) | NetXecChannel.c:1294 | public |
| struct SDL_Renderer * NetXecGetRenderer(void) | (no comment) | NetXecChannel.c:1299 | public |
| int NetXecHandPendingEvents(void) | NetXecHandPendingEvents -- poll SDL and feed EventChannel. Called from RunMainLoop and ContRunNested (nested display frames block | NetXecChannel.c:1310 | public |
| void NetXecRunDisplay(void) | (no comment) | NetXecChannel.c:1357 | public |
| void NetXecRequestShutdown(void) | Ends NetXecRunDisplay at its next tick (the MainChannel process asked, or it exited). | NetXecChannel.c:1408 | public |
| uint64_t NetXecTimeNs(void) | NetXec timing (2026-10-16): the one clock channel code and tests use (monotonic, ns / ms since SDL init). | NetXecChannel.c:1414 | public |
| uint64_t NetXecTimeMs(void) | (no comment) | NetXecChannel.c:1419 | public |
| void NetXecSetTargetFps(unsigned fps) | (no comment) | NetXecChannel.c:1433 | public |
| unsigned NetXecTargetFps(void) | (no comment) | NetXecChannel.c:1440 | public |
| unsigned NetXecArgFps(int argc, char **argv) | (no comment) | NetXecChannel.c:1450 | public |
| uint64_t NetXecTickPeriodNs(void) | (no comment) | NetXecChannel.c:1458 | public |
| uint64_t NetXecRefreshNs(void) | (no comment) | NetXecChannel.c:1464 | public |
| void NetXecTickStart(struct NetXecTick *tk, uint64_t period_ns) | (no comment) | NetXecChannel.c:1473 | public |
| uint64_t NetXecTickWait(struct NetXecTick *tk) | (no comment) | NetXecChannel.c:1482 | public |
| int NetXecTickFollow(struct NetXecTick *tk) | addition 2026-10-18 (fps slider, Tony): a tick started with period 0 follows NetXecSetTargetFps live. When the target period changed, the new grid starts at the tick's last deadline (no jump back, no catch-up burst; a deadline already | NetXecChannel.c:1504 | public |
| static void NetXecCloseDisplay(void) | NetXecCloseDisplay -- destroy window/renderer once Cont textures gone | NetXecChannel.c:1518 | static |
| void CloseNetXecChannel(struct NetXecChannel *nx) | CloseNetXecChannel | NetXecChannel.c:1535 | public |
| int main(int argc, char **argv) | main | NetXecChannel.c:1738 | public |
| int64_t NetXecWallTimeS(void) | ==== addition 2026-10-23 (Solid round 2, Tony GO): wall clock + CPU throttle hook ==== NetXecWallTimeS: UTC seconds (JWT exp/iat checks). The throttle is a Nexus pyramid of CPU budgets per | NetXecChannel.c:1805 | public |
| static uint64_t NxtWindow(void) | (no comment) | NetXecChannel.c:1817 | static |
| static int NxtOk(int id) | (no comment) | NetXecChannel.c:1818 | static |
| int NetXecThrottleRegister(const char *name, int parent, uint32_t weight, uint32_t flags) | (no comment) | NetXecChannel.c:1820 | public |
| int NetXecThrottleFind(const char *name) | (no comment) | NetXecChannel.c:1835 | public |
| int NetXecThrottleSetWeight(int id, uint32_t w) | (no comment) | NetXecChannel.c:1841 | public |
| void NetXecThrottleSetWindowNs(uint64_t ns) | (no comment) | NetXecChannel.c:1842 | public |
| void NetXecThrottleSetAIMinPct(uint32_t pct) | (no comment) | NetXecChannel.c:1843 | public |
| void NetXecThrottleReset(void) | (no comment) | NetXecChannel.c:1844 | public |
| static uint64_t NxtRaw(int id) | raw pyramid share (ppm), no AI floor | NetXecChannel.c:1847 | static |
| static int NxtIsAi(int id) | (no comment) | NetXecChannel.c:1854 | static |
| uint32_t NetXecThrottleSharePpm(int id) | (no comment) | NetXecChannel.c:1855 | public |
| uint64_t NetXecThrottleBudgetNs(int id) | (no comment) | NetXecChannel.c:1867 | public |
| static uint64_t NxtRem1(int id) | (no comment) | NetXecChannel.c:1868 | static |
| uint64_t NetXecThrottleRemainingNs(int id) | (no comment) | NetXecChannel.c:1869 | public |
| int NetXecThrottleBegin(int id) | (no comment) | NetXecChannel.c:1878 | public |
| void NetXecThrottleCharge(int id, uint64_t ns) | (no comment) | NetXecChannel.c:1886 | public |
| uint64_t NetXecThrottleEnd(int id) | (no comment) | NetXecChannel.c:1893 | public |
| void NetXecThrottleTick(uint64_t now) | (no comment) | NetXecChannel.c:1902 | public |
| static int IsCorePeer(struct NetXecChannel *nx, const struct Channel *peer) | True if peer is the core channel_base[peer->ch_id] entry. | channel_io.c:13 | static |
| static struct NetXecChannel * ResolveNx(struct Channel *a, struct Channel *b) | (no comment) | channel_io.c:23 | static |
| static int JoinOneWay(struct Channel *self, struct Channel *peer) | Register peer on self's listener list. Core peers: store at peer->ch_id and set that mask bit. | channel_io.c:35 | static |
| static int LeaveOneWay(struct Channel *self, struct Channel *peer) | (no comment) | channel_io.c:69 | static |
| int ChannelJoin(struct Channel *self, struct Channel *peer) | (no comment) | channel_io.c:86 | public |
| int ChannelLeave(struct Channel *self, struct Channel *peer) | (no comment) | channel_io.c:103 | public |
| int ChannelBindIO(struct Channel *self, struct Channel *peer) | (no comment) | channel_io.c:113 | public |
| int ChannelUnbindIO(struct Channel *self, struct Channel *peer) | (no comment) | channel_io.c:143 | public |
| void ChannelWakePeer(struct Channel *peer, uint32_t from_id, int want_read, int want_write) | (no comment) | channel_io.c:152 | public |
| int ChannelIsJoined(const struct Channel *self, const struct Channel *peer) | (no comment) | channel_io.c:173 | public |
| int ChannelWriteSlot(struct NetXecChannel *nx, uint32_t self_id, uint32_t peer_id, uint64_t value) | (no comment) | channel_io.c:185 | public |
| int ChannelReadSlot(struct NetXecChannel *nx, uint32_t self_id, uint32_t peer_id, uint64_t *out) | (no comment) | channel_io.c:208 | public |
| static void C7Setenv(const char *k, const char *v) | ---------------------------------------------------------------------------- helpers | channels7_main.c:74 | static |
| static void C7DefaultEnv(const char *k, const char *v) | (no comment) | channels7_main.c:84 | static |
| static const char * C7Home(void) | (no comment) | channels7_main.c:90 | static |
| static int C7HasArg(int argc, char **argv, const char *a) | (no comment) | channels7_main.c:106 | static |
| static void C7Autoquit(int argc, char **argv, unsigned def_s) | autoexit [s] -> NX_AUTOQUIT_MS (NetXec's own shutdown hook, NetXecRunDisplay); def_s 0 = only when asked | channels7_main.c:114 | static |
| static void C7JavaDir(void) | JavaChannel's shared memory directory, as javachannel/run and run_gpudemo_java set it | channels7_main.c:130 | static |
| static void C7CdJavachannel(void) | javachannel/run ran javachannel.exe from javachannel/: the JavaChannel tests and the ODL demo read data/ and ../tests/ from there | channels7_main.c:138 | static |
| static int C7FindJava(char *java, size_t cap, char *jdk, size_t jcap) | java from PATH (plain java, no JDK path in the code); jdk = the directory above bin\ | channels7_main.c:150 | static |
| static const char * C7Classpath(void) | (no comment) | channels7_main.c:168 | static |
| static void C7Quote(char *cmd, size_t cap, const char *a) | (no comment) | channels7_main.c:176 | static |
| static HANDLE C7Start(const char *exe, const char *cmd, DWORD *pid) | start exe with cmd (std handles inherited, as MainSpawn does); returns the process handle or NULL | channels7_main.c:184 | static |
| static int C7Run(const char *exe, int n, const char *const *args) | run exe [args] to its end; exit code, or -1 when it did not start | channels7_main.c:211 | static |
| static int C7Self(char *exe, size_t cap) | (no comment) | channels7_main.c:228 | static |
| static void C7JvmCheck(const char *who) | (no comment) | channels7_main.c:234 | static |
| static int C7Tests(const char *const *names, int n) | run the listed test programs from the channels7 directory, like ./run's loop | channels7_main.c:242 | static |
| static int OptTests(int argc, char **argv, int child) | ---------------------------------------------------------------------------- the options | channels7_main.c:262 | static |
| static int OptHeadless(int argc, char **argv, int child) | (no comment) | channels7_main.c:287 | static |
| static int OptGPU(int argc, char **argv, int child) | (no comment) | channels7_main.c:298 | static |
| static int OptMain(int argc, char **argv, int child) | main: C only. NetXec first, the MainChannel process (IPC block + NetXec's tick event), its main loop prints every NXMAIN_LOOP_PRINT_TICKS ticks; NetXec's NX_AUTOQUIT_MS stops it (state SHUTDOWN, the process exits by itself). | channels7_main.c:313 | static |
| static int OptJava(int argc, char **argv, int child) | (no comment) | channels7_main.c:334 | static |
| static int OptDemo(int argc, char **argv, int child) | (no comment) | channels7_main.c:349 | static |
| static int OptLive(int argc, char **argv, int child) | (no comment) | channels7_main.c:367 | static |
| static int OptGpudemo(int argc, char **argv, int child) | (no comment) | channels7_main.c:379 | static |
| static int OptJavaGPU(int argc, char **argv, int child) | java-gpu: the parent is NetXec (JGpuDemoChannel's main: NetXec renders, then spawns the MainChannel process). The MainChannel process (child, --channel=main) starts Java here, after NetXec is up, then runs JavaChannel; at its end it | channels7_main.c:402 | static |
| static int OptHelp(int argc, char **argv, int child) | (no comment) | channels7_main.c:460 | static |
| static const struct C7Opt * C7Find(const char *name) | (no comment) | channels7_main.c:471 | static |
| int main(int argc, char **argv) | ---------------------------------------------------------------------------- main | channels7_main.c:480 | public |
| int GetOS(void) | (no comment) | gen/NetXecOS.c:94 | public |