Mon 16 Mar 11:09:06 CET 2026

This commit is contained in:
sbosse 2026-03-16 11:12:44 +01:00
parent 3c12254ac5
commit 7e136e1032

46
src/unix.h Normal file
View File

@ -0,0 +1,46 @@
#ifndef _UNIX_H
#define _UNIX_H
#include "config.h"
#ifndef NUMLINKS
#define NUMLINKS 4
#endif
extern int availbyte(int fd);
extern char inbyte(int fd);
extern int outbyte(int fd,char x);
/*
Under UNIX we use named FS FIFOs for node-node communication.
The FIFOs are connected to links.
All port fifo file deescriptors
[N0} P0 --- P0 [N1]
P1
|
|
P2
[N2]
*/
extern char *portfilerd[NUMPORTS];
extern char *portfilewr[NUMPORTS];
int ioinit();
int iowait(context_t *C, int nonblock);
char* readFile(char *path);
// FIFO communication
int port_open();
void port_close();
// Timer support
int timer_init();
int timer_start(int index, int millis);
int timer_stop(int index);
void vLog(const char* fmtStr, ...);
#endif