fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
at master 66 lines 2.9 kB view raw
1/***************************************************************************** 2 * pce * 3 *****************************************************************************/ 4 5/***************************************************************************** 6 * File name: src/lib/sysdep.h * 7 * Created: 2006-06-19 by Hampa Hug <hampa@hampa.ch> * 8 * Copyright: (C) 2006-2025 Hampa Hug <hampa@hampa.ch> * 9 *****************************************************************************/ 10 11/***************************************************************************** 12 * This program is free software. You can redistribute it and / or modify it * 13 * under the terms of the GNU General Public License version 2 as published * 14 * by the Free Software Foundation. * 15 * * 16 * This program is distributed in the hope that it will be useful, but * 17 * WITHOUT ANY WARRANTY, without even the implied warranty of * 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * 19 * Public License for more details. * 20 *****************************************************************************/ 21 22 23#ifndef PCE_LIB_SYSDEP_H 24#define PCE_LIB_SYSDEP_H 1 25 26 27#define PCE_BRK_STOP 1 28#define PCE_BRK_ABORT 2 29 30 31int pce_usleep (unsigned long usec); 32 33/*!*************************************************************************** 34 * @short Get an interval in microseconds 35 * 36 * Returns the number of microseconds that passed since this function 37 * was called the last time with the same parameter. 38 *****************************************************************************/ 39unsigned long pce_get_interval_us (unsigned long *val); 40 41void pce_srand (unsigned val); 42 43void pce_set_fd_interactive (int fd, int interactive); 44 45/*!*************************************************************************** 46 * @short Check if a file descriptor is readable without blocking 47 * @param fd The file descriptor 48 * @param t Wait at most t milliseconds for fd to become readable 49 *****************************************************************************/ 50int pce_fd_readable (int fd, int t); 51 52/*!*************************************************************************** 53 * @short Check if a file descriptor is writeable without blocking 54 * @param fd The file descriptor 55 * @param t Wait at most t milliseconds for fd to become writeable 56 *****************************************************************************/ 57int pce_fd_writeable (int fd, int t); 58 59int pce_file_exists (const char *name); 60 61void pce_start (unsigned *brk); 62 63void pce_stop (void); 64 65 66#endif